Roles

In the context of a security token smart contract, roles and permissions are crucial for enforcing rules, compliance, and security measures. These roles often involve restricting access to specific functionalities within the smart contract to authorized addresses only. Below are the key roles embedded into an STV2 Security Token smart contract, along with their functionalities and responsibilities.


Deployer

  • Role automatically granted to address of the creator of the contract.

  • Input data into Constructor (according to initial inputs) to deploy STV2 Security Token Smart Contract.

  • Set the address of ValidationManager with which validation will be done: function setValidationManager(address _validationAddress).

  • Renounce the Deployer role function: renounceDeployership().

  • Transfers “deployership” of the contract to a new account: transferDeployership().


Superadmin

  • The role has to be defined in the form and is assigned when the contract deploys (in the constructor).

  • The role can be also granted later by SuperAdmin with the help of the function: grantRole(bytes32 role, address account) where: bytes32 role = DEFAULT_ADMIN_ROLE.

  • Grant all roles: grantRole(bytes32 role, address account) where: bytes32 role = the proper constant (DEFAULT_ADMIN_ROLE or COMPLIANCE_MANAGER_ROLE or RECOVERY_MANAGER_ROLE or FINANCIAL_MANAGER_ROLE).

  • Remove all roles: revokeRole(bytes32 role, address account)where: bytes32 role =the proper constant (DEFAULT_ADMIN_ROLE or COMPLIANCE_MANAGER_ROLE or RECOVERY_MANAGER_ROLEor FINANCIAL_MANAGER_ROLE).

  • Pause and unpause contract Function “unpauseContract()” works when the contract paused: pauseContract() unpauseContract().

  • Change the main Corporate Treasury (move all the features of Treasury from the “old“ corporate wallet to the “new“ one. The function works when the contract is paused: function replacementOfCorporateTreasury(address _newTreasury).

  • Turn on and off Whitelist Function works when the contract is paused: toggleWhitelist()

  • Turn on and off LockUps of tokens Function works when the contract is paused: toggleLockUps()

  • Turn on and off Limit of transactions Function works when the contract paused toggleTransactionCount()

  • Turn on and off Secondary trading Limit Function works when the contract paused toggleSecondaryTradingLimit()

  • Extract the “alien“ token which was sent to the address of SecurityTokenContract Function works when the contract is paused: withdrawStuckTokens()

  • Set the address of the ValidationManager smart contract Function works when the contract paused function: setValidationManager(address _validationAddress)


Financial Manager

  • The role has to be defined in the form and is assigned when the contract deploys (in the constructor).

  • The role can be also granted later by SuperAdmin with the help of the function: grantRole(bytes32 role, address account) where: bytes32 role = FINANCIAL_MANAGER_ROLE.

  • Withdraw funds from the corporate storage without limits and send to investors' addresses: transferFromTreasuryToInvestor( address[] memory _bundleTo, uint256[] memory _bundleAmounts).

  • Withdraw funds from the corporate storage without limits and send them to investors' addresses immediately blocking these tokens for a certain number of days: function transferFromTreasuryLockedTokens( address[] memory _bundleTo, uint256[] memory _bundleAmounts, uint256 _daysToLock).

  • Lock up funds on other addresses blocking these tokens for a certain number of days: function lockUpTokensOnAddress( address[] memory _bundleTo, uint256[] memory _bundleAmounts, uint256 _daysToLock).

  • Withdraw all ERC20 tokens from the corporate smart contract Treasury: function withdraw( address _token, address _reciever, uint256 _amount).

  • Give allowance for other addresses to transferFrom ERC20 tokens from the corporate smart contract Treasury: function giveAllowanceFor( address _ERC20token, address _spender, uint256 _amount )


Compliance Manager

  • The role has to be defined in the form and is assigned when the contract is deployed (in the constructor).

  • The role can be also granted later by SuperAdmin with the help of the function: grantRole(bytes32 role, address account) where: bytes32 role = COMPLIANCE_MANAGER_ROLE

  • Add and Remove addresses to/from Whitelist: function addAddressToWhitelist(address[] memory _bundleAddresses) removeAddressFromWhitelist(address[] memory _bundleAddresses)

  • Set default Secondary Trading and Transaction Count limits of the contract: function setDefaultSecondaryTradingLimit(uint256 _newLimit) function setDefaultTransactionCountLimit(uint256 _newLimit)

  • Set all limits of the certain address (individual Secondary Trading limits & individual Transaction Count Limits): function setSecondaryTradingLimitFor( address[] memory _bundleAccounts, uint256[] memory _bundleNewLimits) function setTransactionCountLimitFor( address[] memory _bundleAccounts, uint256[] memory _bundleNewLimits)`

  • Resets individual limits of the certain address (individual Secondary Trading limits & individual Transaction Count Limits) so the default limits apply to these addresses: function resetSecondaryTradingLimitToDefault( address[] memory _accountsToReset) function resetTransactionCountLimitToDefalt( address[] memory _accountsToReset)


Recovery Manager

  • The role has to be defined in the form and is assigned when the contract is deployed (in the constructor).

  • The role can be also granted later by SuperAdmin with the help of the function: grantRole(bytes32 role, address account) where: bytes32 role = RECOVERY_MANAGER_ROLE

  • The mint tokens. The function works when the contract is paused: function mint(address _to, uint256 _amount)

  • Burn tokens. Functions work when the contract is paused: function burn(address _from, uint256 _amount) external onlyRecoveryManager) function burnBundle(address[] memory _bundleFrom, uint256[] memory _bundleAmounts)

  • Redemption (burning of the whole balance of tokens of the address). Functions work when the contract is paused. function redemption(address[] memory _bundleFrom)

  • Transfer tokens from and to any address without any restrictions. The only thing for the address of the receiver has to be whitelisted. The function works when the contract is paused. function transferFunds(address _from, address _to, uint256 _amount)


Last updated