¶ 4.1. Main Smart Contracts

The RealToken DAO operates using special computer programs called "smart contracts". These contracts automatically manage the DAO's rules, votes, and rewards. There are four main contracts:
- The governance contract: This is the brain of the DAO. It manages proposals and votes,
- The treasury contract: It manages the DAO's funds and applies a security delay before executing decisions,
- The voting power contract: It calculates the voting power of each member,
- The incentive contract: It distributes rewards to active DAO members who vote and lock their REG (if a period is activated by the DAO).
The RealToken DAO is based on a set of interconnected smart contracts:
- Governance contract: Based on the OpenZeppelin Governor standard, with minor modifications, it manages the lifecycle of proposals, the voting process, and the execution of on-chain decisions,
- Treasury contract (REGTreasuryDAO): Implements a timelock mechanism to secure the execution of DAO decisions and manage its funds,
- Voting power contract (PowerVotingRegistry): Records the voting power of REG holders based on their balance, boost, and activity, thus allowing greater flexibility than the classic token voting model, 1 token = 1 vote,
- Incentive contract: Manages the distribution of rewards to encourage active participation in governance, for this purpose, voting and locking REG for a determined duration (epoch) is required.
These contracts interact to ensure transparent and secure operation of the DAO while encouraging active participation in governance.
The technical architecture of the RealToken DAO is composed of several key smart contracts:
- Based on OpenZeppelin Governor with custom modifications,
- Manages the complete lifecycle of proposals: creation, voting, and execution,
- Integrates interactions with the timelock to increase execution security,
- Implements access controls for proposal creation, allowing activation of 4 different modes to authorize proposals to be created,
- Interacts directly with the PowerVotingRegistry to create snapshots of voting powers based on values recorded in the PowerVotingRegistry.
- Based on OpenZeppelin's TimelockControllerUpgradeable,
- Implements a timelock mechanism to add a security delay before executing on-chain decisions,
- Manages the DAO's funds and controls their use,
- Integrates specific roles (UPGRADER_ROLE) for managing contract upgrades,
- Uses the UUPS (Universal Upgradeable Proxy Standard) pattern to allow future upgrades,
- Interacts with external contracts called by proposals.
- Records voting power based on REG balance and other factors (e.g., holding duration, lock, liquidity pool, etc.),
- Implements self-delegation logic to simplify voting power activation.
- Integrates state logic that modifies possible actions, the complete cycle is called "epoch", for each epoch voting and locking REG is required to receive rewards,
- Distributes rewards to active governance participants (who vote),
- Uses locking mechanisms to encourage long-term commitment (locking for the duration of the epoch),
- Integrates reward calculations based on governance activity (votes and REG locking).
These contracts are designed to be modular and scalable, allowing for future updates and improvements without disrupting the entire governance system. The REGTreasuryDAO contract, in particular, adds an extra layer of security by imposing a delay between proposing an action and its execution, thus allowing the community to react if necessary.
Eventually, all contracts in the RealToken ecosystem will be controlled, upgradable only by the REGTreasuryDAO contract via proposals, only a few emergency functions can be executed outside the DAO cycle by a security committee that will have rights limited to emergency actions to secure the contracts.
¶ 4.2. Voting and proposal mechanisms
The RealToken DAO allows you to participate in important decisions of the ecosystem of applications linked to the DAO. Here's how it works:
- On the DAO forum, members can propose ideas to improve the DAO and the ecosystem,
- A debate takes place around the proposals to measure the feasibility and interest of the proposals by the community,
- If a proposal gets enough votes, it is transformed into a proposal and submitted to the DAO vote,
- DAO members can vote for or against the proposal,
- If the proposal is approved, it is executed by the REGTreasuryDAO.
The voting and proposal system of the RealToken DAO includes:
- The DAO forum: Where members can propose ideas and debate to measure the interest of proposals,
- During the debate period, the community must measure the interest and feasibility of proposals,
- If a proposal is deemed feasible and relevant, a concrete proposal is worked on with the establishment of all parameters related to the proposal, such as on-chain actions to be executed, development cost, gains for the DAO, etc...
- Proposal creation: Process controlled by access rules defined in the governance contract, depending on the parameters there may be restrictions on proposal creation, this is to avoid governance attacks, and allow a progressive implementation of the DAO's operating rules in complete safety,
- Proposal lifecycle: Creation, voting period, execution (if approved).
- Timelock mechanism: Security delay before executing approved decisions.
The voting and proposal mechanisms are implemented as follows:
- DAO forum:
- Where users can propose ideas and debate to measure the interest of proposals,
- A debate takes place around the proposals to measure the feasibility and interest of the proposals by the community or one of the DAO's service providers,
- If a proposal is deemed feasible and relevant, a concrete proposal is worked on with the establishment of all parameters related to the proposal, such as on-chain actions to be executed, development cost, gains for the DAO, impact and risk study, security audit needs or not, etc...
- Proposal creation:
- Controlled by the governance contract,
- Four authorization modes are possible for proposal creation, these proposal modes aim to optimize the DAO's risk management, and limit fund exposure, with a medium-term decentralization objective depending on the DAO's maturity,
- On-chain registration of the proposal with all codes allowing the execution of the proposal if approved,
- Interaction with the PowerVotingRegistry to create snapshots of voting powers.
- Voting process:
- Based on the OpenZeppelin Governor standard with custom modifications,
- Use of voting power recorded in the PowerVotingRegistry,
- Voting options: for, against, or abstain,
- Only members registered in the PowerVotingRegistry can vote,
- A 1-day delay is applied between the start of the vote and the validation of the proposal creation transaction (for security, for possible cancellation),
- Voting takes place over a period determined by the governance contract, generally 7 days,
- Voters verify that the proposal conforms to the description and exchanges on the DAO forum (verification of on-chain execution code).
- Voting power calculation
- Recorded in the PowerVotingRegistry,
- Takes into account REG balance, holding duration, locking, and potentially other factors, according to the calculation algorithm validated by the DAO,
- Implements self-delegation logic to simplify voting power activation.
- Proposal execution:
- Use of REGTreasuryDAO as timelock to add a security delay,
- On-chain execution of approved actions after the delay,
- Possibility of cancellation during the timelock period if necessary, by a security group.
- Incentive system:
- Managed by the incentive contract,
- Rewards based on participation in votes and REG locking,
- Epoch system to structure reward periods,
- Activated by the DAO which defines the duration of epochs and associated rewards.
- Proposal mode:
- ProposerWithRole: The goal is to strictly limit the addresses that can submit a vote, to prevent spam and abusive proposals. This mode will be activated only during the first weeks or months of the initial governance deployment (version 1), to establish a solid foundation before expanding the number of proposal authors,
- ProposerWithVotingPower: This mode requires the proposal author to have a minimum voting power. Without this power, no proposal can be created. This is the ultimate step of decentralization, where all those with sufficient voting power can submit proposals. There are no more privileged roles; all holders follow the same rules,
- ProposerWithRoleAndVotingPower: This mode combines two restrictions, the proposal author must have a specific role and a minimum voting power. If one of the conditions is not met, the proposal will fail. This mode expands proposals to the most engaged members of the community, requiring a minimum REG balance to ensure their commitment and financial stakes. They must be elected and own enough REG. This allows starting decentralization, testing processes, and limiting risks,
- ProposerWithRoleOrVotingPower: This mode allows proposal creation if the proposal author has either the required role or a minimum voting power. If neither of these conditions is met, the proposal will fail. This is the penultimate step of governance decentralization. This mode requires a significant number of REG to freely propose improvements, without going through a specific role. This allows anyone to propose improvements by committing a significant number of REG, while maintaining proposal authors with a specific role, who don't need minimum REG. The role can be removed in case of non-compliance with processes.
- Delegation:
- Voting power delegation has been removed to allow activation of incentives for voters and REG lockers,
- Users cannot delegate their voting power to other addresses, but benefit from default self-delegation,
- In a v2, delegation will return and will even be an important part of the system.
These mechanisms are designed to ensure fair, secure, and incentivized governance, while allowing future evolution of the system.
In the first weeks/months, the DAO is implemented with restrictions to allow the establishment of operating rules, experiment with processes, and limit risks.
To give a good vision of the evolution stages, a debate will have to take place to determine the thresholds triggering a higher level of decentralization, giving greater autonomy and freeing itself from the trust given to various stakeholders.
¶ 4.3. Incentive and reward system
The RealToken DAO rewards you for your active participation. Here's how it works:
- You earn rewards in various forms by voting on proposals,
- You can increase your rewards by locking your REG tokens for a certain period,
- Participation in certain liquidity pools or others in the RealToken ecosystem can give you additional rewards,
- Rewards can be in the form of REG, ERC20, or even as a boost on voting power,
- The DAO decides on rewards and parameters of the incentive system.
The RealToken DAO's incentive system is designed to encourage active participation:
- The DAO defines the rewards and parameters of the incentive system, the type and amounts of rewards,
- Rewards based on participation in votes and REG locking, participation in certain liquidity pools or others in the RealToken ecosystem can give you additional rewards,
- Epoch system to structure reward periods and optimize participation,
- Automatic on-chain attribution of rewards in stable coin claimable at the end of each epoch,
- Possibility for the DAO to adjust the parameters of the incentive system to optimize participation and respond to the DAO's evolution.
The incentive and reward system is implemented as follows:
- Incentive contract:
- Manages the system state (active/inactive) and epoch cycles,
- Calculates rewards based on voting activity and REG locking,
- Automatically assigns rewards at the end of each epoch.
- Locking mechanism:
- Users can lock their REG for the duration of an epoch in the incentive contract,
- Locking can increase voting power and potential rewards according to parameters defined by the DAO,
- Locking allows marking a long-term commitment from the voter, decreases REG liquidity, and limits governance attack risks.
- Adjustable parameters:
- Duration of epochs,
- Quantity of rewards per epoch,
- Type of rewards,
- These parameters are applied by the DAO in the proposal for activating an epoch,
- For voting power boosts, the DAO can adjust as needed: the formula and weight given in the powerVoting calculation system that generates voting powers.
- Integration with PowerVotingRegistry:
- REG locking affects the recorded voting power,
- Synergy between governance participation and rewards.
- Security and scalability:
- Upgradable contract to allow future improvements,
- Pause mechanisms in case of emergency.
- Reward calculation:
- Accounts for the total number of proposals issued during an epoch,
- Accounts for the number of votes made by each voter during the epoch,
- Weighted by the quantity of locked REG.
userBonus = (userState.depositAmount * userState.voteAmount * epochState.totalBonus) / epochState.totalWeights;
userState.depositAmount
: The amount deposited by the user for this epoch in REG,
userState.voteAmount
: The number of votes made by the user during this epoch,
epochState.totalBonus
: The total amount of bonus allocated for this epoch,
epochState.totalWeights
: The total sum of weights for all users in this epoch.
This formula is applied in the contract at the following lines:
REGIncentiveVault.sol from line 342 to 346.
The total weights are incremented by the amount deposited by the user at each of their votes (cf line 245 of the contract).
This system aims to create a virtuous circle of engagement in governance, rewarding active participation while strengthening the long-term stability of the RealToken ecosystem.
The reward mechanism will be entirely revised with the implementation of V2 governance using NFTs to improve the incentive system, allow greater granularity, and precision of actions to encourage based on the DAO's needs and holder profiles.
New types of rewards will be introduced such as dark matter from Cityzen NFTs, support points for votes allowing the highlighting of content related to Activity NFTs, etc...
The RealToken ecosystem is designed to have numerous tools for optimizing participation in votes, and encouraging various actions and contributions that are beneficial to the DAO while allowing precise control of the DAO's finances to avoid squandering the treasury or devaluing the REG token.
This program calculates the Voting Power from the REG held, regardless of the blockchain and the use made of it.
A weighting is applied, depending on the use made by the holder of his REG, in order to encourage certain uses favorable to the DAO.
The parameters and execution of this program are voted by the DAO.
The OffChain program performs the following actions:
- Collection of all wallets that hold REG:
- on different blockchains (Gnosis, Ethereum, Polygon),
- on different Liquidity Pools (Honeyswap, sushiswap, Balancer, SwaprHQ),
- on the Valut Incentive
for a given period.
- Applies a specific weighting to each use case of REG:
- on a wallet,
- deposited on a Liquidity Pool (for the REG and its counterpart),
- deposited on the Incentive Vault.
- Calculation from the weighted amounts, the Voting Power (following a model).
The result of this program (snapshot) is used to update the quantity of PowerVoting tokens, for each wallet that holds them.
The weighting algorithm was initialized by RealT and is now voted on by the DAO.
The same goes for the calculation program, which was written by RealT and is now available to the DAO (which can vote on modifications).
The program is available on GitHub

A guide to install it, run it, and even request modifications is available in the ReadMe.