Client Incentives V1 (1/2): DAO logic & Auction House contract upgrades
TLDR
- This proposal upgrades the DAO logic & auction house contracts to support Client Incentives.
- We completed an audit with Sherlock covering all the changes.
- Once this proposal executes, there will be a follow up proposal to configure and initiate the Client Incentives contracts.
Context
We recently finished an audit with Sherlock (funded by proposal 505). We are now ready to move forward with deploying the first version of the Client Incentives contracts.
For more background on what Client Incentives are, as well as the contract changes, please see proposal 505.
Audit summary
No significant issues were found with the new DAO logic auction house contracts. A few issues were found in the Client Incentives rewards contract which could allow a malicious client to accrue more rewards than they should. All the issues were fixed and reviewed by the lead auditor.
The full audit report can be reviewed here.
Deployment plan
This proposal will upgrade the DAO logic and auction house contracts. It will not yet activate the client incentives program.
Changes in the DAO logic contract
- Propose and vote functions now accept an optional client ID parameter that Nouns frontends can populate with their ID.
- The DAO records which client ID contributed which interaction; this data is used in the Rewards contract to allocate financial rewards to clients.
- A small cleanup by zeroing out a no longer used storage variable (
voteSnapshotBlockSwitchProposalId
). This will allow us to reuse this storage in the future.
Changes in the Auction House contract:
- The bidding function (
createBid
) accepts an optional client ID parameter, and winning bids’ client IDs are captured in the AuctionHouse state, to be used by the Client Incentives Rewards contract. - We’re now capturing settlement history onchain, i.e. who won each auction and the winning bid ETH value.
- If needed, historic settlement history can be added by the DAO via proposal.
- The above changes will serve the Rewards contract with essential information for calculating client rewards, which are all configured as percentages of auction revenue in the relevant timeframe.
Auction house storage slots warm up
TLDR: We are asking the DAO for 6 ETH to “warm up” storage slots to reduce the gas cost of settling auctions in the future. Feel free to skip the details.
Details:
As part of the auction house upgrade, it now stores more data in storage upon auction settlement. Specifically, it saves a record with the price, timestamp and winner address. These additional storage writes cost more gas when settling an auction. In order to reduce the gas cost, we want to “warm up” many storage slots so that writing to them costs less gas (it costs less gas to write into a non-zero storage slot).
We will do this warm up while gas prices are relatively low. We are asking the DAO for 6 ETH to warm up the auction storage slots for the next ~5-10 years of auctions (exact amount depends on gas prices).
Any unused ETH will be sent back to the treasury.
Rewards contract deployment
Once the contracts are upgraded, we’ll deploy the Rewards
contract which will allow clients to register themselves.
We will create a followup proposal in which the DAO will configure the rewards parameters and fund the contract.
Proposal actions
The first 3 actions upgrade the NounsAuctionHouse. This includes an interim contract which performs a migration of the auction storage layout.
- auctionHouseProxyAdmin.upgrade(auctionHouseProxy, NounsAuctionHousePreV2Migration)
- auctionHouseProxy.migrate()
- auctionHouseProxyAdmin.upgrade(auctionHouseProxy, NounsAuctionHouseV2)
Actions 4 & 5 upgrade the DAO contract. Action 5 is a cleanup which removes a storage variable used temporarily in a previous upgrade.
- nounsDao._setImplementation(NounsDAOLogicV4)
- nounsDao._zeroOutVoteSnapshotBlockSwitchProposalId()
Action 6 sends 6 ETH to the verbs safe wallet. It will be used to warm up the auction house storage slots.
- verbsMultisig.transfer(6 eth)
Client Incentives V1 (1/2): DAO logic & Auction House contract upgrades
TLDR
- This proposal upgrades the DAO logic & auction house contracts to support Client Incentives.
- We completed an audit with Sherlock covering all the changes.
- Once this proposal executes, there will be a follow up proposal to configure and initiate the Client Incentives contracts.
Context
We recently finished an audit with Sherlock (funded by proposal 505). We are now ready to move forward with deploying the first version of the Client Incentives contracts.
For more background on what Client Incentives are, as well as the contract changes, please see proposal 505.
Audit summary
No significant issues were found with the new DAO logic auction house contracts. A few issues were found in the Client Incentives rewards contract which could allow a malicious client to accrue more rewards than they should. All the issues were fixed and reviewed by the lead auditor.
The full audit report can be reviewed here.
Deployment plan
This proposal will upgrade the DAO logic and auction house contracts. It will not yet activate the client incentives program.
Changes in the DAO logic contract
- Propose and vote functions now accept an optional client ID parameter that Nouns frontends can populate with their ID.
- The DAO records which client ID contributed which interaction; this data is used in the Rewards contract to allocate financial rewards to clients.
- A small cleanup by zeroing out a no longer used storage variable (
voteSnapshotBlockSwitchProposalId
). This will allow us to reuse this storage in the future.
Changes in the Auction House contract:
- The bidding function (
createBid
) accepts an optional client ID parameter, and winning bids’ client IDs are captured in the AuctionHouse state, to be used by the Client Incentives Rewards contract. - We’re now capturing settlement history onchain, i.e. who won each auction and the winning bid ETH value.
- If needed, historic settlement history can be added by the DAO via proposal.
- The above changes will serve the Rewards contract with essential information for calculating client rewards, which are all configured as percentages of auction revenue in the relevant timeframe.
Auction house storage slots warm up
TLDR: We are asking the DAO for 6 ETH to “warm up” storage slots to reduce the gas cost of settling auctions in the future. Feel free to skip the details.
Details:
As part of the auction house upgrade, it now stores more data in storage upon auction settlement. Specifically, it saves a record with the price, timestamp and winner address. These additional storage writes cost more gas when settling an auction. In order to reduce the gas cost, we want to “warm up” many storage slots so that writing to them costs less gas (it costs less gas to write into a non-zero storage slot).
We will do this warm up while gas prices are relatively low. We are asking the DAO for 6 ETH to warm up the auction storage slots for the next ~5-10 years of auctions (exact amount depends on gas prices).
Any unused ETH will be sent back to the treasury.
Rewards contract deployment
Once the contracts are upgraded, we’ll deploy the Rewards
contract which will allow clients to register themselves.
We will create a followup proposal in which the DAO will configure the rewards parameters and fund the contract.
Proposal actions
The first 3 actions upgrade the NounsAuctionHouse. This includes an interim contract which performs a migration of the auction storage layout.
- auctionHouseProxyAdmin.upgrade(auctionHouseProxy, NounsAuctionHousePreV2Migration)
- auctionHouseProxy.migrate()
- auctionHouseProxyAdmin.upgrade(auctionHouseProxy, NounsAuctionHouseV2)
Actions 4 & 5 upgrade the DAO contract. Action 5 is a cleanup which removes a storage variable used temporarily in a previous upgrade.
- nounsDao._setImplementation(NounsDAOLogicV4)
- nounsDao._zeroOutVoteSnapshotBlockSwitchProposalId()
Action 6 sends 6 ETH to the verbs safe wallet. It will be used to warm up the auction house storage slots.
- verbsMultisig.transfer(6 eth)