Comment on page
RUSD (Ring USD)
The Ring USD stablecoin
RUSD is a regular ERC-20 token, based on the OpenZeppelin ERC-20Burnable code with the following modifications:
Minting and burning to any address are uncapped and accessible by any address with the Minter💰and Burner🔥 role, respectively.
At each transfer (or transferFrom) the following addresses are checked for a mapped incentive contract:
- RUSD sender
- RUSD receiver
- RUSD operator (msg.sender) - commonly the same as the sender unless using transferFrom with an approved contract
- the zero address - represens an incentive to be applied on ALL transfers
If an incentive contract is found, it is called with all of the transfer parameters. Any incentive is applied after the token balances update from the transfer.
Minting RUSD to an address
Burning RUSD from an address
setting or unsetting an incentive contract for an incentivized address
function incentiveContract(address account) external view returns (address);
returns the mapped incentive contract if
accountis an incentivized address, otherwise returns the 0 address.
if the 0 address has a mapped incentive contract, then this incentive contract is called for every single RUSD transfer.
function burnFrom(address account, uint256 amount) external;
account. Reverts if the RUSD balance of
accountis less than
function mint(address account, uint256 amount) external;
function setIncentiveContract(address account, address incentive) external;
Sets the incentive contract
incentiveis the 0 address this functions as an unset.
function burn(uint256 amount) external;
msg.sender. Reverts if the RUSD balance of
msg.senderis less than
Sets the allowance for a
ownervia signature. Reverts if called after
Rusd Interface ABI