Skip to content

Instantly share code, notes, and snippets.

@bowd

bowd/cgp.json Secret

Last active February 7, 2024 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bowd/8b42fb1e89ced96576973804c2c3ef1f to your computer and use it in GitHub Desktop.
Save bowd/8b42fb1e89ced96576973804c2c3ef1f to your computer and use it in GitHub Desktop.
Draft of Governance Proposal to Return Celo from the Mento Reserve to the community fund
[
{
"contract": "StableTokenV2",
"address": "0x765DE816845861e75A25fCA122bb6898B8B1282a",
"function": "setExchange",
"args": ["0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972"],
"value": "0"
},
{
"contract": "StableToken",
"address": "0x765DE816845861e75A25fCA122bb6898B8B1282a",
"function": "mint",
"args": [
"0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972",
"10000000000000000000000000"
],
"value": "0"
},
{
"contract": "StableTokenV2",
"address": "0x765DE816845861e75A25fCA122bb6898B8B1282a",
"function": "setExchange",
"args": ["0x0000000000000000000000000000000000000000"],
"value": "0"
},
{
"address": "0xf4cab10dC19695AaCe14b7A16d7705b600ad5F73",
"function": "transfer(address,uint256)",
"args": [
"0x87647780180B8f55980C7D3fFeFe08a9B29e9aE1",
"20001239154911011864219072"
],
"value": "0"
},
{
"contract": "Governance",
"address": "0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972",
"function": "setMinDeposit",
"args": ["10000000000000000000000"],
"value": "0"
},
{
"contract": "GoldToken",
"address": "0x471EcE3750Da237f93B8E339c536989b8978a438",
"function": "increaseAllowance",
"args": [
"0x71f433514957d00287A9d33Da759f1e0C1732381",
"700000000000000000000000"
],
"value": "0"
},
{
"contract": "StableToken",
"address": "0x765DE816845861e75A25fCA122bb6898B8B1282a",
"function": "increaseAllowance",
"args": [
"0x71f433514957d00287A9d33Da759f1e0C1732381",
"1700000000000000000000000"
],
"value": "0"
}
]

Description

The intent of the CGP is to:

  1. mint 10mil cUSD to the Celo Governance contract
  2. transfer curve LP tokens from the Governance contract to the Mento Reserve
  3. increase the minimum deposit required for CGP submission to 10k (from 100)
  4. incrase allowances of the Celo Community Fund Spender multisig on Celo Governance assets

Through this document I will refere to governance as the Celo Governance contract and also the Celo Community Fund, as it currently servers both purposes.

Transactions

(1) Mint cUSD

TX#0 cUSD.setExchange(governance)

We will temporarily register governance as the token's exchange, thus giving it minting rights.

TX#1 cUSD.mint(governance, 1e7 * 1e18)

Mint 10mil cUSD to the Celo Community Fund (i.e. the governance contract).

TX#2 cUSD.setExchange(address(0))

Undos TX#7.

We're setting to address(0) because exchanges are a deprecated feature of Mento V1.

(2) Transfer LP tokens

TX#3 cUSDUSDC_CurvePool.transfer(mentoReserveMultisig, 20001239154911011864219072)

Transfer LP tokens for the cUSDUSDC curve pool back to the Mento Reserve.

(3) Increase the minimum deposit

TX#4 Governance.setMinDeposit(10000 * 1e18)

Increase the minimum deposit required for governance proposal to 10k Celo.

(4) Increase the allowence for the Celo Community Fund Spender multisig

TX#5 GoldToken.increaseAllowance(communityFundSpender, 700000 * 1e18)

Add 700000 Celo to the spender allowance.

TX#6 cUSD.increaseAllowance(communityFundSpender, 1700000 * 1e18)

Add 1700000 cUSD to the spender allowance.

