Mint, Burn and Treasury Management

The smart contract has two main entities that refer to the emission, distribution and destruction of security tokens:

  • Corporate official wallet-address named “Corporate Treasury

/// @notice oficial corporate wallet of the Company, to which tokens are minted and then distributed
    address private _corporateTreasury;
  • and the role of Financial Manager.

Both these parameters are defined in the Constructor of the smart contract when it deploys and can be changed and governed by the SuperAdmin role :

replacementOfCorporateTreasury(address _newTreasury),

grantRole(bytes32 role, address account) where: bytes32 role = FINANCIAL_MANAGER_ROLE

revokeRole(bytes32 role, address account)where: bytes32 role = FINANCIAL_MANAGER_ROLE

These functions have some complicated logic. It was done on purpose, not to let users make certain mistakes, to reduce the likelihood of fraud with these changes, and to make it easier to interact with the smart contract.

replacementOfCorporateTreasury(address _newTreasury) consists of such steps in one function:

  • checks newAddress of Treasury not to be zero-address;

  • adds newTreasury to whitelist;

  • transfers all the balance of oldTreasury to new one;

  • checks if that balance was correctly replaced;

  • resets the limits(secondary trading and transction count) of oldTreasury to the default values;

  • sets the address of newTreasury as the proper parameter of smart contract(_corporateTreasury);

  • sets the maximum limits for the newTreasury (2**256-1);

  • removes oldTreasury from Whitelist

At first, a Smart contract is created without preminted tokens. They have to be minted already after deploying.

Function mint() is for just this purpose. It is called by the Recovery Manager Role .

/// @notice Mints `_amount` of tokens to the address `_to`
    /// @dev Allowed only for RecoveryManager
    /// @param _to address to mint on it tokens
    /// @param _amount amount of tokens to mint
    function mint(address _to, uint256 _amount) external onlyRecoveryManager {
        _mint(_to, _amount);
    }

At first necessary amount of tokens has to be minted exactly to the Corporate Treasury.

From which all tokens can be transferred further to the proper addresses by the Financial Manager (functions transferFromTreasuryToInvestor(), transferFromTreasuryLockedTokens()).

Also, the contract has standard functions:

transfer(), transferFrom() - which certainly can move tokens from address to address;

Functionality is available only for the Recovery Manager role:

  • mint() - to mint tokens as usually done in ERC-20 contracts

Destruction of tokens is also specified in the smart contract. Burning of tokens can be done by the functions

  • burn() and

  • redemption() .

The difference between them is that using burn() you have to clearly indicate the amount of tokens to burn, and using redemption() - it will be enough to input address(es) and the whole balance of tokens on it (them) will be burnt.

  • transferFunds() which also allowed only for the Recovery Manager role and can move any _amount of tokens from any _from address to any whitelisted _to address.


Last updated