From 774527dc74d6697b52e1dfb2597fb9795219a71b Mon Sep 17 00:00:00 2001 From: Rozengarden Date: Fri, 13 Dec 2024 18:14:54 +0100 Subject: [PATCH] feat: onboard FBTC on Core market --- ...veV3MainMarketOnEthereum_20241213_after.md | 112 ++++++++++++++++++ generator/features/assetListing.ts | 8 +- ...CToAaveV3MainMarketOnEthereum_20241213.sol | 64 ++++++++++ ...oAaveV3MainMarketOnEthereum_20241213.t.sol | 58 +++++++++ .../AddFBTCToAaveV3MainMarketOnEthereum.md | 73 ++++++++++++ ...oAaveV3MainMarketOnEthereum_20241213.s.sol | 60 ++++++++++ .../config.ts | 49 ++++++++ 7 files changed, 420 insertions(+), 4 deletions(-) create mode 100644 diffs/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_before_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_after.md create mode 100644 src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.sol create mode 100644 src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.t.sol create mode 100644 src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum.md create mode 100644 src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum_20241213.s.sol create mode 100644 src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/config.ts diff --git a/diffs/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_before_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_after.md b/diffs/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_before_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_after.md new file mode 100644 index 000000000..5d8c7dbf2 --- /dev/null +++ b/diffs/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_before_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_after.md @@ -0,0 +1,112 @@ +## Reserve changes + +### Reserves added + +#### FBTC ([0xC96dE26018A54D51c097160568752c4E3BD6C364](https://etherscan.io/address/0xC96dE26018A54D51c097160568752c4E3BD6C364)) + +| description | value | +| --- | --- | +| decimals | 8 | +| isActive | true | +| isFrozen | false | +| supplyCap | 200 FBTC | +| borrowCap | 100 FBTC | +| debtCeiling | 0 $ [0] | +| isSiloed | false | +| isFlashloanable | true | +| oracle | [0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c](https://etherscan.io/address/0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c) | +| oracleDecimals | 8 | +| oracleDescription | BTC / USD | +| oracleLatestAnswer | 100316.18 | +| usageAsCollateralEnabled | true | +| ltv | 73 % [7300] | +| liquidationThreshold | 78 % [7800] | +| liquidationBonus | 7.5 % | +| liquidationProtocolFee | 10 % [1000] | +| reserveFactor | 50 % [5000] | +| aToken | [0x65906988ADEe75306021C417a1A3458040239602](https://etherscan.io/address/0x65906988ADEe75306021C417a1A3458040239602) | +| aTokenImpl | [0x7EfFD7b47Bfd17e52fB7559d3f924201b9DbfF3d](https://etherscan.io/address/0x7EfFD7b47Bfd17e52fB7559d3f924201b9DbfF3d) | +| variableDebtToken | [0x68aeB290C7727D899B47c56d1c96AEAC475cD0dD](https://etherscan.io/address/0x68aeB290C7727D899B47c56d1c96AEAC475cD0dD) | +| variableDebtTokenImpl | [0xaC725CB59D16C81061BDeA61041a8A5e73DA9EC6](https://etherscan.io/address/0xaC725CB59D16C81061BDeA61041a8A5e73DA9EC6) | +| borrowingEnabled | true | +| isBorrowableInIsolation | false | +| interestRateStrategy | [0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB](https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB) | +| aTokenName | Aave Ethereum FBTC | +| aTokenSymbol | aEthFBTC | +| aTokenUnderlyingBalance | 0 FBTC [0] | +| id | 37 | +| isPaused | false | +| variableDebtTokenName | Aave Ethereum Variable Debt FBTC | +| variableDebtTokenSymbol | variableDebtEthFBTC | +| virtualAccountingActive | true | +| virtualBalance | 0 FBTC [0] | +| optimalUsageRatio | 45 % | +| maxVariableBorrowRate | 304 % | +| baseVariableBorrowRate | 0 % | +| variableRateSlope1 | 4 % | +| variableRateSlope2 | 300 % | +| interestRate | ![ir](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=450000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | + + +## Raw diff + +```json +{ + "reserves": { + "0xC96dE26018A54D51c097160568752c4E3BD6C364": { + "from": null, + "to": { + "aToken": "0x65906988ADEe75306021C417a1A3458040239602", + "aTokenImpl": "0x7EfFD7b47Bfd17e52fB7559d3f924201b9DbfF3d", + "aTokenName": "Aave Ethereum FBTC", + "aTokenSymbol": "aEthFBTC", + "aTokenUnderlyingBalance": "0", + "borrowCap": 100, + "borrowingEnabled": true, + "debtCeiling": 0, + "decimals": 8, + "id": 37, + "interestRateStrategy": "0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB", + "isActive": true, + "isBorrowableInIsolation": false, + "isFlashloanable": true, + "isFrozen": false, + "isPaused": false, + "isSiloed": false, + "liquidationBonus": 10750, + "liquidationProtocolFee": 1000, + "liquidationThreshold": 7800, + "ltv": 7300, + "oracle": "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c", + "oracleDecimals": 8, + "oracleDescription": "BTC / USD", + "oracleLatestAnswer": "10031618000000", + "reserveFactor": 5000, + "supplyCap": 200, + "symbol": "FBTC", + "underlying": "0xC96dE26018A54D51c097160568752c4E3BD6C364", + "usageAsCollateralEnabled": true, + "variableDebtToken": "0x68aeB290C7727D899B47c56d1c96AEAC475cD0dD", + "variableDebtTokenImpl": "0xaC725CB59D16C81061BDeA61041a8A5e73DA9EC6", + "variableDebtTokenName": "Aave Ethereum Variable Debt FBTC", + "variableDebtTokenSymbol": "variableDebtEthFBTC", + "virtualAccountingActive": true, + "virtualBalance": "0" + } + } + }, + "strategies": { + "0xC96dE26018A54D51c097160568752c4E3BD6C364": { + "from": null, + "to": { + "address": "0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB", + "baseVariableBorrowRate": "0", + "maxVariableBorrowRate": "3040000000000000000000000000", + "optimalUsageRatio": "450000000000000000000000000", + "variableRateSlope1": "40000000000000000000000000", + "variableRateSlope2": "3000000000000000000000000000" + } + } + } +} +``` \ No newline at end of file diff --git a/generator/features/assetListing.ts b/generator/features/assetListing.ts index 48dafe6ae..c37ec05d8 100644 --- a/generator/features/assetListing.ts +++ b/generator/features/assetListing.ts @@ -117,8 +117,8 @@ export const assetListing: FeatureModule = { listingExe += `${pool}.POOL.supply(${cfg.assetSymbol}, ${cfg.assetSymbol}_SEED_AMOUNT, address(${pool}.COLLECTOR), 0);\n`; if (isAddress(cfg.admin)) { listingExe += `\n(address a${cfg.assetSymbol}, , ) = ${pool}.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(${cfg.assetSymbol});\n`; - listingExe += `IEmissionManager(${pool}.EMISSION_MANAGER).setEmissionAdmin(${cfg.assetSymbol}, ${cfg.assetSymbol}_ADMIN);\n`; - listingExe += `IEmissionManager(${pool}.EMISSION_MANAGER).setEmissionAdmin(a${cfg.assetSymbol}, ${cfg.assetSymbol}_ADMIN);\n`; + listingExe += `IEmissionManager(${pool}.EMISSION_MANAGER).setEmissionAdmin(${cfg.assetSymbol}, ${cfg.assetSymbol}_LM_ADMIN);\n`; + listingExe += `IEmissionManager(${pool}.EMISSION_MANAGER).setEmissionAdmin(a${cfg.assetSymbol}, ${cfg.assetSymbol}_LM_ADMIN);\n`; } return listingExe; }), @@ -151,8 +151,8 @@ export const assetListing: FeatureModule = { listingTest += `\nfunction test_${cfg.assetSymbol}Admin() public { ${TEST_EXECUTE_PROPOSAL} (address a${cfg.assetSymbol}, , ) = ${pool}.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(proposal.${cfg.assetSymbol}()); - assertEq(IEmissionManager(${pool}.EMISSION_MANAGER).getEmissionAdmin(proposal.${cfg.assetSymbol}()), proposal.${cfg.assetSymbol}_ADMIN()); - assertEq(IEmissionManager(${pool}.EMISSION_MANAGER).getEmissionAdmin(a${cfg.assetSymbol}), proposal.${cfg.assetSymbol}_ADMIN()); + assertEq(IEmissionManager(${pool}.EMISSION_MANAGER).getEmissionAdmin(proposal.${cfg.assetSymbol}()), proposal.${cfg.assetSymbol}_LM_ADMIN()); + assertEq(IEmissionManager(${pool}.EMISSION_MANAGER).getEmissionAdmin(a${cfg.assetSymbol}), proposal.${cfg.assetSymbol}_LM_ADMIN()); }\n`; } return listingTest; diff --git a/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.sol b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.sol new file mode 100644 index 000000000..da7f3f1a3 --- /dev/null +++ b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; +import {AaveV3PayloadEthereum} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadEthereum.sol'; +import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; +import {SafeERC20} from 'solidity-utils/contracts/oz-common/SafeERC20.sol'; +import {IEmissionManager} from 'aave-v3-origin/contracts/rewards/interfaces/IEmissionManager.sol'; +/** + * @title Add FBTC to Aave v3 Main Market on Ethereum + * @author Aave Chan Initiative + * - Snapshot: https://snapshot.box/#/s:aave.eth/proposal/0x2ca8db490e132cebfec25ddbf460b89abd710456c5177bca784abaae9d6009d9 + * - Discussion: https://governance.aave.com/t/arfc-add-fbtc-to-aave-v3-main-market-on-ethereum/19937 + */ +contract AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213 is AaveV3PayloadEthereum { + using SafeERC20 for IERC20; + + address public constant FBTC = 0xC96dE26018A54D51c097160568752c4E3BD6C364; + uint256 public constant FBTC_SEED_AMOUNT = 1e5; + address public constant FBTC_LM_ADMIN = 0xac140648435d03f784879cd789130F22Ef588Fcd; + + function _postExecute() internal override { + IERC20(FBTC).forceApprove(address(AaveV3Ethereum.POOL), FBTC_SEED_AMOUNT); + AaveV3Ethereum.POOL.supply(FBTC, FBTC_SEED_AMOUNT, address(AaveV3Ethereum.COLLECTOR), 0); + + (address aFBTC, , ) = AaveV3Ethereum.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses( + FBTC + ); + IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).setEmissionAdmin(FBTC, FBTC_LM_ADMIN); + IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).setEmissionAdmin(aFBTC, FBTC_LM_ADMIN); + } + + function newListings() public pure override returns (IAaveV3ConfigEngine.Listing[] memory) { + IAaveV3ConfigEngine.Listing[] memory listings = new IAaveV3ConfigEngine.Listing[](1); + + listings[0] = IAaveV3ConfigEngine.Listing({ + asset: FBTC, + assetSymbol: 'FBTC', + priceFeed: 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c, + enabledToBorrow: EngineFlags.ENABLED, + borrowableInIsolation: EngineFlags.DISABLED, + withSiloedBorrowing: EngineFlags.DISABLED, + flashloanable: EngineFlags.ENABLED, + ltv: 73_00, + liqThreshold: 78_00, + liqBonus: 7_50, + reserveFactor: 50_00, + supplyCap: 200, + borrowCap: 100, + debtCeiling: 0, + liqProtocolFee: 10_00, + rateStrategyParams: IAaveV3ConfigEngine.InterestRateInputData({ + optimalUsageRatio: 45_00, + baseVariableBorrowRate: 0, + variableRateSlope1: 4_00, + variableRateSlope2: 300_00 + }) + }); + + return listings; + } +} diff --git a/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.t.sol b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.t.sol new file mode 100644 index 000000000..e861a0ce7 --- /dev/null +++ b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.t.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers} from 'aave-helpers/src/GovV3Helpers.sol'; +import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; +import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; +import {IEmissionManager} from 'aave-v3-origin/contracts/rewards/interfaces/IEmissionManager.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/src/ProtocolV3TestBase.sol'; +import {AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213} from './AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.sol'; + +/** + * @dev Test for AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213 + * command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.t.sol -vv + */ +contract AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213_Test is ProtocolV3TestBase { + AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 21394751); + proposal = new AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213', + AaveV3Ethereum.POOL, + address(proposal) + ); + } + + function test_collectorHasFBTCFunds() public { + GovV3Helpers.executePayload(vm, address(proposal)); + (address aTokenAddress, , ) = AaveV3Ethereum + .AAVE_PROTOCOL_DATA_PROVIDER + .getReserveTokensAddresses(proposal.FBTC()); + assertGe(IERC20(aTokenAddress).balanceOf(address(AaveV3Ethereum.COLLECTOR)), 10 ** 5); + } + + function test_FBTCAdmin() public { + GovV3Helpers.executePayload(vm, address(proposal)); + (address aFBTC, , ) = AaveV3Ethereum.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses( + proposal.FBTC() + ); + assertEq( + IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(proposal.FBTC()), + proposal.FBTC_LM_ADMIN() + ); + assertEq( + IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin(aFBTC), + proposal.FBTC_LM_ADMIN() + ); + } +} diff --git a/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum.md b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum.md new file mode 100644 index 000000000..7672df608 --- /dev/null +++ b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum.md @@ -0,0 +1,73 @@ +--- +title: "Add FBTC to Aave v3 Main Market on Ethereum" +author: "Aave Chan Initiative" +discussions: "https://governance.aave.com/t/arfc-add-fbtc-to-aave-v3-main-market-on-ethereum/19937" +snapshot: "https://snapshot.box/#/s:aave.eth/proposal/0x2ca8db490e132cebfec25ddbf460b89abd710456c5177bca784abaae9d6009d9" +--- + +## Simple Summary + +The proposal aims to onboard Ignition’s FBTC, to the Aave v3 protocol Main Market on Ethereum. + +## Motivation + +FBTC is a cross-chain BTC protocol that uses the Threshold Signature Scheme network to enable secure, decentralized Bitcoin scalability across multiple blockchains. By leveraging multi-party computation, FBTC strengthens bridge security, safeguarding user assets and ensuring robust cross-chain interoperability. This setup also integrates a cross-chain hub, allowing seamless BTC transfers while reducing issues linked to Bitcoin L2 growth. + +This new asset will broaden opportunities for Bitcoin holders aiming to participate in DeFi on Aave v3. The introduction of FBTC offers users more flexibility in leveraging their Bitcoin, enhancing liquidity and driving increased engagement within the Aave protocol. + +With $480M in total value locked (TVL), FBTC is emerging as a compelling solution in Bitcoin bridging, supported by its upcoming Chainlink Oracle integration to accelerate growth across EVM networks. + +Aave is positioned to benefit from a material increase in AUM resulting from FBTC deposits. This capital is being sourced by from within the Ignition team’s network. Several sophisticated investors are looking to user Aave at size and some teams have built products specifical for investors in anticipationg of the Aave listing. The Ignition team is expected to provide incentives supporting Aave users directly and also strategy providers built on top of Aave. @TokenLogic has been coordinating with various prospective users to ensure there is adequate demand ahead of the listing. + +### Benefits of listing FBTC + +With the evolving landscape surrounding wBTC, having alternative wrapped BTC tokens available for use on Aave is crucial. With Antalpha and Mantle serving as core contributors, Ignition strong reputations position this initiative as a credible alternative to wBTC. This collaborative effort has already garnered over $850 million in TVL. + +The cbBTC listing has demonstrated how impactful an Aave integration can be for both parties involved. Aave successfully captured 74% of the cbBTC supply, showcasing the significant growth potential and mutual benefits such integrations can bring. + +### Liquidity commitments + +FBTC current points campaign is focused on maximizing user engagement and incentivizing interactions within the DeFi ecosystem. As part of this initiative, they aim to highlight Aave by listing it in the featured section, providing prominent exposure to its offerings. Additionally, they plan to create a new DeFi lending category, with Aave being the inaugural protocol, further showcasing its significance in this space. + +To enhance user participation, they will introduce boosted points under the Sparks program, with Aave receiving 2x-4x sparks by default; double the rewards compared to other protocols, which offer 1x-2x. + +For a limited period, it will further amplify rewards by offering a 4x-8x sparks boost on Aave V3 instance, driving even greater engagement and usage. + +## Specification + +The table below illustrates the configured risk parameters for **FBTC** + +| Parameter | Value | +| ------------------------- | -----------------------------------------: | +| Isolation Mode | false | +| Borrowable | ENABLED | +| Collateral Enabled | true | +| Supply Cap (FBTC) | 200 | +| Borrow Cap (FBTC) | 100 | +| Debt Ceiling | USD 0 | +| LTV | 73 % | +| LT | 78 % | +| Liquidation Bonus | 7.5 % | +| Liquidation Protocol Fee | 10 % | +| Reserve Factor | 50 % | +| Base Variable Borrow Rate | 0 % | +| Variable Slope 1 | 4 % | +| Variable Slope 2 | 300 % | +| Uoptimal | 45 % | +| Flashloanable | ENABLED | +| Siloed Borrowing | DISABLED | +| Borrowable in Isolation | DISABLED | +| Oracle | 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c | + +Additionaly [0xac140648435d03f784879cd789130F22Ef588Fcd](https://etherscan.io/address/0xac140648435d03f784879cd789130F22Ef588Fcd) has been set as the emission admin for FBTC and the corresponding aToken. + +## References + +- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.t.sol) +- [Snapshot](https://snapshot.box/#/s:aave.eth/proposal/0x2ca8db490e132cebfec25ddbf460b89abd710456c5177bca784abaae9d6009d9) +- [Discussion](https://governance.aave.com/t/arfc-add-fbtc-to-aave-v3-main-market-on-ethereum/19937) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum_20241213.s.sol b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum_20241213.s.sol new file mode 100644 index 000000000..0a3e376d6 --- /dev/null +++ b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum_20241213.s.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol'; +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; +import {EthereumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol'; +import {AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213} from './AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213.sol'; + +/** + * @dev Deploy Ethereum + * deploy-command: make deploy-ledger contract=src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum_20241213.s.sol:DeployEthereum chain=mainnet + * verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/AddFBTCToAaveV3MainMarketOnEthereum_20241213.s.sol/1/run-latest.json + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Create Proposal + * command: make deploy-ledger contract=src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum_20241213.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction( + type(AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum_20241213).creationCode + ); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/AddFBTCToAaveV3MainMarketOnEthereum.md' + ) + ); + } +} diff --git a/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/config.ts b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/config.ts new file mode 100644 index 000000000..488775d5e --- /dev/null +++ b/src/20241213_AaveV3Ethereum_AddFBTCToAaveV3MainMarketOnEthereum/config.ts @@ -0,0 +1,49 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + author: 'Aave Chan Initiative', + pools: ['AaveV3Ethereum'], + title: 'Add FBTC to Aave v3 Main Market on Ethereum', + shortName: 'AddFBTCToAaveV3MainMarketOnEthereum', + date: '20241213', + discussion: + 'https://governance.aave.com/t/arfc-add-fbtc-to-aave-v3-main-market-on-ethereum/19937', + snapshot: + 'https://snapshot.box/#/s:aave.eth/proposal/0x2ca8db490e132cebfec25ddbf460b89abd710456c5177bca784abaae9d6009d9', + votingNetwork: 'POLYGON', + }, + poolOptions: { + AaveV3Ethereum: { + configs: { + ASSET_LISTING: [ + { + assetSymbol: 'FBTC', + decimals: 8, + priceFeed: '0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c', + ltv: '73', + liqThreshold: '78', + liqBonus: '7.5', + debtCeiling: '0', + liqProtocolFee: '10', + enabledToBorrow: 'ENABLED', + flashloanable: 'ENABLED', + borrowableInIsolation: 'DISABLED', + withSiloedBorrowing: 'DISABLED', + reserveFactor: '50', + supplyCap: '200', + borrowCap: '100', + rateStrategyParams: { + optimalUtilizationRate: '45', + baseVariableBorrowRate: '0', + variableRateSlope1: '4', + variableRateSlope2: '300', + }, + asset: '0xC96dE26018A54D51c097160568752c4E3BD6C364', + admin: '0xac140648435d03f784879cd789130F22Ef588Fcd', + }, + ], + }, + cache: {blockNumber: 21394751}, + }, + }, +};