Repository navigation
Contract delegate #5
Description
Activity
I started working on this, I have a very rudimentary version that can serve as an MVP
https://github.com/Turupawn/DelegatableUpdates:
1. Successful DelegatableZero trial launch
The
DelegatableZerocontract is a very naive Delegatable Contract implementation where the contract owner (in this case me, but can be something like a multisig) can decide who the delegate throughsetDelegateis (in this case Joxes) who can cast votes. So token holders can delegate to the smart contract and the delegator can executecastVotefrom within the contract to use it's voting power. To test it we did the following:- I launched the DelegatableZero contract
- I Set Joxes as Delegate
- The Agora team helped us by making a dummy proposal in their Governance test contract deployed on Optimism Mainnet
- delegated to the DelegatableZero contract
- and finally Joxes casted a vote
contract DelegatableZero is Ownable { address public delegate; constructor() Ownable(msg.sender) {} function setDelegate(address delegate_) public onlyOwner { delegate = delegate_; } function castVote( address governorAddress, uint256 proposalId, uint8 support, string calldata reason) public { require(msg.sender == delegate, "Only delegate can cast votes"); IGovernor(governorAddress).castVoteWithReason(proposalId, support, reason); } }
2. We need a name for this project
We need a name that:
- Makes it clear that this is for helping expressing on-chain the mechanics of an Governance Organization such a Seed latam
- Stands apart of other projects where you would want to delegate to or from a smart contract, such as Liquid delegation alternatives
Having a good name would help to explain more efficiently what we're doing
3. The Alligator
@yitongzhang , who helped us maiking the dummy proposal for the DelegatableZero contract, also recommended to us to checkout the Alligator contract, although the Alligator contract purpose is serve as a better alternative to liquid delegation, it has the codebase for making that a contract interacts with the Governor as a Proxy. It would be nice to use the same codebase as a library or abstract contract that we can extend and have all different available
castVotealternatives.4. Moving on
Next steps are:
- Testing this in other governor contracts
- Try to implement the Alligator contract as an abstract contract library
- Start experimenting with expressing SEED latam internal mechanics on solidity
- ???
Abstract
Devs, delegates and researchers are needed for creating a system where token holders delegate to a Smart Contract instead of a single delegate EOA.
Context
What if instead of delegating to a specific delegate we delegate to a more complex organization? At present time, SEED Latam is a complex organization composed of many researchers and a delegate that executes votes on chain and delegators choose to delegate to the delegator that SEED Latam proposes because they trust SEED Latam judgement. I think other organizations like this are to come so we need contracts that help expressing what really happens in such organizations.
Delegating to a Smart Contract can unlock stuff such as a delegate retiring gracefully, taking vacations or a community bypassing a delegate vote.
What is needed
I think a first MVP can be a Smart Contract where people delegate to, and where a multisig can choose a Delegate. Only the delegate should be able to execute
castVotefunctionon on that Smart Contract.