The aim of collector DAO is to buy valuable NFTs based on member proposals. The DAO supports following features:
- Anyone can become a member of the DAO by paying
1 ETH
membership fee - Member can create a proposal to buy NFT(s) from any NFT marketplace
- Members can vote on a proposal only once
- Any member can execute the passed proposal to buy the NFT(s) per the proposal
- The DAO governance contract also provides
EIP-712
compliant API to process a single or a batch of offline votes
Following is a voting mechanism for proposals to buy NFTs.
- A member creates the proposal. Proposal can have at most 5 actions specified.
- There is no voting delay and all members can start voting immediately
- Voting for a proposal will last for 1 day after proposal is created
- A member can cast vote
Against
orFor
proposal or canAbstain
.
a) Each member will have vote weight based on membership age.1 day of membership = 1 vote weight
. Minimum vote weight is 1.
b) For quorum requirements, member vote without weight will be used.
c) To meet quorum, at least 5 or 25% or more of all members have to vote by voting period ends - After end of voting period, no one can vote anymore.
Proposal is deemed passed if quorum has reached & total for votes are greater or equal to against votes,
otherwise a proposal is deemed defeated.
Abstained votes are only used for quorum requirements. - If a proposal has been passed, then any member can execute the proposal.
No delay after proposal is passed, immediate execution. Passed
proposal will be consideredexpired
if it is not executed successfully or was not executed at all within 2 days after creation
-
No voting delay:
For NFTs price can move fast, so having no delay is better.
Tradeoff: members may miss the vote because of urgency -
Voting period is 1 day:
If proposal doesn't pass in a day, it is considered defeated
For NFTs price can move fast, quick decision is better.
Tradeoff: members may miss the vote because of urgency -
Voting weight is based on membership age:
Members accrue 1 vote per each day of membership. This gives more weight to longtime DAO members.
Tradeoff: this may cause membership decline over time. One other option would be to cap the vote weight after some time. -
Members can have many proposals at a time: This implementation doesn't restrict member with max proposals or total max at a time.
Tradeoff: there is potential for denial of service attack by flooding the proposal system.
One deterrent is the cost to create proposals -
Block.number for timing instead of block.timestamp:
block.number
would have better guard against the time manipulation.
- 1 member 1 vote with same weight
There is no incentive for long term participation - New member can't propose until 5 days after becoming member
This may provide some deterrent to flooding the system with proposals - Governance token based voting power
This may be the better solution, but main problem is complexities involved. It also increases attack surface area.
This project uses following technologies & tools:
Solidity
for smart contract developmentHardhat
for local ethereum network & running testsJavaScript, Ethers, Waffle/Chai
for unit testingESLint, Prettier & Solhint
for code stylingsolidity-coverage
for code coverage
- Clone repo using
git
- Run
npm install
from project directory - Open terminal & run tests :
npx hardhat test