From 96ee671c2a49f47b8d36c67cbf4e082351d95591 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 12:08:03 +0000 Subject: [PATCH 1/4] [PIPELINE] Committed IPFS uploads --- content/ipfs-dips/DIP-28-Ipfs-hashes.json | 5 +++++ content/ipfs-dips/all-dips.json | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 content/ipfs-dips/DIP-28-Ipfs-hashes.json diff --git a/content/ipfs-dips/DIP-28-Ipfs-hashes.json b/content/ipfs-dips/DIP-28-Ipfs-hashes.json new file mode 100644 index 0000000..3b4221b --- /dev/null +++ b/content/ipfs-dips/DIP-28-Ipfs-hashes.json @@ -0,0 +1,5 @@ +{ + "dip": "27", + "hash": "QmZdvSGZWUZgzyb2SmZ5wjwsWXYLHa2YoosBbuyz3wxJwJ", + "encodedHash": "0xa7dd36632bed22abe40b2ca6aa80d2a2a47efda0dc1d4bbfce2a67a010736729" +} \ No newline at end of file diff --git a/content/ipfs-dips/all-dips.json b/content/ipfs-dips/all-dips.json index 142d783..e993d76 100644 --- a/content/ipfs-dips/all-dips.json +++ b/content/ipfs-dips/all-dips.json @@ -279,6 +279,20 @@ "ipfsHash": "QmQXvKyPA77DiRWVJ8UAPMHv9coJeCKcJ65f3Ju5YsnPrJ", "encodeIpfsHash": "0x209a6c29fe5f12006eb5fd50d668fe8fe4529e4e80e757efdce5cbdce73bf8cb" }, + { + "DIP": 28, + "title": "Amendments to the dYdX Operations Trust Instrument", + "status": "Accepted", + "author": "Callen Wintermute (@callenwm)", + "shortDescription": "Amend the dYdX Operations Trust to reflect the purposes under the DOT 2.0 mandate and add language that all Trustees must operate compliantly with all applicable laws and regulations.", + "discussions": "https://dydx.forum/t/drc-amendments-to-the-dydx-operations-trust-instrument/1054", + "created": "2023-09-12T00:00:00.000Z", + "preview": "## Simple Summary\n\nThe dYdX Operations Trust (DOT 2.0) proposed the …", + "basename": "DIP-28", + "description": "\n\n## Simple Summary\n\nThe dYdX Operations Trust (DOT 2.0) proposed the following:\n\nAn amendment to the dYdX Operations Trust Instrument that requires all Trustees to operate compliantly with all laws, regulations, and rules applicable to their duties and obligations as described in the Trust Instrument.\nAn amendment to the dYdX Operations Trust Instrument that updates the “PURPOSES” of the Trust to reflect the mandate approved by the community in this [Snapshot vote](https://snapshot.org/#/dydxgov.eth/proposal/0x51659bfec4948e80c0b85316d3098e62ab085a95033f1c0fe6bcc72db3ebe814).\n\n## Abstract\n\nFollowing the successful [Snapshot vote](https://snapshot.org/#/dydxgov.eth/proposal/0x51659bfec4948e80c0b85316d3098e62ab085a95033f1c0fe6bcc72db3ebe814) to extend and fund the operations of the dYdX Operations Trust (DOT 2.0), the [original Trust Instrument](https://drive.google.com/file/d/127DYP3MFt5PLdjxK0hHOrLeNWSNug75r/view?usp=sharing) was [amended](https://drive.google.com/file/d/1rVYm_fAduBEQz8U7Pvfc1za4s_dqmFWT/view?usp=sharing) to reflect the [DOT 2.0 mandate](https://dydx.community/dashboard/proposal/13) approved through dYdX governance by the dYdX community. \n\nFurthermore, after discussing with legal counsel it was recommended to add a clause that requires all Trustees to operate in compliance with all laws, regulations, and rules applicable to their duties under the Trust Instrument.\n\nThe dYdX community has approved this proposal via a [Snapshot vote](https://snapshot.org/#/dydxgov.eth/proposal/0x46c40ddea980c824fd7787f9b73b6b1a842162dee8d155ad08a4d90a93dd333e) with 12M DYDX (99.5% of total votes) in favor of the proposal and 5.5k DYDX against the proposal.\n\n\n## Motivation\n\nDOT 2.0 is a significant evolution from DOT 1.0 as described in the DOT 2.0 [mandate](https://dydx.forum/t/drc-amendments-to-the-dydx-operations-trust-instrument/1054) and therefore, an amendment to the original Trust Instrument was required.\n\nSeparately, we have included a provision that requires all Trustees to operate in compliance with all laws, rules and regulations applicable to their duties under the Trust. This was not clearly stated in the previous version of the Trust Instrument.\n\n## Specification\n\nWe are proposing the following changes to the Trust Instrument - these changes have been drafted in coordination with our legal counsel.\n\nThe original Purposes section “Schedule 3” is drafted as follows:\n\n*PURPOSES*\n\n“*The Purposes of the Settlement are to:\n\n1. receive funds from the dYdX Community, including Ethereum based tokens, and retain the same unless and until they are required to be converted to cash or equivalents and/or distributed for the remaining Purposes of this Settlement;\n\n2. apply funds received from the dYdX Community to meet the ongoing operational costs and expenses, including (without limitation):\n(a) fees for professional services, such as lawyer and accountancy fees; and \n(b) costs for online service providers;\n\n3. manage administrative processes to support the Purposes listed at paragraphs 1 and 2 of this schedule 3, including (without limitation), opening and managing any one or more bank accounts in the names of the Trustees; and\n\n4. do all other acts and things that may be incidental to, or desirable, to further the above Purposes as the Trustees may in their discretion think fit.*”\n\nWe propose to replace it with this new version:\n\n*PURPOSES*\n\n“*The Purposes of the Settlement are to:\n\n1. receive funds from the dYdX Community, including Ethereum based tokens, and\nretain the same unless and until they are required to be converted to cash or\nequivalents and/or distributed for the remaining Purposes of this Settlement;\n\n2. deploy and operate the following for the mainnet deployment of the dYdX V4\nopen-source software (the dYdX Chain):\n\n(a) a website user interface;\n(b) an Android application; and\n(c) an IOS application;\n\n3. identify and contract:\n\n(a) an indexer operator for the dYdX Chain;\n(b) a user support team to support the dYdX Community with any issues or\nenquiries related to the dYdX Chain;\n\n4. apply funds received from the dYdX Community to meet ongoing operational\ncosts and expenses, including (without limitation):\n(a) fees for professional services, such as lawyer and accountancy fees; and\n(b) costs for online service providers;\n\n5. manage administrative processes to support the Purposes listed above, including\n(without limitation), opening and managing any one or more bank accounts in the\nnames of the Trustees; and\n\n6. do all other acts and things that may be incidental to, or desirable, to further the\nabove Purposes as the Trustees may in their discretion think fit.*”\n\nIn addition to the above-mentioned change we also propose a further amendment to the Trust Instrument, stating the Trustee’s duty to act lawfully at all times explicitly. This was only implied in the original Trust Instrument. This clarification avoids any possible doubt on the necessity of the Trustees to abide by the applicable law when acting as Trustees. The proposed change is to:\n\nReplace the current section 9.1:\n\n\"*9.1 The Trustees shall exercise or refrain from exercising the powers and discretions vested in them as they shall in their absolute discretion think most expedient for the attainment of the Purposes.*”\n\nWith:\n\n“*9.1 The Trustees shall execute and administer this Settlement and shall exercise their functions under it:\n\n(a) in accordance with the provisions of the Proper Law of this Settlement and any\nother law applicable to the Trustees or the Settlement (as the case may be) from\ntime to time, and in particular, each Trustee undertakes to:\n\n(i) operate in compliance with all laws, rules and regulations applicable to\ntheir duties and obligations under this Settlement; and\n\n(ii) maintain or cause to be maintained in force all licenses, permits, consents,\nauthorisations and approvals required by any law, rule or regulation for the\nperformance of their duties under this Settlement, including, in each case,\nwith respect to any acts taken in the advancement of the Purposes (which\nshall, for the avoidance of doubt, include the formation, deployment,\noperation or administration of any user interface in furtherance of the\nPurposes); and\n\n(b) subject to the provisions of the Proper Law of this Settlement –\n(i) in accordance with the terms of this Settlement; and\n(ii) only for the advancement of the Purposes.*”\n\nThe full proposal drafted in collaboration with our legal counsel can be found [here](https://drive.google.com/file/d/1rVYm_fAduBEQz8U7Pvfc1za4s_dqmFWT/view?usp=sharing).\n\n## Implementation\n\nFollowing the successful [Snapshot vote](https://snapshot.org/#/dydxgov.eth/proposal/0x46c40ddea980c824fd7787f9b73b6b1a842162dee8d155ad08a4d90a93dd333e) of this proposal, a supplementary instrument of amendment containing these changes has been created and signed by all Trustees and can be found [here](https://drive.google.com/file/d/1rVYm_fAduBEQz8U7Pvfc1za4s_dqmFWT/view?usp=sharing). \n\n\n## Copyright\n\nCopyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).\n\n", + "ipfsHash": "QmZdvSGZWUZgzyb2SmZ5wjwsWXYLHa2YoosBbuyz3wxJwJ", + "encodeIpfsHash": "0xa7dd36632bed22abe40b2ca6aa80d2a2a47efda0dc1d4bbfce2a67a010736729" + }, { "DIP": 3, "title": "Safety Module Restoration", From 39c39c8cbffa2377079d59d09dfcd2cb2c555796 Mon Sep 17 00:00:00 2001 From: Thomas Cintra Date: Sun, 12 Nov 2023 17:38:23 -0500 Subject: [PATCH 2/4] Add DIP29 --- content/dips/DIP-29.md | 211 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 content/dips/DIP-29.md diff --git a/content/dips/DIP-29.md b/content/dips/DIP-29.md new file mode 100644 index 0000000..5f733c1 --- /dev/null +++ b/content/dips/DIP-29.md @@ -0,0 +1,211 @@ +--- + +DIP: 29 + +title: Bridging the Community and Rewards Treasuries + +status: WIP + +author: Xenophon Labs | Sponsored by Wintermute + +shortDescription: Wind down v3 Rewards; Upgrade the Treasury contract; and Bridge the vested ethDYDX on Community and Rewards Treasuries from Ethereum to the dYdX Chain. + +discussions: https://dydx.forum/t/drc-bridging-the-community-and-rewards-treasuries/1258 + +created: 2023-11-12 + +--- + +## Simple Summary + +Following a successful [Snapshot vote](https://snapshot.org/#/dydxgov.eth/proposal/0x35ffe29ac42b5d42b493cadff77e8d53caeab98bef5cceb984847cd501974dde), this proposal seeks to implement the remaining steps to bridge the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b), the [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8), the [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871), and the [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f) to the dYdX Chain. Further, this proposal involves winding down dYdX v3 Trading and LP rewards. + +## Abstract + +This proposal aims to bridge the dYdX community’s vested and unvested ethDYDX tokens from Ethereum to dYdX Chain. To accomplish this, this proposal first upgrades the [Treasury Contract](https://github.com/dydxfoundation/governance-contracts/blob/master/contracts/treasury/Treasury.sol) for each of the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b) and [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871) smart contracts to the [Community Treasury Bridge](https://etherscan.io/address/0x5D8541e3078BE7c2D773185aD8C8b9ED5105E08c) and [Rewards Treasury Bridge](https://etherscan.io/address/0x8d0051943D4c72aF12D638c6b7253C71929A910A) contracts respectively. + +This upgrade sets the `recipient` of the [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8) and [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f) contracts to specified burner addresses for each respective vester, and enables the `bridgeTreasury` function. By effectively burning unvested ethDYDX, this proposal allows dYdX Chain governance to credit the community vester and rewards vester accounts on dYdX Chain with a corresponding amount of unvested ethDYDX. + +Following these upgrades, this proposal bridges available ethDYDX in the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b) and the [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871) by leveraging [Community Treasury Bridge](https://etherscan.io/address/0x5D8541e3078BE7c2D773185aD8C8b9ED5105E08c) and [Rewards Treasury Bridge](https://etherscan.io/address/0x8d0051943D4c72aF12D638c6b7253C71929A910A) by calling the `bridgeTreasury` function on both contracts, and setting the community treasury account on dYdX Chain as the recipient (`dydx15ztc7xy42tn2ukkc0qjthkucw9ac63pgp70urn`). + +This proposal also winds down the dYdX v3 Trading and LP Rewards programs by gradually reducing the rewards emissions throughout epochs 30, 31, and 32. + +## Motivation + +The purpose of this proposal is to ensure that activities on dYdX Chain can be funded by dYdX Chain governance promptly. This potentially includes: + +1. Enabling the trading rewards program on dYdX Chain. Note, the activation of trading rewards on dYdX Chain is subject to a governance proposal on dYdX Chain. + +2. Funding the dYdX Chain insurance fund. Note, funding the insurance fund is subject to a governance proposal on dYdX Chain. + +3. Enabling dYdX Chain governance to potentially fund the [Launch Incentives Program](https://dydx.forum/t/dydx-v4-launch-incentives-proposal/1075) proposed by Chaos Labs. + +4. Enabling dYdX Chain governance to fund contributor grants, community initiatives, liquidity mining, and other initiatives. + +In order for governance on dYdX Chain to be able to fund such activities, the ethDYDX sitting in the treasury contracts on dYdX v3 must be bridged over to dYdX Chain. + +## Specification + +1. Upgrade the [Treasury Contract](https://github.com/dydxfoundation/governance-contracts/blob/master/contracts/treasury/Treasury.sol) for each of the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b) and [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871) smart contracts to the [Community Treasury Bridge](https://etherscan.io/address/0x5D8541e3078BE7c2D773185aD8C8b9ED5105E08c) and [Rewards Treasury Bridge](https://etherscan.io/address/0x8d0051943D4c72aF12D638c6b7253C71929A910A) contracts respectively. This will enable the `bridgeTreasury` function. + +2. Set recipient address to a burner address for [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8) (`0x0000000000000000000000000000000000000002`) and [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f) (`0x0000000000000000000000000000000000000001`), respectively, to effectively burn all unvested ethDYDX in the Community Treasury Vester and the Rewards Treasury Vester. + +3. Reduce trading and LP rewards by ⅓ from Epoch 30-32 on dYdX v3. Given the date that the proposal could first be executed, there will need to be sufficient LP and Trading rewards for Epoch 29-32 in the rewards treasury. The dYdX community shall request that Chainlink make the following ethDYDX emission reductions on the following dates: + + a. Reduce rewards to the following values on Nov 21, 2023, 15:00 UTC (start of Epoch 30) + + i. Trading: 1,054,795 + + ii. LP: 383,562 + + b. Reduce rewards to the following values on Dec 19, 2023, 15:00 UTC (start of Epoch 31) + + i.Trading: 527,398 + + ii.LP: 191,781 + + c. Reduce rewards to the following values on Jan 16, 2024, 15:00 UTC (start of Epoch 32) + + i.Trading: 0 + + ii.LP: 0 + +4. Bridge the vested balance of the [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871) minus approximately 13,199,453 ethDYDX (for Trading and LP Rewards for Epochs 29-32 and allocated but unclaimed rewards) to dYdX Chain Community Treasury address (`dydx15ztc7xy42tn2ukkc0qjthkucw9ac63pgp70urn`) as the recipient. See the Appendix for further details. + +5. Bridge the vested balance of the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b) to dYdX Chain Community Treasury address (`dydx15ztc7xy42tn2ukkc0qjthkucw9ac63pgp70urn`) as the recipient. + +6. Recommend that the validators of the dYdX Chain credit the dYdX Chain Rewards Treasury Vester (`dydx1ltyc6y4skclzafvpznpt2qjwmfwgsndp458rm`) and dYdX Chain Community Treasury Vester (`dydx1wxje320an3karyc6mjw4zghs300dmrjkwn7xtk`) with tokens that are effectively burned from the [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8) and the [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f). Note, crediting the dYdX Chain [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8) and [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f) will require a dYdX Chain community governance proposal. + +## Rationale + +The dYdX community has expressed strong sentiment for winding down ecosystem incentives on dYdX v3 and enabling ecosystem incentives on dYdX Chain. This proposal addresses this by winding down dYdX v3 rewards and bridging available ethDYDX sitting on the dYdX v3 community and rewards treasury contracts to the dYdX Chain community treasury. The dYdX community through dYdX Chain governance may then (1) initiate community spend proposals, (2) vote to enable rewards on dYdX Chain, such as Chaos Labs’ Launch Incentives Program and the native Trading Rewards module, among other things. + +To bridge ethDYDX from Ethereum to dYdX Chain, this proposal leverages the [wethDYDX smart contract](https://etherscan.io/address/0x46b2deae6eff3011008ea27ea36b7c27255ddfa9). The upgraded TreasuryBridge contract enables and streamlines the process of bridging vested funds with the `bridgeTreasury` function. + +Given that it is not possible to bridge unvested ethDYDX, this proposal instead sets the vesting recipient on both the community treasury vester and rewards treasury vester to specified burner address for each vester contract. By effectively burning all unvested ethDYDX, this proposal allows the dYdX community through governance on dYdX Chain to credit the corresponding amount of burned tokens to the respective vester accounts on dYdX Chain. + +## Implementation and Test Cases + +A full implementation and test cases of the proposed change can be found [here](https://github.com/dydxfoundation/governance-contracts/pull/57) and [here](https://github.com/dydxfoundation/governance-contracts/tree/master/test/treasury-bridge/treasury-bridge.spec.ts). + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). + +# Appendix + +## Detailed calculations for ethDYDX tokens to bridge from the rewards treasury + +All ethDYDX that is unallocated from rewards can be bridged to the community treasury on dYdX Chain. Note that to calculate the unallocated rewards, we can subtract the allocated rewards from the original total allocated rewards. + +There were originally 450,000,000 ethDYDX tokens allocated to rewards. Specifically, the initial allocations were the following: + +* 25% of the token supply allocated to [trading rewards](https://docs.dydx.community/dydx-governance/rewards/trading-rewards). +* 7.5% of the token supply allocated to [retroactive mining rewards](https://docs.dydx.community/dydx-governance/rewards/retroactive-mining-rewards). +* 7.5% of the token supply allocated to [liquidity provider rewards](https://docs.dydx.community/dydx-governance/rewards/liquidity-provider-rewards). +* 2.5% of the token supply allocated to [liquidity module rewards](https://docs.dydx.community/dydx-governance/staking-pools/liquidity-staking-pool). +* 2.5% of the token supply allocated to [safety module rewards](https://docs.dydx.community/dydx-governance/staking-pools/safety-staking-pool). + +### Currently allocated rewards up to epoch 28 + +As of epoch 28, 205,165,433.5392799029 ethDYDX were allocated to rewards. Reasoning: + +* 173,204.7618238715 ethDYDX for safety module compensation ([source](https://github.com/dydxfoundation/governance-contracts/blob/18f2e9007831cab3e1c13cf8a29626ea4f416615/src/deploy-config/base-config.ts#L230)). + * Note this was taken from the rewards treasury. +* 5,116,733.9553627416 ethDYDX tokens allocated for safety module rewards. Reasoning: + * The rewards rate was 0.1585489619 ethDYDX tokens per second. + * 25,000,000 total ethDYDX / 157,679,998 seconds of rewards, which is 65.1785708699 epochs. + * Rewards were allocated for 32,272,264 seconds. Reasoning: + * Safety module rewards began being distributed on Nov-20-2021 04:42:55 AM UTC, which is unix timestamp 1637383375. + * Note this was block 13649857 which contained the first safety module staking TX ([source](https://etherscan.io/tx/0x480c35631456098c0ec666cfa8e971eb970ea99a197f2b4e503b16cf99fc7216)). + * Note the safety module proxy admin was upgraded on block 13649826 as part of [this executed proposal](https://etherscan.io/tx/0xfd332147899fd3ef1db62f262ffae92bbd7d18a5ed4e142eb0407a173dbf0453/advanced), but rewards were not allocated until there was a non-zero amount staked. + * The safety module rewards were set to 0 on Nov-28-2022 05:13:59 PM UTC, which is unix timestamp 1669655639. + * This occurred as part of a governance proposal executed on block 16069909 ([source](https://etherscan.io/tx/0xf98e9d0e0017fce10217477e7fab414b2210e9eebe28f450a71619ac036ad7fd/advanced#eventlog)). + * 1669655639 - 1637383375 = 32,272,264 seconds. +* 5,779,607.8220932898 ethDYDX tokens were allocated for liquidity staking rewards. Reasoning: + * The rewards rate was 0.1585489619 ethDYDX tokens per second. + * 25,000,000 total ethDYDX / 157,679,998 seconds of rewards, which is 65.1785708699 epochs. + * Rewards were allocated for 36,453,142 seconds. Reasoning: + * The first staking TX occurred on Aug-03-2021 04:24:01 PM UTC, which is unix timestamp 1628007841. + * Note this was block 12953339 which contained the first liquidity module staking TX ([source](https://etherscan.io/tx/0x3c0830f88a05298765e89e3c591dd4fb9579ea13ca4181ddd78bd47b9042a640)). + * The liquidity module rewards were set to 0 on Sep-29-2022 02:16:23 PM UTC, which is unix timestamp 1664460983. + * This occurred as part of a governance proposal executed on block 15639536 ([source](https://etherscan.io/tx/0xcda8c40f45aac4ef7f5d6aa5d82cb84e89057c03842b549c00151ffbae854a4e#eventlog)). +* 194,095,887 ethDYDX tokens were allocated for trading, MM, and retroactive mining rewards up to epoch 28 (note, this doesn't include epoch 29 rewards since they aren't allocated on-chain yet). Reasoning: + * Latest dYdX v3 rewards are [here](https://cloudflare-ipfs.com/ipfs/bafybeic22w5uxknvce4kzci7fftgezsccxgpvruyh2ro4a4qkbxpi5pdqu). Note this includes retroactive allocations as well. + * The number can be reproduced by running the below script. + +### Future allocated rewards after epoch 28 + +For epoch 29 and onwards, 4,315,071 ethDYDX will be allocated in rewards. Reasoning: + +* Epoch 29 will allocate 2,157,535 ethDYDX tokens for MM and trading rewards. + * 575,343 ethDYDX tokens will be allocated to MM rewards. + * 1,582,192 ethDYDX tokens will be allocated for trading rewards. +* Epoch 30 will allocate 1,438,357 ethDYDX tokens for MM and trading rewards, which is 2/3 of the original amount. + * 383,562 ethDYDX tokens will be allocated to MM rewards. + * 1,054,795 ethDYDX tokens will be allocated for trading rewards (rounded up to the nearest whole number). +* Epoch 31 will allocate 719,179 ethDYDX tokens for MM and trading rewards, which is 1/3 of the original amount. + * 191,781 ethDYDX tokens will be allocated to MM rewards. + * 527,398 ethDYDX tokens will be allocated for trading rewards (rounded up to the nearest whole number). +* Epochs 32 and onwards will allocate 0 ethDYDX tokens to MM and trading rewards. + +### Total ethDYDX allocated to rewards + +In total there are 205,165,433.5392799029 ethDYDX + 4,315,071 ethDYDX = 209,480,504.5392799029 ethDYDX allocated to rewards. + +### Total unallocated ethDYDX rewards that can be bridged + +Therefore there are 450,000,000 ethDYDX - 209,480,504.5392799029 ethDYDX = 240,519,495.4607200971 ethDYDX that are unallocated to rewards and can be bridged to the ethDYDX chain community treasury. + +### Python script for calculating total rewards + +``` +import requests +def fetch_data(url): + """Fetches data from the given URL.""" + response = requests.get(url) + response.raise_for_status() + return response.json() +def compute_cumulative_rewards(data): + """Computes the cumulative rewards from the given data.""" + return sum(int(entry[1]) for entry in data) +def main(): + url = "https://cloudflare-ipfs.com/ipfs/bafybeic22w5uxknvce4kzci7fftgezsccxgpvruyh2ro4a4qkbxpi5pdqu" + data = fetch_data(url) + total_rewards = compute_cumulative_rewards(data) + print(f"Cumulative rewards: {total_rewards}") +if __name__ == "__main__": + main() +import requests +def fetch_data(url): + """Fetches data from the given URL.""" + response = requests.get(url) + response.raise_for_status() + return response.json() +def compute_cumulative_rewards(data): + """Computes the cumulative rewards from the given data.""" + return sum(int(entry[1]) for entry in data) +def main(): + url = "https://cloudflare-ipfs.com/ipfs/bafybeic22w5uxknvce4kzci7fftgezsccxgpvruyh2ro4a4qkbxpi5pdqu" + data = fetch_data(url) + total_rewards = compute_cumulative_rewards(data) + print(f"Cumulative rewards: {total_rewards}") +if __name__ == "__main__": + main() +``` + +### Upper bound on ethDYDX rewards left in rewards treasury + +The upper bound of ethDYDX rewards left in the rewards treasury should be 13,199,452.995434493 ethDYDX. Note the following: + + + +* This is an upper bound and will decrease as more rewards are claimed. This includes 4,315,071 ethDYDX that will be allocated in future rewards in epoch 29 and onwards. Reasoning: + * Based on the current ethDYDX token balances of the rewards treasury and rewards treasury vester: + * Rewards treasury - 50,467,466.809546687539273567 ethDYDX + * Rewards treasury vester - 203,251,481.646607902569875471 ethDYDX + * The amount that will be left in the rewards treasury can be calculated using the following reasoning: + * The amount left in the rewards treasury will be the allocated rewards. + * Allocated rewards = rewards treasury balance + rewards treasury vester balance - unallocated ethDYDX + * Given 240,519,495.4607200971 ethDYDX can be bridged and the above balances, the equation is the following: + * 50,467,466.809546687539273567 ethDYDX + 203,251,481.646607902569875471 ethDYDX - 240,519,495.4607200971 ethDYDX = 13,199,452.995434493 ethDYDX \ No newline at end of file From a497ea971d4cc489c8ee650a5cbfd0b295e28eab Mon Sep 17 00:00:00 2001 From: Thomas Cintra Date: Sun, 12 Nov 2023 18:04:37 -0500 Subject: [PATCH 3/4] Update DIP29 --- content/dips/DIP-29.md | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/content/dips/DIP-29.md b/content/dips/DIP-29.md index 5f733c1..41421c1 100644 --- a/content/dips/DIP-29.md +++ b/content/dips/DIP-29.md @@ -4,11 +4,11 @@ DIP: 29 title: Bridging the Community and Rewards Treasuries -status: WIP +status: Proposed author: Xenophon Labs | Sponsored by Wintermute -shortDescription: Wind down v3 Rewards; Upgrade the Treasury contract; and Bridge the vested ethDYDX on Community and Rewards Treasuries from Ethereum to the dYdX Chain. +shortDescription: Wind down v3 Rewards; Upgrade the Treasury contract; and Bridge the vested and unvested ethDYDX on Community and Rewards Treasuries from Ethereum to the dYdX Chain. discussions: https://dydx.forum/t/drc-bridging-the-community-and-rewards-treasuries/1258 @@ -161,22 +161,6 @@ Therefore there are 450,000,000 ethDYDX - 209,480,504.5392799029 ethDYDX = 240,5 ``` import requests -def fetch_data(url): - """Fetches data from the given URL.""" - response = requests.get(url) - response.raise_for_status() - return response.json() -def compute_cumulative_rewards(data): - """Computes the cumulative rewards from the given data.""" - return sum(int(entry[1]) for entry in data) -def main(): - url = "https://cloudflare-ipfs.com/ipfs/bafybeic22w5uxknvce4kzci7fftgezsccxgpvruyh2ro4a4qkbxpi5pdqu" - data = fetch_data(url) - total_rewards = compute_cumulative_rewards(data) - print(f"Cumulative rewards: {total_rewards}") -if __name__ == "__main__": - main() -import requests def fetch_data(url): """Fetches data from the given URL.""" response = requests.get(url) From 9b6c465eadf066f84f196483908eab328fc085fe Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 12 Nov 2023 23:11:44 +0000 Subject: [PATCH 4/4] [PIPELINE] Committed IPFS uploads --- content/ipfs-dips/DIP-29-Ipfs-hashes.json | 5 +++++ content/ipfs-dips/all-dips.json | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 content/ipfs-dips/DIP-29-Ipfs-hashes.json diff --git a/content/ipfs-dips/DIP-29-Ipfs-hashes.json b/content/ipfs-dips/DIP-29-Ipfs-hashes.json new file mode 100644 index 0000000..103d8a5 --- /dev/null +++ b/content/ipfs-dips/DIP-29-Ipfs-hashes.json @@ -0,0 +1,5 @@ +{ + "dip": "28", + "hash": "QmW6gudUVNeCJFZfTxo4ZRQWjqnTaGZypvhi6kmgU6zYFr", + "encodedHash": "0x7349d9a234c93be79327fb69d23f2daf71abab093ed517dcd1cca55688ab1991" +} \ No newline at end of file diff --git a/content/ipfs-dips/all-dips.json b/content/ipfs-dips/all-dips.json index e993d76..6d34c2e 100644 --- a/content/ipfs-dips/all-dips.json +++ b/content/ipfs-dips/all-dips.json @@ -293,6 +293,20 @@ "ipfsHash": "QmZdvSGZWUZgzyb2SmZ5wjwsWXYLHa2YoosBbuyz3wxJwJ", "encodeIpfsHash": "0xa7dd36632bed22abe40b2ca6aa80d2a2a47efda0dc1d4bbfce2a67a010736729" }, + { + "DIP": 29, + "title": "Bridging the Community and Rewards Treasuries", + "status": "Proposed", + "author": "Xenophon Labs | Sponsored by Wintermute", + "shortDescription": "Wind down v3 Rewards; Upgrade the Treasury contract; and Bridge the vested and unvested ethDYDX on Community and Rewards Treasuries from Ethereum to the dYdX Chain.", + "discussions": "https://dydx.forum/t/drc-bridging-the-community-and-rewards-treasuries/1258", + "created": "2023-11-12T00:00:00.000Z", + "preview": "## Simple Summary\n\nFollowing a successful [Snapshot …", + "basename": "DIP-29", + "description": "\n\n## Simple Summary\n\nFollowing a successful [Snapshot vote](https://snapshot.org/#/dydxgov.eth/proposal/0x35ffe29ac42b5d42b493cadff77e8d53caeab98bef5cceb984847cd501974dde), this proposal seeks to implement the remaining steps to bridge the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b), the [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8), the [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871), and the [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f) to the dYdX Chain. Further, this proposal involves winding down dYdX v3 Trading and LP rewards.\n\n## Abstract\n\nThis proposal aims to bridge the dYdX community’s vested and unvested ethDYDX tokens from Ethereum to dYdX Chain. To accomplish this, this proposal first upgrades the [Treasury Contract](https://github.com/dydxfoundation/governance-contracts/blob/master/contracts/treasury/Treasury.sol) for each of the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b) and [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871) smart contracts to the [Community Treasury Bridge](https://etherscan.io/address/0x5D8541e3078BE7c2D773185aD8C8b9ED5105E08c) and [Rewards Treasury Bridge](https://etherscan.io/address/0x8d0051943D4c72aF12D638c6b7253C71929A910A) contracts respectively.\n\nThis upgrade sets the `recipient` of the [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8) and [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f) contracts to specified burner addresses for each respective vester, and enables the `bridgeTreasury` function. By effectively burning unvested ethDYDX, this proposal allows dYdX Chain governance to credit the community vester and rewards vester accounts on dYdX Chain with a corresponding amount of unvested ethDYDX.\n\nFollowing these upgrades, this proposal bridges available ethDYDX in the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b) and the [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871) by leveraging [Community Treasury Bridge](https://etherscan.io/address/0x5D8541e3078BE7c2D773185aD8C8b9ED5105E08c) and [Rewards Treasury Bridge](https://etherscan.io/address/0x8d0051943D4c72aF12D638c6b7253C71929A910A) by calling the `bridgeTreasury` function on both contracts, and setting the community treasury account on dYdX Chain as the recipient (`dydx15ztc7xy42tn2ukkc0qjthkucw9ac63pgp70urn`).\n\nThis proposal also winds down the dYdX v3 Trading and LP Rewards programs by gradually reducing the rewards emissions throughout epochs 30, 31, and 32.\n\n## Motivation\n\nThe purpose of this proposal is to ensure that activities on dYdX Chain can be funded by dYdX Chain governance promptly. This potentially includes:\n\n1. Enabling the trading rewards program on dYdX Chain. Note, the activation of trading rewards on dYdX Chain is subject to a governance proposal on dYdX Chain.\n\n2. Funding the dYdX Chain insurance fund. Note, funding the insurance fund is subject to a governance proposal on dYdX Chain.\n\n3. Enabling dYdX Chain governance to potentially fund the [Launch Incentives Program](https://dydx.forum/t/dydx-v4-launch-incentives-proposal/1075) proposed by Chaos Labs.\n\n4. Enabling dYdX Chain governance to fund contributor grants, community initiatives, liquidity mining, and other initiatives.\n\nIn order for governance on dYdX Chain to be able to fund such activities, the ethDYDX sitting in the treasury contracts on dYdX v3 must be bridged over to dYdX Chain.\n\n## Specification\n\n1. Upgrade the [Treasury Contract](https://github.com/dydxfoundation/governance-contracts/blob/master/contracts/treasury/Treasury.sol) for each of the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b) and [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871) smart contracts to the [Community Treasury Bridge](https://etherscan.io/address/0x5D8541e3078BE7c2D773185aD8C8b9ED5105E08c) and [Rewards Treasury Bridge](https://etherscan.io/address/0x8d0051943D4c72aF12D638c6b7253C71929A910A) contracts respectively. This will enable the `bridgeTreasury` function.\n\n2. Set recipient address to a burner address for [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8) (`0x0000000000000000000000000000000000000002`) and [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f) (`0x0000000000000000000000000000000000000001`), respectively, to effectively burn all unvested ethDYDX in the Community Treasury Vester and the Rewards Treasury Vester.\n\n3. Reduce trading and LP rewards by ⅓ from Epoch 30-32 on dYdX v3. Given the date that the proposal could first be executed, there will need to be sufficient LP and Trading rewards for Epoch 29-32 in the rewards treasury. The dYdX community shall request that Chainlink make the following ethDYDX emission reductions on the following dates:\n\n\ta. Reduce rewards to the following values on Nov 21, 2023, 15:00 UTC (start of Epoch 30)\n\n \ti. Trading: 1,054,795\n\n \tii. LP: 383,562\n\n\tb. Reduce rewards to the following values on Dec 19, 2023, 15:00 UTC (start of Epoch 31)\n\n \ti.Trading: 527,398\n\n \tii.LP: 191,781\n\n\tc. Reduce rewards to the following values on Jan 16, 2024, 15:00 UTC (start of Epoch 32)\n\n \ti.Trading: 0\n\n \tii.LP: 0\n\n4. Bridge the vested balance of the [Rewards Treasury](https://etherscan.io/address/0x639192D54431F8c816368D3FB4107Bc168d0E871) minus approximately 13,199,453 ethDYDX (for Trading and LP Rewards for Epochs 29-32 and allocated but unclaimed rewards) to dYdX Chain Community Treasury address (`dydx15ztc7xy42tn2ukkc0qjthkucw9ac63pgp70urn`) as the recipient. See the Appendix for further details.\n\n5. Bridge the vested balance of the [Community Treasury](https://etherscan.io/address/0xe710ced57456d3a16152c32835b5fb4e72d9ea5b) to dYdX Chain Community Treasury address (`dydx15ztc7xy42tn2ukkc0qjthkucw9ac63pgp70urn`) as the recipient.\n\n6. Recommend that the validators of the dYdX Chain credit the dYdX Chain Rewards Treasury Vester (`dydx1ltyc6y4skclzafvpznpt2qjwmfwgsndp458rm`) and dYdX Chain Community Treasury Vester (`dydx1wxje320an3karyc6mjw4zghs300dmrjkwn7xtk`) with tokens that are effectively burned from the [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8) and the [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f). Note, crediting the dYdX Chain [Community Treasury Vester](https://etherscan.io/address/0x08a90Fe0741B7DeF03fB290cc7B273F1855767D8) and [Rewards Treasury Vester](https://etherscan.io/address/0xb9431e19b29b952d9358025f680077c3fd37292f) will require a dYdX Chain community governance proposal.\n\n## Rationale\n\nThe dYdX community has expressed strong sentiment for winding down ecosystem incentives on dYdX v3 and enabling ecosystem incentives on dYdX Chain. This proposal addresses this by winding down dYdX v3 rewards and bridging available ethDYDX sitting on the dYdX v3 community and rewards treasury contracts to the dYdX Chain community treasury. The dYdX community through dYdX Chain governance may then (1) initiate community spend proposals, (2) vote to enable rewards on dYdX Chain, such as Chaos Labs’ Launch Incentives Program and the native Trading Rewards module, among other things.\n\nTo bridge ethDYDX from Ethereum to dYdX Chain, this proposal leverages the [wethDYDX smart contract](https://etherscan.io/address/0x46b2deae6eff3011008ea27ea36b7c27255ddfa9). The upgraded TreasuryBridge contract enables and streamlines the process of bridging vested funds with the `bridgeTreasury` function.\n\nGiven that it is not possible to bridge unvested ethDYDX, this proposal instead sets the vesting recipient on both the community treasury vester and rewards treasury vester to specified burner address for each vester contract. By effectively burning all unvested ethDYDX, this proposal allows the dYdX community through governance on dYdX Chain to credit the corresponding amount of burned tokens to the respective vester accounts on dYdX Chain.\n\n## Implementation and Test Cases\n\nA full implementation and test cases of the proposed change can be found [here](https://github.com/dydxfoundation/governance-contracts/pull/57) and [here](https://github.com/dydxfoundation/governance-contracts/tree/master/test/treasury-bridge/treasury-bridge.spec.ts).\n\n## Copyright\n\nCopyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).\n\n# Appendix\n\n## Detailed calculations for ethDYDX tokens to bridge from the rewards treasury\n\nAll ethDYDX that is unallocated from rewards can be bridged to the community treasury on dYdX Chain. Note that to calculate the unallocated rewards, we can subtract the allocated rewards from the original total allocated rewards.\n\nThere were originally 450,000,000 ethDYDX tokens allocated to rewards. Specifically, the initial allocations were the following:\n\n* 25% of the token supply allocated to [trading rewards](https://docs.dydx.community/dydx-governance/rewards/trading-rewards).\n* 7.5% of the token supply allocated to [retroactive mining rewards](https://docs.dydx.community/dydx-governance/rewards/retroactive-mining-rewards).\n* 7.5% of the token supply allocated to [liquidity provider rewards](https://docs.dydx.community/dydx-governance/rewards/liquidity-provider-rewards).\n* 2.5% of the token supply allocated to [liquidity module rewards](https://docs.dydx.community/dydx-governance/staking-pools/liquidity-staking-pool).\n* 2.5% of the token supply allocated to [safety module rewards](https://docs.dydx.community/dydx-governance/staking-pools/safety-staking-pool).\n\n### Currently allocated rewards up to epoch 28\n\nAs of epoch 28, 205,165,433.5392799029 ethDYDX were allocated to rewards. Reasoning:\n\n* 173,204.7618238715 ethDYDX for safety module compensation ([source](https://github.com/dydxfoundation/governance-contracts/blob/18f2e9007831cab3e1c13cf8a29626ea4f416615/src/deploy-config/base-config.ts#L230)).\n * Note this was taken from the rewards treasury.\n* 5,116,733.9553627416 ethDYDX tokens allocated for safety module rewards. Reasoning:\n * The rewards rate was 0.1585489619 ethDYDX tokens per second.\n * 25,000,000 total ethDYDX / 157,679,998 seconds of rewards, which is 65.1785708699 epochs.\n * Rewards were allocated for 32,272,264 seconds. Reasoning:\n * Safety module rewards began being distributed on Nov-20-2021 04:42:55 AM UTC, which is unix timestamp 1637383375.\n * Note this was block 13649857 which contained the first safety module staking TX ([source](https://etherscan.io/tx/0x480c35631456098c0ec666cfa8e971eb970ea99a197f2b4e503b16cf99fc7216)).\n * Note the safety module proxy admin was upgraded on block 13649826 as part of [this executed proposal](https://etherscan.io/tx/0xfd332147899fd3ef1db62f262ffae92bbd7d18a5ed4e142eb0407a173dbf0453/advanced), but rewards were not allocated until there was a non-zero amount staked.\n * The safety module rewards were set to 0 on Nov-28-2022 05:13:59 PM UTC, which is unix timestamp 1669655639.\n * This occurred as part of a governance proposal executed on block 16069909 ([source](https://etherscan.io/tx/0xf98e9d0e0017fce10217477e7fab414b2210e9eebe28f450a71619ac036ad7fd/advanced#eventlog)).\n * 1669655639 - 1637383375 = 32,272,264 seconds.\n* 5,779,607.8220932898 ethDYDX tokens were allocated for liquidity staking rewards. Reasoning:\n * The rewards rate was 0.1585489619 ethDYDX tokens per second.\n * 25,000,000 total ethDYDX / 157,679,998 seconds of rewards, which is 65.1785708699 epochs.\n * Rewards were allocated for 36,453,142 seconds. Reasoning:\n * The first staking TX occurred on Aug-03-2021 04:24:01 PM UTC, which is unix timestamp 1628007841.\n * Note this was block 12953339 which contained the first liquidity module staking TX ([source](https://etherscan.io/tx/0x3c0830f88a05298765e89e3c591dd4fb9579ea13ca4181ddd78bd47b9042a640)).\n * The liquidity module rewards were set to 0 on Sep-29-2022 02:16:23 PM UTC, which is unix timestamp 1664460983.\n * This occurred as part of a governance proposal executed on block 15639536 ([source](https://etherscan.io/tx/0xcda8c40f45aac4ef7f5d6aa5d82cb84e89057c03842b549c00151ffbae854a4e#eventlog)).\n* 194,095,887 ethDYDX tokens were allocated for trading, MM, and retroactive mining rewards up to epoch 28 (note, this doesn't include epoch 29 rewards since they aren't allocated on-chain yet). Reasoning:\n * Latest dYdX v3 rewards are [here](https://cloudflare-ipfs.com/ipfs/bafybeic22w5uxknvce4kzci7fftgezsccxgpvruyh2ro4a4qkbxpi5pdqu). Note this includes retroactive allocations as well.\n * The number can be reproduced by running the below script.\n\n### Future allocated rewards after epoch 28\n\nFor epoch 29 and onwards, 4,315,071 ethDYDX will be allocated in rewards. Reasoning:\n\n* Epoch 29 will allocate 2,157,535 ethDYDX tokens for MM and trading rewards.\n * 575,343 ethDYDX tokens will be allocated to MM rewards.\n * 1,582,192 ethDYDX tokens will be allocated for trading rewards.\n* Epoch 30 will allocate 1,438,357 ethDYDX tokens for MM and trading rewards, which is 2/3 of the original amount.\n * 383,562 ethDYDX tokens will be allocated to MM rewards.\n * 1,054,795 ethDYDX tokens will be allocated for trading rewards (rounded up to the nearest whole number).\n* Epoch 31 will allocate 719,179 ethDYDX tokens for MM and trading rewards, which is 1/3 of the original amount.\n * 191,781 ethDYDX tokens will be allocated to MM rewards.\n * 527,398 ethDYDX tokens will be allocated for trading rewards (rounded up to the nearest whole number).\n* Epochs 32 and onwards will allocate 0 ethDYDX tokens to MM and trading rewards.\n\n### Total ethDYDX allocated to rewards\n\nIn total there are 205,165,433.5392799029 ethDYDX + 4,315,071 ethDYDX = 209,480,504.5392799029 ethDYDX allocated to rewards.\n\n### Total unallocated ethDYDX rewards that can be bridged\n\nTherefore there are 450,000,000 ethDYDX - 209,480,504.5392799029 ethDYDX = 240,519,495.4607200971 ethDYDX that are unallocated to rewards and can be bridged to the ethDYDX chain community treasury.\n\n### Python script for calculating total rewards\n\n```\nimport requests\ndef fetch_data(url):\n \"\"\"Fetches data from the given URL.\"\"\"\n response = requests.get(url)\n response.raise_for_status()\n return response.json()\ndef compute_cumulative_rewards(data):\n \"\"\"Computes the cumulative rewards from the given data.\"\"\"\n return sum(int(entry[1]) for entry in data)\ndef main():\n url = \"https://cloudflare-ipfs.com/ipfs/bafybeic22w5uxknvce4kzci7fftgezsccxgpvruyh2ro4a4qkbxpi5pdqu\"\n data = fetch_data(url)\n total_rewards = compute_cumulative_rewards(data)\n print(f\"Cumulative rewards: {total_rewards}\")\nif __name__ == \"__main__\":\n main()\n```\n\n### Upper bound on ethDYDX rewards left in rewards treasury\n\nThe upper bound of ethDYDX rewards left in the rewards treasury should be 13,199,452.995434493 ethDYDX. Note the following:\n\n\n\n* This is an upper bound and will decrease as more rewards are claimed. This includes 4,315,071 ethDYDX that will be allocated in future rewards in epoch 29 and onwards. Reasoning:\n * Based on the current ethDYDX token balances of the rewards treasury and rewards treasury vester:\n * Rewards treasury - 50,467,466.809546687539273567 ethDYDX\n * Rewards treasury vester - 203,251,481.646607902569875471 ethDYDX\n * The amount that will be left in the rewards treasury can be calculated using the following reasoning:\n * The amount left in the rewards treasury will be the allocated rewards.\n * Allocated rewards = rewards treasury balance + rewards treasury vester balance - unallocated ethDYDX\n * Given 240,519,495.4607200971 ethDYDX can be bridged and the above balances, the equation is the following:\n * 50,467,466.809546687539273567 ethDYDX + 203,251,481.646607902569875471 ethDYDX - 240,519,495.4607200971 ethDYDX = 13,199,452.995434493 ethDYDX", + "ipfsHash": "QmW6gudUVNeCJFZfTxo4ZRQWjqnTaGZypvhi6kmgU6zYFr", + "encodeIpfsHash": "0x7349d9a234c93be79327fb69d23f2daf71abab093ed517dcd1cca55688ab1991" + }, { "DIP": 3, "title": "Safety Module Restoration",