Ring Protocol
Search…
RUSD (Ring USD)
The Ring USD stablecoin

Contract

Description

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.

Events

Minting
Burning
IncentiveContractUpdate
Minting RUSD to an address
type
param
description
address indexed
_to
The recipient of the minted RUSD
address indexed
_minter
The contract that minted the RUSD
uint256
_amount
The amount of RUSD minted
Burning RUSD from an address
type
param
description
address indexed
_to
The target of the burned RUSD
address indexed
_burner
The contract that burned the RUSD
uint256
_amount
The amount of RUSD minted
setting or unsetting an incentive contract for an incentivized address
type
param
description
address indexed
_incentivized
The incentivized address
address indexed
_incentiveContract
The new incentive contract. address(0) to unset

Read-Only Functions

incentiveContract

1
function incentiveContract(address account) external view returns (address);
Copied!
returns the mapped incentive contract if account is 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.

Burner-Only🔥 State-Changing Functions

burnFrom

1
function burnFrom(address account, uint256 amount) external;
Copied!
Burns amount RUSD from account. Reverts if the RUSD balance of account is less than amount
emits Burning

Minter-Only💰 State-Changing Functions

mint

1
function mint(address account, uint256 amount) external;
Copied!
Mints amount RUSD to account
emits Minting

Governor-Only⚖️ State-Changing Functions

setIncentiveContract

1
function setIncentiveContract(address account, address incentive) external;
Copied!
Sets the incentive contract incentive for account. If incentive is the 0 address this functions as an unset.
emits IncentiveContractUpdate

Public State-Changing Functions

burn

1
function burn(uint256 amount) external;
Copied!
Burns amount RUSD from msg.sender. Reverts if the RUSD balance of msg.sender is less than amount
emits Burning

permit

1
function permit(
2
address owner,
3
address spender,
4
uint256 value,
5
uint256 deadline,
6
uint8 v,
7
bytes32 r,
8
bytes32 s
9
) external;
Copied!
Sets the allowance for a spender for value RUSD from owner via signature. Reverts if called after deadline

ABIs

rusd.json
7KB
Binary
Rusd ABI
irusd.json
4KB
Binary
Rusd Interface ABI
Last modified 4mo ago