Traces:
[9541553] SimulateUpgrade::run(ReturnCelo)
├─ [0] VM::createFork(celo)
│ └─ ← 1
├─ [0] VM::selectFork(1)
│ └─ ← ()
├─ [0] VM::startPrank(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972])
│ └─ ← ()
├─ [26795] MentoReserve::addSpender(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972])
│ ├─ [25901] 0xfD9651862Bc1965349E92073152112289393b57d::addSpender(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972]) [delegatecall]
│ │ ├─ emit SpenderAdded(param0: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972])
│ │ └─ ← ()
│ └─ ← ()
├─ [5811] MentoReserve::setDailySpendingRatio(1000000000000000000000000 [1e24])
│ ├─ [4917] 0xfD9651862Bc1965349E92073152112289393b57d::setDailySpendingRatio(1000000000000000000000000 [1e24]) [delegatecall]
│ │ ├─ emit DailySpendingRatioSet(: 1000000000000000000000000 [1e24])
│ │ └─ ← ()
│ └─ ← ()
├─ [50206] MentoReserve::addOtherReserveAddress(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972])
│ ├─ [49306] 0xfD9651862Bc1965349E92073152112289393b57d::addOtherReserveAddress(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972]) [delegatecall]
│ │ ├─ emit OtherReserveAddressAdded(param0: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972])
│ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
│ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
├─ [40153] MentoReserve::transferGold(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], 41633000000000000000000000 [4.163e25])
│ ├─ [39247] 0xfD9651862Bc1965349E92073152112289393b57d::transferGold(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], 41633000000000000000000000 [4.163e25]) [delegatecall]
│ │ ├─ [5333] Governance::fallback{value: 41633000000000000000000000}()
│ │ │ ├─ [70] 0x1914EA95139FEd935a524984497895619B347F46::fallback() [delegatecall]
│ │ │ │ └─ ← ()
│ │ │ └─ ← ()
│ │ ├─ emit ReserveGoldTransferred(param0: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], param1: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], param2: 41633000000000000000000000 [4.163e25])
│ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
│ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
├─ [4722] MentoReserve::removeOtherReserveAddress(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], 2)
│ ├─ [3997] 0xfD9651862Bc1965349E92073152112289393b57d::removeOtherReserveAddress(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], 2) [delegatecall]
│ │ ├─ emit OtherReserveAddressRemoved(param0: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], param1: 2)
│ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
│ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
├─ [2409] MentoReserve::setDailySpendingRatio(50000000000000000000000 [5e22])
│ ├─ [1694] 0xfD9651862Bc1965349E92073152112289393b57d::setDailySpendingRatio(50000000000000000000000 [5e22]) [delegatecall]
│ │ ├─ emit DailySpendingRatioSet(: 50000000000000000000000 [5e22])
│ │ └─ ← ()
│ └─ ← ()
├─ [2452] MentoReserve::removeSpender(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972])
│ ├─ [1737] 0xfD9651862Bc1965349E92073152112289393b57d::removeSpender(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972]) [delegatecall]
│ │ ├─ emit SpenderRemoved(param0: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972])
│ │ └─ ← ()
│ └─ ← ()
├─ [31207] cUSD::setExchange(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972])
│ ├─ [25813] 0x434563B0604BE100F04B7Ae485BcafE3c9D8850E::setExchange(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972]) [delegatecall]
│ │ ├─ emit topic 0: 0x403871c8d404db2d13402bd857192acd8f680acd7f2d6e1e5bf2128d013d7eaa
│ │ │ data: 0x000000000000000000000000d533ca259b330c7a88f74e000a3faea2d63b7972
│ │ └─ ← ()
│ └─ ← ()
├─ [17777] cUSD::mint(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], 10000000000000000000000000 [1e25])
│ ├─ [16871] 0x434563B0604BE100F04B7Ae485BcafE3c9D8850E::mint(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], 10000000000000000000000000 [1e25]) [delegatecall]
│ │ ├─ emit Transfer(param0: 0x0000000000000000000000000000000000000000, param1: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], param2: 10000000000000000000000000 [1e25])
│ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
│ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
├─ [2246] cUSD::setExchange(0x0000000000000000000000000000000000000000)
│ ├─ [1531] 0x434563B0604BE100F04B7Ae485BcafE3c9D8850E::setExchange(0x0000000000000000000000000000000000000000) [delegatecall]
│ │ ├─ emit topic 0: 0x403871c8d404db2d13402bd857192acd8f680acd7f2d6e1e5bf2128d013d7eaa
│ │ │ data: 0x0000000000000000000000000000000000000000000000000000000000000000
│ │ └─ ← ()
│ └─ ← ()
├─ [22794] Curve LP Token::transfer(MentoReserveMultiSig: [0x87647780180B8f55980C7D3fFeFe08a9B29e9aE1], 20001239154911011864219072 [2e25])
│ ├─ [22616] 0xfEE7166C32Bdf6356Ef60636f43400AA55551A96::transfer(MentoReserveMultiSig: [0x87647780180B8f55980C7D3fFeFe08a9B29e9aE1], 20001239154911011864219072 [2e25]) [delegatecall]
│ │ ├─ emit Transfer(param0: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], param1: MentoReserveMultiSig: [0x87647780180B8f55980C7D3fFeFe08a9B29e9aE1], param2: 20001239154911011864219072 [2e25])
│ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
│ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
├─ [9673] Governance::setMinDeposit(10000000000000000000000 [1e22])
│ ├─ [8779] 0x1914EA95139FEd935a524984497895619B347F46::setMinDeposit(10000000000000000000000 [1e22]) [delegatecall]
│ │ ├─ emit MinDepositSet(: 10000000000000000000000 [1e22])
│ │ └─ ← ()
│ └─ ← ()
├─ [30293] CELO::increaseAllowance(CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381], 700000000000000000000000 [7e23])
│ ├─ [24887] 0xcB8710e072aC4700eE7eD0C63B2f2102366a7a39::increaseAllowance(CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381], 700000000000000000000000 [7e23]) [delegatecall]
│ │ ├─ emit Approval(param0: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], param1: CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381], param2: 700000000000000000000000 [7e23])
│ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
│ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
├─ [25618] cUSD::increaseAllowance(CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381], 1700000000000000000000000 [1.7e24])
│ ├─ [24712] 0x434563B0604BE100F04B7Ae485BcafE3c9D8850E::increaseAllowance(CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381], 1700000000000000000000000 [1.7e24]) [delegatecall]
│ │ ├─ emit Approval(param0: Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], param1: CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381], param2: 1700000000000000000000000 [1.7e24])
│ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
│ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000001
├─ [0] console::log(Proposal was simulated successfully.) [staticcall]
│ └─ ← ()
├─ [0] VM::stopPrank()
│ └─ ← ()
├─ [467] ReturnCelo::hasChecks()
│ └─ ← true
├─ [162181] ReturnCeloChecks::run()
│ ├─ [1872] 0x000000000000000000000000000000000000ce10::getAddressForString(Governance) [staticcall]
│ │ ├─ [960] 0x203fdf86A00999107Df531fa00b4bA81d674cb66::getAddressForString(Governance) [delegatecall]
│ │ │ └─ ← 0x000000000000000000000000d533ca259b330c7a88f74e000a3faea2d63b7972
│ │ └─ ← 0x000000000000000000000000d533ca259b330c7a88f74e000a3faea2d63b7972
│ ├─ [1872] 0x000000000000000000000000000000000000ce10::getAddressForString(Reserve) [staticcall]
│ │ ├─ [960] 0x203fdf86A00999107Df531fa00b4bA81d674cb66::getAddressForString(Reserve) [delegatecall]
│ │ │ └─ ← 0x0000000000000000000000009380fa34fd9e4fd14c06305fd7b6199089ed4eb9
│ │ └─ ← 0x0000000000000000000000009380fa34fd9e4fd14c06305fd7b6199089ed4eb9
│ ├─ [1872] 0x000000000000000000000000000000000000ce10::getAddressForString(StableToken) [staticcall]
│ │ ├─ [960] 0x203fdf86A00999107Df531fa00b4bA81d674cb66::getAddressForString(StableToken) [delegatecall]
│ │ │ └─ ← 0x000000000000000000000000765de816845861e75a25fca122bb6898b8b1282a
│ │ └─ ← 0x000000000000000000000000765de816845861e75a25fca122bb6898b8b1282a
│ ├─ [1872] 0x000000000000000000000000000000000000ce10::getAddressForString(GoldToken) [staticcall]
│ │ ├─ [960] 0x203fdf86A00999107Df531fa00b4bA81d674cb66::getAddressForString(GoldToken) [delegatecall]
│ │ │ └─ ← 0x000000000000000000000000471ece3750da237f93b8e339c536989b8978a438
│ │ └─ ← 0x000000000000000000000000471ece3750da237f93b8e339c536989b8978a438
│ ├─ [1872] 0x000000000000000000000000000000000000ce10::getAddressForString(Reserve) [staticcall]
│ │ ├─ [960] 0x203fdf86A00999107Df531fa00b4bA81d674cb66::getAddressForString(Reserve) [delegatecall]
│ │ │ └─ ← 0x0000000000000000000000009380fa34fd9e4fd14c06305fd7b6199089ed4eb9
│ │ └─ ← 0x0000000000000000000000009380fa34fd9e4fd14c06305fd7b6199089ed4eb9
│ ├─ [0] VM::label(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], Governance)
│ │ └─ ← ()
│ ├─ [0] VM::label(CELO: [0x471EcE3750Da237f93B8E339c536989b8978a438], CELO)
│ │ └─ ← ()
│ ├─ [0] VM::label(cUSD: [0x765DE816845861e75A25fCA122bb6898B8B1282a], cUSD)
│ │ └─ ← ()
│ ├─ [0] VM::label(Curve LP Token: [0xf4cab10dC19695AaCe14b7A16d7705b600ad5F73], Curve LP Token)
│ │ └─ ← ()
│ ├─ [0] VM::label(MentoReserveMultiSig: [0x87647780180B8f55980C7D3fFeFe08a9B29e9aE1], MentoReserveMultiSig)
│ │ └─ ← ()
│ ├─ [0] VM::label(CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381], CommunitySpender)
│ │ └─ ← ()
│ ├─ [0] VM::label(MentoReserve: [0x9380fA34Fd9e4Fd14c06305fd7B6199089eD4eb9], MentoReserve)
│ │ └─ ← ()
│ ├─ [1401] CELO::balanceOf(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972]) [staticcall]
│ │ ├─ [501] 0xcB8710e072aC4700eE7eD0C63B2f2102366a7a39::balanceOf(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972]) [delegatecall]
│ │ │ └─ ← 0x00000000000000000000000000000000000000000037c769a6206d2da614a27b
│ │ └─ ← 0x00000000000000000000000000000000000000000037c769a6206d2da614a27b
│ ├─ [1371] Curve LP Token::balanceOf(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972]) [staticcall]
│ │ ├─ [1199] 0xfEE7166C32Bdf6356Ef60636f43400AA55551A96::balanceOf(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972]) [delegatecall]
│ │ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000000
│ │ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000000
│ ├─ [1312] Governance::minDeposit()
│ │ ├─ [418] 0x1914EA95139FEd935a524984497895619B347F46::minDeposit() [delegatecall]
│ │ │ └─ ← 0x00000000000000000000000000000000000000000000021e19e0c9bab2400000
│ │ └─ ← 0x00000000000000000000000000000000000000000000021e19e0c9bab2400000
│ ├─ [2021] cUSD::allowance(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381]) [staticcall]
│ │ ├─ [1115] 0x434563B0604BE100F04B7Ae485BcafE3c9D8850E::allowance(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381]) [delegatecall]
│ │ │ └─ ← 0x0000000000000000000000000000000000000000000167fd2f45f5fa5e800000
│ │ └─ ← 0x0000000000000000000000000000000000000000000167fd2f45f5fa5e800000
│ ├─ [1593] CELO::allowance(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381]) [staticcall]
│ │ ├─ [687] 0xcB8710e072aC4700eE7eD0C63B2f2102366a7a39::allowance(Governance: [0xD533Ca259b330c7A88f74E000a3FaEa2d63B7972], CommunitySpender: [0x71f433514957d00287A9d33Da759f1e0C1732381]) [delegatecall]
│ │ │ └─ ← 0x00000000000000000000000000000000000000000000943b1377290cbd800000
│ │ └─ ← 0x00000000000000000000000000000000000000000000943b1377290cbd800000
│ └─ ← ()
└─ ← ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment