# Silent Token Intention Document ## Overview The Silent Token contract serves a number of roles within the Silent ecosystem. Almost all Silent contracts interact with the Silent token contract in one way or another: - Relayers get paid in Silent tokens - Renode Bonding and Staking uses Silent tokens - Privicy Mining rewards and Renode Staking rewards use Silent tokens. Aside being a dependency to all these contracts within the Silent ecosystem, the main purpose of the Silent Token contract is to enable multichain (EVM and non EVM) token transfers without requirement for liquidity or fees. This is done through [LayerZero's Omnichain Fungible Token](https://layerzero.gitbook.io/docs/) (OFTV2) contracts, from which Silent token derives its main functionalities. Another main feature of the Silent Token contract is its ability to automatically mint new tokens at a specified rate for a period of time. This process is collaborative and any public entity can interact with this process. ## Architecture ![](https://hackmd.io/_uploads/rk8ukv1wn.png) ## Functionality By inheritance, the Silent Token contract has all the functionality of the standard ERC20 token (transfer, transferFrom, totalSupply, balanceOf, etc). It also has extra functionality which enable it to communicate with other Silent Token contracts across various blockchains through inheritance from [LayerZero's OFTV2]((https://layerzero.gitbook.io/docs/)) contract. ### Custom Functionality: In order to make the Silent Token contract capable of automatically minting tokens, the following functions were added: - `resumeMinting`: This function is used to resume / start an automatic mint process. Can only be called by the owner. - `pauseMinting`: This function is used to pause / halt an ongoing mint process. Can only be called by the owner. - `setMintRate`: This function is used to set the mint rate. Rate is tokens per second. Can only be set when minting is paused / not active and can only be called by the owner. - `setTreasury`: This function is used to set the address of the treasury. The treasury holds all newly minted Silent tokens. Can only be called by the owner. - `manageBurnerStatus`: This function is used to whitelist or blacklist a burner. A burner is an account that is capable of burning their Silent tokens and effectively reducing the token supply. Can only be called by the owner. - `updateSupply`: This function is used to update the token supply when minting is ongoing. It can only be called when minting is active (not paused). The purpose of this function is to allow anybody to update token supply when mint is currently ongoing. All tokens minted when update supply is called are transferred to the treasury address. In the event it is not called by any party, token supply would be updated when pauseMinting function is called by owner. - `burn`: This function is used to burn a caller’s tokens by sending it to the burn address and reducing the token supply. This function is mainly called by some Silent contracts, like SMASP and Renode Bonding, to burn any fees collected from users. ### Events - `MintingPaused`: This event is emitted when token minting is paused. - `MintingResumed`: This event is emitted when token minting is resumed. - `MintRateUpdated`: This event is emitted when a new mint rate is set. - `BurnerStatus`: This event is emitted when a when an address is whitelisted or blacklisted