There are a few core concepts we see repeating with most new projects;
- Token governance
- Liquidity provision for token
The norm is to have a stop gap with a multisig contract until 1–3 are established. To help project expedite this process I have created 2 contract factories;
Liquidity Factory 0x323B2b67Ed1a745e5208ac18625ecef187a421D0
The job of this factory is simple; create a contract that incentivizes liquidity for the token provided. This then signals this contract as the “vote” for governance. The contract includes vote delegation both on-chain and off-chain.
To create a new Liquidity Factory simply call deploy(lp, reward, rewardDistribution, decimals, name, symbol).
LP is the liquidity pair (uniswap/balancer/curve) output token.
Reward is the incentive that will be provided, normally in the form of token.
RewardDistribution is the contract responsible for providing the reward, normally token contract.
Decimals, name, and symbol are for governance purposes (such as snapshot).
This will then allow anyone staking LP tokens to have a governing say in the token/protocol as well as provide standard delegation functionality.
Governance Factory 0x4179Ef5dC359A4f73D5A14aF264f759052325bc1
Governance Factory combines Governance Alpha and Timelock into a single execution contract. This includes standard 7 day voting period, configurable threshold and quorum (set via governance itself), 1 day timelock (up to 30 days). All the contract needs is a token contract or similar that has getPriorVotes() defined (in this case the LP contract above).
To create a new GovernanceTimelock simply call deploy(voter), with voter being the contract that implements getPriorVotes (such as Reward distribution above).
If you are a new project looking for a boilerplate Liquidity Provision + Delegation + Governance + Timelock solution, all you need to do is create your token, provide liquidity to uniswap/balancer, and then call the two deploy functions. No multisig required and you have a fully configurable decentralized solution.