Technical Design
Last updated
Last updated
Figure 1 sketches the architectural design of the proposed protocol, which consists of the following components:
RANDAO contract: The smart contract implements the RANDAO pipeline that supports multiple concurrent RANDAO rounds. Participants can join the process using the commit and reveal methods, which are subject to time constraints based on the starting time of the rounds. The final calculation phase is triggered when a request is made to the RANDAO contract to query for the randseed at a specific block or time point. The RANDAO contract can be deployed on multiple chains.
Staking contract: The staking contract is responsible for managing the membership of participants who contribute to the RANDAO protocol. Only RANDAO members are able to interact with the RANDAO contract. Membership can be obtained by making a deposit to the staking contract, and these deposits are not accessible by any parties, including the operators. Members are able to withdraw their deposits at any time. The staking contract is deployed on a separate chain from the RANDAO contracts.
RANDAO dApp: The RANDAO dApp serves as an interface for participants to interact with the Staking contract and view the history of RANDAO. The history of RANDAO is obtained by querying the RANDAO contracts directly, making the system lightweight and easy to deploy on multiple chains with minimal maintenance effort. RANDAO backend: The RANDAO backend is responsible for providing membership certificates that must be sent along with commit/reveal transactions. The RANDAO contract only accepts these transactions if they include a valid membership certificate. When a request is made, the RANDAO backend checks the Staking contract to see if the requester, represented by a public address, has made an appropriate deposit. If such a deposit exists, the RANDAO backend will issue a membership certificate, which is valid for 10 minutes. This validity period helps to reduce the number of requests made to the RANDAO backend.
RANDAO CLI: The RANDAO CLI is a command line tool that allows participants to interact with RANDAO contracts deployed on all chains. It periodically sends sha3(s) and s values to all RANDAO contracts, combining the commit and reveal actions into a single transaction to save bandwidth and transaction fees, if applicable.
Participants who contribute to the protocol are incentivized for every successful pair of commit and reveal actions. In other words, if a participant commits a sha3(s) within the commit phase of a RANDAO round and successfully reveals s within the reveal phase of that round, they will receive a small reward directly to their wallet on the same chain as the RANDAO contract. This means that participants can earn rewards on each chain in which they participate in the protocol.
The reward for each round is fixed and determined by the system operator. This reward is divided equally among all participants in the round, meaning that the more participants there are in a round, the smaller the reward each participant will receive. This allows the operator to anticipate the total rewards regardless of the number of members participating in the protocol. The operator can change the reward rate at any time, and the new rate is applied immediately.