Lil Nouns Time Lock Vault Contract
Following requests from a few community members, I’ve put together this spec for a time-based pausing mechanism to secure our stacked tokens and Nouns. This aims to give DAO members peace of mind by preventing potential attacks or issues after lowering the reserve price.
If this spec gets a thumbs up in the vote, I’ll start building the smart contract as part of my free contributions to the DAO. However, the DAO should approve and pay the cost of the audit and deployment. Once approved, I’ll provide a detailed deployment timeline and the codes in a follow-up proposal if you want to go further.
Since the proposal cannot be created without transactions, this proposal includes a transaction that sends 0.00069 ETH to the auto bidder contract.
Specification for Lil Nouns Time Lock Vault Contract
Abstract: This proposal outlines the implementation of an upgradeable smart contract with a time-based pausing mechanism, using pre-audited libraries. The contract will handle stacked tokens and Nouns NFTs and ensure that withdrawals and upgrades can only occur outside the specified pause period. All functions, including the delegation of Nouns NFTs, can only be called through Lil Nouns proposals.
Objectives
- Implement a pausable contract that can be paused and unpaused based on a specific time period.
- Ensure the contract can receive and handle stacked tokens and Nouns NFTs.
- Restrict withdrawals of stacked tokens and Nouns NFTs to times outside the pause period.
- Prevent changing the pause period while the contract is paused.
- Ensure the contract is upgradeable for future enhancements.
- Prevent upgrades during the pause period.
- Allow delegation for Nouns NFTs to be changed at any time.
- Ensure all functions can only be called through Lil Nouns proposals.
Implementation
Key Variables
- Start Time of Pause Period: The time when the pause period begins.
- End Time of Pause Period: The time when the pause period ends.
Set Pause Period
Implement a function to define the start and end times of the pause period. This function will initially pause the contract and can only be called when the contract is not paused.
Time-Based Condition
Create a custom condition to restrict function execution to times outside the pause period.
Pausing Functions
Ensure that the pausing and unpausing functions include checks to allow their execution only outside the pause period.
Handling Tokens and Nouns NFTs
Implement functions to handle the receipt, withdrawal, and delegation of stacked tokens and Nouns NFTs. These functions will only allow withdrawals when the contract is not paused based on the time period.
Preventing Upgrades During Pause
Apply a custom condition to the upgrade function to prevent contract upgrades during the pause period.
Proposal-Based Access Control
Ensure that all functions can only be called through Lil Nouns proposals.
Digital Asset Handling
Implement a function to handle the receipt of Nouns NFTs.
Withdrawal Functions
Implement functions to withdraw stacked tokens and Nouns NFTs, ensuring they can only be executed when the contract is not paused based on the time period.
Delegation Functions
Implement functions to delegate voting power for Nouns NFTs to a specified address. Delegation can be changed at any time, regardless of the contract’s pause state.
Upgrade Functions
Implement functions to upgrade the contract, ensuring they can only be executed when the contract is not paused based on the time period.
Proposal-Based Access Control
Implement a mechanism to ensure that all functions, including pausing, unpausing, setting the pause period, handling tokens, withdrawing assets, delegating Nouns NFTs, and upgrading the contract, can only be called through Lil Nouns proposals.
Rationale
Using pre-audited libraries ensures a high level of security and reduces the need for extensive audits. This approach ensures that contract operations are controlled and secure, particularly in terms of pausing, unpausing, upgrading, and delegating, which are all time-based. The ability to receive and manage stacked tokens and Nouns NFTs enhances its utility, and restricting withdrawals and upgrades to non-pause periods adds an additional layer of security. Allowing delegation changes at any time provides flexibility for managing voting power. Ensuring that all functions can only be called through Lil Nouns proposals adds a layer of governance and security, ensuring that actions are only taken through a collective decision-making process.
| Voter | Cast Power | Vote & Rationale |
|---|---|---|
0x6CF8...6F582e | 108 | FOR |
0x9e0e...5257B1 | 99 | FOR |
0x4CB8...f3E4eC | 42 | FOR |
0xae47...915Fed | 12 | FOR |
0xa1a2...3Ee083 | 12 | FOR |
VOTE POWER
Proposal Status
- Tue July 30 2024, 02:14 amVoting Period Starts
- Thu August 01 2024, 08:20 pmEnd Voting Period
- Queue Proposal
- Execute Proposal
Current Results
1-FOR
299
2-ABSTAIN
3
3-AGAINST
N/A Tokens
