What is Agora, and how does it work?
Agora is an audited library of open source Plutus scripts that is used to create and govern decentralized organizations on Cardano. The protocol allows DAOs to operate completely on-chain, from deploying governor scripts to managing and voting on proposals.
Users deposit governance tokens into stakes, which allows them to create and vote on proposals. Voting weight is equal to the staked amount. These proposals specify smart contract effects on-chain that are executed if and only if the community-wide vote passes.
Example of proposal smart contract effects include:
- 1.Management of a treasury containing ADA and/or other assets.
- 2.Changing on-chain parameters that are meaningful to the DAO. For example, changing the amount of GT required vote in favor of a proposal for it to execute.
- 3.Swapping treasury assets
- 4.Staking DAO treasury assets
In Agora, these effects are arbitrary and can be added to the system at any point. This is useful, because it means proposals can adapt to changing needs and new proposal effects can be developed and implemented.
This section gives a very high level overview of the parts of Agora that are most relevant to your experience using Clarity. For a more detailed overview of the inner-workings of Agora, see the Agora Specs.
The token that enables individuals to take governance actions in an Agora DAO. This is identified by the token's unique Policy ID and hex-encoded name.
This is the smart contract that enforces the governance rules of a DAO on-chain. This contract can be customized to fit an individual organizations' needs. The following parameters are configurable and controlled by the governor contract:
- Governance Token
- The token used to grant governance power to DAO participants
- Proposal Approval Threshold
- The number of tokens that must be staked behind votes for a proposal for it to pass
- User Participation Thresholds
- The minimum amount of Governance Tokens a stake must hold to be used to either create or vote on a proposal.
- Maximum Proposals per Stake
- The maximum number of proposals one stake can be used to create.
- Vote Cool Down Period
- The amount of time that must pass after a DAO member submits a vote before they can retract it.
Stakes are how voting power is calculated in Agora. Stakes are used to lock a DAO member's Governance tokens to prevent double-counting votes. In Clarity, we call stakes 'Voting Power' for simplicity.
A DAO member's governance power is equal to the number of governance tokens they have locked in their stake. This power will be used to ensure the user meets the User Participation Thresholds set by the governor contract, and is used to weight votes submitted using the stake.
Stakes can be in several states which determine what can be done with them.
- Locked: Proposals are Locked when they are being used in a vote. The stake can still be used to create and vote on other Proposals, but the Stake cannot be edited or deleted. To edit or delete stakes, all votes using that stake must be retracted.
- Available: The stake can be used to create and vote on proposals. Governance Tokens behind the stake can be added or removed.
DAO members create Proposals for the DAO using Stakes.
Proposals allow DAO participants to hold community-wide votes on-chain. When a proposal is created, it must explicitly define what its effects will be if the proposal is passed.
Agora allows for any combination of smart contracts to be effects of a proposal. These 'effect' smart contracts will execute as proposed if and only if the proposal is passed by a community-wide vote.
DAO members cast Votes on Proposals using Stakes.
Votes are transactions that add a members's contribution to the Vote Tally and lock the Stake that was used to prevent double spending.
Voting on multiple proposals is also made possible, since the only thing that is prevented when a lock is placed is withdrawing and depositing governance tokens.
Votes can be in several states which determine what can be done with them and the Stakes they use.