Ring Protocol
Search
⌃K

Core

The access control, source of truth, and DAO treasury for Ring Protocol

Contract

Core.sol implements ICore, Permissions

Description

The Core contract responsibilities:
  • Access control
  • Pointing to RUSD, RING, and GenesisGroup contracts
  • Stores whether GenesisGroup has completed
  • Escrowing DAO RING treasury
The access control module is managed by Permissions.
Most other Ring Protocol contracts should refer to Core by implementing the CoreRef contract.
When Core is constructed and initialized it does the following:
  • Set sender as governor
  • Create and reference RUSD and RING contracts
The governor will then set the genesis group contract.
When the genesis group conditions are met, the GenesisGroup contract should complete the genesis group by calling completeGenesisGroup()
  • Governor ⚖️

Events

RusdUpdate
RingUpdate
GenesisGroupUpdate
RingAllocation
GenesisPeriodComplete
Governance change of RUSD token address
type
param
description
address indexed
_rusd
new RUSD address
Governance change of RING token address
type
param
description
address indexed
_ring
new RING address
Governance change of GenesisGroup address
type
param
description
address indexed
_genesisGroup
new Genesis Group address
Governance deployment of RING tokens from treasury
type
param
description
address indexed
_to
The address to receive RING
uint256
_amount
The amount of RING distributed
Signals completion of Genesis Period and full launch of RING protocol
type
param
description
uint256
_timestamp
The block timestamp at Genesis completion

Read-Only Functions

rusd

function rusd() external view returns (IRusd);
returns the address of the RUSD contract as an interface for consumption

ring

function ring() external view returns (IERC20);
returns the address of the RING contract as an interface for consumption

genesisGroup

function genesisGroup() external view returns (address);
returns the address of the GenesisGroup contract

hasGenesisGroupCompleted

function hasGenesisGroupCompleted() external view returns (bool);
returns true if after genesis period and launched, false otherwise

Governor-Only⚖️ State-Changing Functions

setRusd

function setRusd(address token) external;
sets the reference RUSD contract
emits RusdUpdate

setRing

function setRing(address token) external;
sets the reference RING contract
emits RingUpdate

setGenesisGroup

function setGenesisGroup(address _genesisGroup) external;
sets the reference GenesisGroup contract to _genesisGroup
emits GenesisGroupUpdate

allocateRing

function allocateRing(address to, uint256 amount) external;
distribute amount RING from Core to an external address to
emits RingAllocation

GenesisGroup-Only🚀 State-Changing Functions

completeGenesisGroup

function completeGenesisGroup() external;
called during Ring Protocol launch to unlock the remaining protocol functionality
emits GenesisPeriodComplete

ABIs

core.json
8KB
Code
Core ABI
icore.json
5KB
Code
Core Interface ABI