All about Tokamak DAO (2) [EN]
(2) Tokamak DAO smart contract <- Here
(3) DAO user interface and its use
- Contract overview
- DAO Committee
- DAO Vault
Tokamak DAO is a system for making decisions about various things that affect the Tokamak Network ecosystem. This post explains how the Tokamak DAO smart contract system works in detail and how users can contribute to the ecosystem.
DAO contracts have the authority of almost all contracts related to the Tokamak Network and have the authority to execute functions that change the state value of each contract. Specifically, in order to change the state, the user creates an agenda for the function execution in Tokamak DAO, and then the committee’s decision is made, and the execution is decided according to the result of the committee decision.
The DAO Contract controls the status of the agenda such as the management of qualifications for the members of the DAO Committee, proposals, and voting of agendas. In addition, functions such as voting for DAO candidates are designed to incentivize voters for rewards from voting by utilizing the existing Tokamak Network staking contract.
This post will explain the composition, role, and functional characteristics of the DAO contract.
All users can vote for any DAO candidate. Since this voting takes the form of depositing TON, users can vote for that candidate by depositing TON on the same candidate. Since these TON deposits use the Tokamak Network’s staking contract, voters can get rewards proportional to the TON they voted for.
The amount of votes received by a DAO candidate equals the total amount of TON delegated to that candidate. This voting amount includes the amount deposited by the candidate himself/herself.
The user’s vote for candidates is the same as the structure of staking, so all of the functions below are managed by the Tokamak Network staking contract. For more information on Tokamak Network staking service, please refer to this article.
Users can vote by delegating TON to any DAO candidate. TON delegation is managed by the contract that manages the staking service of Tokamak Network, and you can get rewards in proportion to the amount and duration of the delegation.
This is the procedure for requesting the release of the TON voted for a DAO candidate. When the vote is canceled, withdrawal is not made immediately and can be withdrawn after a certain period (currently 14 days) after requesting. This period value is identical to the one managed by Tokamak Network staking contract.
After requesting to unvote, you can still vote again for TON that have not yet been withdrawn. It is like re-staking of the Tokamak Network staking service.
This is the procedure to withdraw the TON requested for unvote. You can withdraw after a certain period (currently 14 days) after the request.
The DAO Committee of Tokamak Network is managed by a Committee contract. The Committee provides functions related to other tasks such as registration of candidates, management of member addition, change, removal, etc., and registration and execution of agendas.
The AO Committee can be defined as an organization with substantial voting rights on Tokamak DAO agendas. Tokamak Network DAO Committee is managed by a Committee Contract. The Committee Contract performs the main functions of DAO, such as registering candidates, adding, changing, and removing members, and registering and executing agenda.
- Voting on candidates (TON delegation)
All users can delegate (deposit) TON to any candidate of their choice and receive interest (newly issued TON, seigniorage) managed by the SeigManager contract.
- Agenda creation
All users can create an agenda by consuming a certain amount of TON as a fee.
Anyone can register as a candidate, and Layer 2 contracts managed by the SeigManager contract can also be registered as candidates. All candidates can use SeigManager contract features such as function updateSeigniorage() and adjusting commission rates.
All candidates can interact with the DAO contract through the Candidate contract. If the candidate is a Layer 2 contract, the operator can use the Candidate contract.
- Layer 2 and DAO candidate
It is also possible to register as a DAO candidate while the Layer 2 contract has already been registered. In this case, Layer 2 can operate as a multiple candidate while operating Layer 2. At this time, the management of Layer 2 and the activities as a candidate for DAO will be conducted by the Layer 2 operator.
In addition, the TON delegated to the Layer 2 contract is considered as the amount voted for the DAO candidate.
- Member Slot
The DAO contract has as many seats as the maximum number of members. The initial slot is assigned ZERO_ADDRESS, and each candidate can change members if they meet the criteria for selection of members.
- Member selection criteria
The amount of votes for the candidates is equal to the amount of TON each candidate has been delegated. This vote is managed by the SeigManager contract, and the amount includes the amount deposited by the candidate himself.
- Member replacement
If the number of votes for the candidate (the amount of TON deposited) is greater than the number of votes of a specific member, the candidate can occupy the slot of that member through the Candidate contract.
- Agenda proposal
Each agenda refers to an agenda that executes a specific function of specific contracts with a specific parameter, and these values are entered by the agenda creator when creating the agenda.
Anyone can create an agenda, and it burns a certain amount of TON as an agenda creation fee. This fee is currently 100 TON and can be adjusted.
- Agenda voting process
The agenda starts its notice period from the time it is created. It has a voting period after the notice period ends. The notice period and voting period have minimum values, and can be set when creating an agenda. Also, a passed agenda has an execution period, which can only be executed within the execution period and cannot be executed after it expires. The execution period has a common value for all agendas.
During the notice period, there is no change in the status of the agenda, and after the end of the notice period, the agenda member is determined by the committee member at the time the transaction occurs. Only members of the agenda can vote on the agenda, and the voting period begins when the first voting transaction occurs after the notice period.
During the voting period, voters can vote on the agenda. Voting is done in yes/no/abstain, and the voting result is changed when the quorum is satisfied. If the vote is confirmed by filling the quorum, the passed agenda cannot be executed immediately but after the voting period is over.
Passed agendas have a certain period of execution after the voting is over. Anyone can execute the agenda within the execution period and change the contract status of Tokamak Network according to the agenda.
DAO vault contains tokens that can be used through DAO. The tokens entering the vault include the amount allocated for part of the total issuance of TON (35% of the initial issuance), and part of the seigniorage (additional issuance) issued from Tokamak Network staking.
The agenda allows you to approve the tokens stored in the Vault. Target token is TON, WTON or token with token address entered.
Through the agenda, you can execute the function approve() on the tokens stored in the vault. Target token is TON, WTON or token with token address entered.
Tokens stored in the vault by agendas can be withdrawn immediately. Target token is TON, WTON or token with token address entered.
DAO candidate / Members / Voters by agenda
Below is a schematic diagram of the relationship between DAO candidates, members, and voters by agenda.
At the bottom of the diagram, different committee members are assigned to each agenda, and you can see the voting process accordingly.
Proxy pattern and upgradeable functions
Tokamak DAO is designed in consideration of the possibility of functional expansion and upgrade during the deployment and operation of the contract. The DAO Committee management contract is based on the DAO proxy pattern, which separates storage and logic.
Users can access DAO committee and basic services through the DAOCommitteeProxy contract. The DAOCommitteeProxy contract address is directly exposed to users and is managed as an address that does not change during service.
By using the function upgradeTo() in the DAOCommitteeProxy contract, you can expand and upgrade the DAO service by changing the address of the DAOCommittee contract in charge of the DAO service logic. Based on these structural features, DAO is expected to provide a more user-friendly and proactive user experience by allowing maintenance and upgrades to proceed smoothly without service interruption even in the process of using the contract.
Diagrams of the all DAO service contracts are as follows.