Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: onboard FBTC on Core market #548

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
```
8 changes: 4 additions & 4 deletions generator/features/assetListing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export const assetListing: FeatureModule<Listing[]> = {
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;
}),
Expand Down Expand Up @@ -151,8 +151,8 @@ export const assetListing: FeatureModule<Listing[]> = {
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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
@@ -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()
);
}
}
Original file line number Diff line number Diff line change
@@ -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/).
Loading