Minimum viable implementation of a MKR token governance auction. Pool your tokens and sell their voting power to the highest bidder.
- Any MKR holder can lock their tokens in the contract.
- Every seven days, the contract holds an auction in which anyone can submit bids denominated in WETH (or any ERC20 specified at deployment).
- The highest bidder wins the right to control the MKR locked in the contract for the next seven days.
- MKR depositors are paid out after each auction for the proportion of the MKR they contributed.
- At the end of each cycle, MKR withdraws/deposits are permitted, and the process starts again.
For a more detailed write up on FakerDAO, and how it effects Maker governance incentives, read more on the ScopeLift blog.
- npm v6.5 (or later)
- node v11.6 (or later)
- Truffle v5.1 (or later)
- solc v0.5.16
- ganache-cli v6.9.1 (or later)
- An Infura ID (free account) or Ethereum node
Create a file called .env
that looks like the following:
export INFURA_ID=yourInfuraId
export EXCHANGE_ADDRESS=0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674
export WETH_HOLDER_ADDRESS=0xa71937147b55Deb8a530C7229C442Fd3F31b7db2
Then run the following commands:
npm install
cd app
npm install
- From the project root, start ganache with
npm run ganache
- In a new terminal window, run tests with
npm run test
This project is deployed on the Kovan test network at 0xBbb73EC8520c8D5cB1047635007C08bcE13A6Af0
.
All required Maker Kovan addresses can be found in abi/addresses.json
, and were
sourced from the Maker
changelog.
To interact with this contract as a depositor, you will need MKR. To get this:
- Click here to view the Write Contract tab of a Kovan token faucet
- Click Connect to Web3 to connect your wallet
- In the
gulp
method, enter0xAaF64BFCC32d0F15873a02163e7E500671a4ffcD
for thegem
input and put in your own address for theaddrs
input
To interact with this contract as a bidder, you will need WETH. To get this:
- Go to https://faucet.kovan.network/
- Follow the instructions to connect your GitHub and get 1 Kovan Ether.
- Click here to go to the Write Contract tab of the Kovan WETH contract
- Click Connect to Web3 to connect your wallet
- Scroll down to the
deposit
method, enter an amount of ETH to deposit, and click Write to complete the transaction