I agree with these changes, hereβs the final spec that we can go with.
Fee Collection Candidate v0.2
interface FeeCollectionContract {
function deposit () {} // called by whitelisted address
function setSplitRatio(uint ratio) {} // ratio of fees sent SmartTreasury vs FeeTreasury
function setFeeTreasuryAddress(address newFeeTreasuryAddress) {} // called by admin
function setSmartTreasuryAddress(address newSmartTreasuryAddress) {} // If for any reason the pool needs to be migrated, call this function. Called by admin
function addAddressToWhiteList(address addressToAdd) {} // Whitelist address. Called by admin
function removeAddressFromWhiteList(address addressToRemove) {} // Remove from whitelist. Called by admin
function addTokenToDepositList(address tokenAddress){} // Register a token which can converted to ETH and deposited to smart treasury. Called by admin
function removeTokenFromDepositList(address tokenAddress) {} // Unregister a token. Called by admin
function withdraw(address toAddress) {} // withdraw balancer liquidity token to address. Called by admin
function setAdmin(address newAdmin) {} // called by admin
}
withdraw() method is used incase liquidity needs to be partially removed from treasury, as @william described.
This also means that the bootstrapping mechanism is slightly different. And also Iβve included the recommendation to use spot price with an oracle.
Bootstrapping Mechanism Candidate v0.3
The mechanism for initially funding the smart treasury using the ecosystem fund, and fee treasury.
- Deploy Smart Treasury bootstrapping smart contract (BSC)
- Withdraw 130,000 IDLE from ecosystem fund (representing 1% of supply) and deposit to BSC
- Withdraw all assets from FeeTreasury to BSC
- Convert FeeTreasury assets to ETH in BSC
- Retrieve IDLE/ETH conversion rate using an oracle.
- If ETH value != 1,300 IDLE (1% of 130,000), sell UP TO 1300 IDLE on the open market until ETH value is equivalent to 1% of IDLE deposit (as defined in step 4)
- Convert ETH to WETH (Balancer only supports WETH)
- Deposit IDLE & WETH into the pool, bootstrapping the smart treasury.
- Send BalancerPoolToken to FeeCollection Contract. (Token representing stake in pool).
- Set pool controller as an address governance controls. (calling
setController()
)
I will leave this spec open for a few days for feedback, but after this, I think we are ready for the next phase. Looking forward to guidance by @Teo and @william to support with this .