Skip to content

Commit 987e1dc

Browse files
committed
changes in docs, target names and redeployments
1 parent 0376218 commit 987e1dc

File tree

13 files changed

+53
-51
lines changed

13 files changed

+53
-51
lines changed

contracts/plugins/assets/aerodrome/AerodromePoolTokens.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import "contracts/plugins/assets/OracleLib.sol";
88
import "contracts/libraries/Fixed.sol";
99
import "./vendor/IAeroPool.sol";
1010

11-
/// Supports Aerodrome stable pools (2 tokens)
11+
/// Supports Aerodrome stable and volatile pools (2 tokens)
1212
contract AerodromePoolTokens {
1313
using OracleLib for AggregatorV3Interface;
1414
using FixLib for uint192;
@@ -20,7 +20,7 @@ contract AerodromePoolTokens {
2020

2121
enum AeroPoolType {
2222
Stable,
23-
Volatile // not supported in this version
23+
Volatile
2424
}
2525

2626
// === State (Immutable) ===

contracts/plugins/assets/aerodrome/AerodromeStableCollateral.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ contract AerodromeStableCollateral is AerodromeVolatileCollateral {
1919
using FixLib for uint192;
2020

2121
/// @dev config Unused members: chainlinkFeed, oracleError, oracleTimeout
22-
/// @dev No revenue hiding (refPerTok() == FIX_ONE)
22+
/// @dev No revenue hiding (refPerTok() is constant)
2323
/// @dev config.erc20 should be an AerodromeStakingWrapper
2424
constructor(CollateralConfig memory config, APTConfiguration memory aptConfig)
2525
AerodromeVolatileCollateral(config, aptConfig)

contracts/plugins/assets/aerodrome/AerodromeVolatileCollateral.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ contract AerodromeVolatileCollateral is FiatCollateral, AerodromePoolTokens {
3131
using FixLib for uint192;
3232

3333
/// @dev config Unused members: chainlinkFeed, oracleError, oracleTimout
34-
/// @dev No revenue hiding (refPerTok() == FIX_ONE)
34+
/// @dev No revenue hiding (refPerTok() is constant)
3535
/// @dev config.erc20 should be an AerodromeStakingWrapper
3636
constructor(CollateralConfig memory config, APTConfiguration memory aptConfig)
3737
FiatCollateral(config)

contracts/plugins/assets/aerodrome/README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Aerodrome Stable Collateral Plugin
1+
# Aerodrome Collateral Plugins
22

3-
[Aerodrome Finance](https://aerodrome.finance) is an AMM designed to serve as Base's central liquidity hub. This plugin enables the use of any Aerodrome Stable LP token as collateral within the Reserve Protocol.
3+
[Aerodrome Finance](https://aerodrome.finance) is an AMM designed to serve as Base's central liquidity hub. This plugin enables the use of any Aerodrome Stable and Volatile LP token as collateral within the Reserve Protocol.
44

55
Aerodrome Finance offers two different liquidity pool types based on token pair needs, `Stable Pools` and `Volatile Pools`.
66

7-
Only `Stable Pools` are currently supported. These pools are designed for tokens which have little to no volatility, and use the current formula for pricing tokens:
7+
`Stable Pools` are designed for tokens which have little to no volatility, and use the current formula for pricing tokens: `x³y + y³x ≥ k`
88

9-
`x³y + y³x ≥ k`
9+
`Volatile Pools` are designed for tokens with high price volatility, and use a generic AMM formula: `x × y ≥ k`
1010

1111
## Usage
1212

@@ -36,10 +36,12 @@ Internally, all `tokensPriceFeeds` are stored as multiple separate immutable var
3636

3737
### refPerTok
3838

39-
Aerodrome Stable Pools do not appreciate in value over time, so `refPerTok()` will be constant for these plugins and will not change. This also means there are no hard default checks in place.
39+
Aerodrome Pools do not appreciate in value over time, so `refPerTok()` will be constant for these plugins and will not change. This also means there are no hard default checks in place.
4040

4141
## Implementation
4242

43-
| `tok` | `ref` | `target` | `UoA` |
44-
| :------------------: | :---------------: | :------: | :---: |
45-
| Aero Staking Wrapper | LP token /w shift | USD | USD |
43+
| `tok` | `ref` | `target` | `UoA` |
44+
| :------------------: | :---------------: | :--------: | :---: |
45+
46+
Stable | Aero Staking Wrapper | LP token /w shift | USD | USD |
47+
Volatile | Aero Staking Wrapper | LP token /w shift | cpAMM | USD |

scripts/addresses/8453-tmp-assets-collateral.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"cUSDCv3": "0xf7a9D27c3B60c78c6F6e2c2d6ED6E8B94b352461",
1515
"wstETH": "0x8b4374005291B8FCD14C4E947604b2FB3C660A73",
1616
"aeroUSDCeUSD": "0x9216CD5cA133aBBd23cc6F873bB4a95A78032db0",
17-
"aeroWETHAERO": "0x1bD9eAEB0eD1aB51dA1Ff8D437892488790bbde7",
18-
"aeroMOGWETH": "0x6Ec09BD7d32F1023626AaEa1090e178d81C7701A",
17+
"aeroWETHAERO": "0xaC23df4289e2FeaFb2851e63958C2AAF41DB4833",
18+
"aeroMOGWETH": "0xfAa0cfc986041a3aF69207C6fCF35316D58fEA6a",
1919
"meUSD": "0x0f1e10871e6a2D3A5Aa696b85b39d61a22A9e8C3",
2020
"aeroUSDzUSDC": "0x8AAdfbea33146e28170F99D031B7747EAa87DDD4",
21-
"aeroWETHcbBTC": "0x053faB552020e7E6Eda010134032d8d4A30aD0Ff",
22-
"aeroWETHWELL": "0x0F9d92D28B33E79A56b32d15aEeDbE20820290E5",
23-
"aeroWETHDEGEN": "0x672664DFdF6666F0dE32CA46F1390cFa74454F88"
21+
"aeroWETHcbBTC": "0x5ABe1A8b04A2428589bAeF9486d12688d482D061",
22+
"aeroWETHWELL": "0x7df3541FFeDAA956aE6136E64253f3749b055Be6",
23+
"aeroWETHDEGEN": "0xc8E72288f717Da55b7231365daE17AcD91b59705"
2424
},
2525
"erc20s": {
2626
"COMP": "0x9e1028F5F1D5eDE59748FFceE5532509976840E0",
@@ -34,13 +34,13 @@
3434
"cUSDCv3": "0x53f1Df4E5591Ae35Bf738742981669c3767241FA",
3535
"wstETH": "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452",
3636
"aeroUSDCeUSD": "0xDB5b8cead52f77De0f6B5255f73F348AAf2CBb8D",
37-
"aeroWETHAERO": "0x3712DDCF9aE516dD01042948B76A76901a84CD36",
38-
"aeroMOGWETH": "0xCcC18B21be01a37ebFa5C932eD09574752F88C15",
37+
"aeroWETHAERO": "0x65f2c1b253a3E45670aDD259C9688Edf1A3b814d",
38+
"aeroMOGWETH": "0xfaAC26b279338dF8cF56B11A572617f674A2F69C",
3939
"meUSD": "0xbb819D845b573B5D7C538F5b85057160cfb5f313",
4040
"AERO": "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
4141
"aeroUSDzUSDC": "0x246Df11B856E9fD6120494F168475e1b41321c61",
42-
"aeroWETHcbBTC": "0x864E79375917c28879F2262F6AC3F08eC887A489",
43-
"aeroWETHWELL": "0x8Fab568e9881b9c2aCC0e594A1DE8D463d783Ecb",
44-
"aeroWETHDEGEN": "0x30d4993331F542300bc1f8247BEAA4e52219ba83"
42+
"aeroWETHcbBTC": "0x4BD08a771CdAbA5333CAc6F20322eD7d72b6cBfA",
43+
"aeroWETHWELL": "0x1F599F8657CAA38Ee825e4E2d64F695749E2a161",
44+
"aeroWETHDEGEN": "0xA762F790a31654D9AeF7DE550A473A0F5621E4F1"
4545
}
46-
}
46+
}

scripts/addresses/8453-tmp-deployments.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@
3737
"stRSR": "0x4Cf200D7fA568611DD8B4BD85053ba9419982C7D"
3838
}
3939
}
40-
}
40+
}

scripts/addresses/base-4.0.0/8453-tmp-assets-collateral.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
"meUSD": "0x0f1e10871e6a2D3A5Aa696b85b39d61a22A9e8C3",
77
"aeroUSDCeUSD": "0x9216CD5cA133aBBd23cc6F873bB4a95A78032db0",
88
"aeroUSDzUSDC": "0x8AAdfbea33146e28170F99D031B7747EAa87DDD4",
9-
"aeroWETHAERO": "0x1bD9eAEB0eD1aB51dA1Ff8D437892488790bbde7",
10-
"aeroMOGWETH": "0x6Ec09BD7d32F1023626AaEa1090e178d81C7701A",
11-
"aeroWETHcbBTC": "0x053faB552020e7E6Eda010134032d8d4A30aD0Ff",
12-
"aeroWETHWELL": "0x0F9d92D28B33E79A56b32d15aEeDbE20820290E5",
13-
"aeroWETHDEGEN": "0x672664DFdF6666F0dE32CA46F1390cFa74454F88"
9+
"aeroWETHAERO": "0xaC23df4289e2FeaFb2851e63958C2AAF41DB4833",
10+
"aeroMOGWETH": "0xfAa0cfc986041a3aF69207C6fCF35316D58fEA6a",
11+
"aeroWETHcbBTC": "0x5ABe1A8b04A2428589bAeF9486d12688d482D061",
12+
"aeroWETHWELL": "0x7df3541FFeDAA956aE6136E64253f3749b055Be6",
13+
"aeroWETHDEGEN": "0xc8E72288f717Da55b7231365daE17AcD91b59705"
1414
},
1515
"erc20s": {
1616
"meUSD": "0xbb819D845b573B5D7C538F5b85057160cfb5f313",
1717
"aeroUSDCeUSD": "0xDB5b8cead52f77De0f6B5255f73F348AAf2CBb8D",
1818
"AERO": "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
1919
"aeroUSDzUSDC": "0x246Df11B856E9fD6120494F168475e1b41321c61",
20-
"aeroWETHAERO": "0x3712DDCF9aE516dD01042948B76A76901a84CD36",
21-
"aeroMOGWETH": "0xCcC18B21be01a37ebFa5C932eD09574752F88C15",
22-
"aeroWETHcbBTC": "0x864E79375917c28879F2262F6AC3F08eC887A489",
23-
"aeroWETHWELL": "0x8Fab568e9881b9c2aCC0e594A1DE8D463d783Ecb",
24-
"aeroWETHDEGEN": "0x30d4993331F542300bc1f8247BEAA4e52219ba83"
20+
"aeroWETHAERO": "0x65f2c1b253a3E45670aDD259C9688Edf1A3b814d",
21+
"aeroMOGWETH": "0xfaAC26b279338dF8cF56B11A572617f674A2F69C",
22+
"aeroWETHcbBTC": "0x4BD08a771CdAbA5333CAc6F20322eD7d72b6cBfA",
23+
"aeroWETHWELL": "0x1F599F8657CAA38Ee825e4E2d64F695749E2a161",
24+
"aeroWETHDEGEN": "0xA762F790a31654D9AeF7DE550A473A0F5621E4F1"
2525
}
2626
}

scripts/deployment/phase2-assets/collaterals/deploy_aerodrome_mog_weth.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function main() {
6565

6666
// Only for Base
6767
if (baseL2Chains.includes(hre.network.name)) {
68-
const AerodromeStableCollateralFactory = await hre.ethers.getContractFactory(
68+
const AerodromeVolatileCollateralFactory = await hre.ethers.getContractFactory(
6969
'AerodromeVolatileCollateral'
7070
)
7171
const AerodromeGaugeWrapperFactory = await ethers.getContractFactory('AerodromeGaugeWrapper')
@@ -87,14 +87,14 @@ async function main() {
8787
`Deployed wrapper for Aerodrome Volatile MOG-WETH pool on ${hre.network.name} (${chainId}): ${wMogWeth.address} `
8888
)
8989

90-
const oracleError = combinedError(MOG_ORACLE_ERROR, ETH_ORACLE_ERROR) // 0.5% & 0.5%
90+
const oracleError = combinedError(MOG_ORACLE_ERROR, ETH_ORACLE_ERROR) // 0.5% & 0.15%
9191

92-
collateral = <AerodromeVolatileCollateral>await AerodromeStableCollateralFactory.connect(
92+
collateral = <AerodromeVolatileCollateral>await AerodromeVolatileCollateralFactory.connect(
9393
deployer
9494
).deploy(
9595
{
9696
erc20: wMogWeth.address,
97-
targetName: ethers.utils.formatBytes32String('50%ETH50%MOG'), // lexicographical order for tokens
97+
targetName: ethers.utils.formatBytes32String('MOG_ETH_AERODROME_cpAMM'),
9898
priceTimeout: PRICE_TIMEOUT,
9999
chainlinkFeed: ONE_ADDRESS, // unused but cannot be zero
100100
oracleError: oracleError.toString(), // unused but cannot be zero

scripts/deployment/phase2-assets/collaterals/deploy_aerodrome_weth_aero.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function main() {
6565

6666
// Only for Base
6767
if (baseL2Chains.includes(hre.network.name)) {
68-
const AerodromeStableCollateralFactory = await hre.ethers.getContractFactory(
68+
const AerodromeVolatileCollateralFactory = await hre.ethers.getContractFactory(
6969
'AerodromeVolatileCollateral'
7070
)
7171
const AerodromeGaugeWrapperFactory = await ethers.getContractFactory('AerodromeGaugeWrapper')
@@ -89,12 +89,12 @@ async function main() {
8989

9090
const oracleError = combinedError(AERO_ORACLE_ERROR, ETH_ORACLE_ERROR) // 0.5% & 0.15%
9191

92-
collateral = <AerodromeVolatileCollateral>await AerodromeStableCollateralFactory.connect(
92+
collateral = <AerodromeVolatileCollateral>await AerodromeVolatileCollateralFactory.connect(
9393
deployer
9494
).deploy(
9595
{
9696
erc20: wWethAero.address,
97-
targetName: ethers.utils.formatBytes32String('50%AERO50%ETH'), // lexicographical order for tokens
97+
targetName: ethers.utils.formatBytes32String('ETH_AERO_AERODROME_cpAMM'),
9898
priceTimeout: PRICE_TIMEOUT,
9999
chainlinkFeed: ONE_ADDRESS, // unused but cannot be zero
100100
oracleError: oracleError.toString(), // unused but cannot be zero

scripts/deployment/phase2-assets/collaterals/deploy_aerodrome_weth_cbbtc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function main() {
6565

6666
// Only for Base
6767
if (baseL2Chains.includes(hre.network.name)) {
68-
const AerodromeStableCollateralFactory = await hre.ethers.getContractFactory(
68+
const AerodromeVolatileCollateralFactory = await hre.ethers.getContractFactory(
6969
'AerodromeVolatileCollateral'
7070
)
7171
const AerodromeGaugeWrapperFactory = await ethers.getContractFactory('AerodromeGaugeWrapper')
@@ -89,12 +89,12 @@ async function main() {
8989

9090
const oracleError = combinedError(cbBTC_ORACLE_ERROR, ETH_ORACLE_ERROR) // 0.3% & 0.15%
9191

92-
collateral = <AerodromeVolatileCollateral>await AerodromeStableCollateralFactory.connect(
92+
collateral = <AerodromeVolatileCollateral>await AerodromeVolatileCollateralFactory.connect(
9393
deployer
9494
).deploy(
9595
{
9696
erc20: wWethcbBTC.address,
97-
targetName: ethers.utils.formatBytes32String('50%BTC50%ETH'), // lexicographical order for tokens
97+
targetName: ethers.utils.formatBytes32String('ETH_BTC_AERODROME_cpAMM'),
9898
priceTimeout: PRICE_TIMEOUT,
9999
chainlinkFeed: ONE_ADDRESS, // unused but cannot be zero
100100
oracleError: oracleError.toString(), // unused but cannot be zero

scripts/deployment/phase2-assets/collaterals/deploy_aerodrome_weth_degen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function main() {
6565

6666
// Only for Base
6767
if (baseL2Chains.includes(hre.network.name)) {
68-
const AerodromeStableCollateralFactory = await hre.ethers.getContractFactory(
68+
const AerodromeVolatileCollateralFactory = await hre.ethers.getContractFactory(
6969
'AerodromeVolatileCollateral'
7070
)
7171
const AerodromeGaugeWrapperFactory = await ethers.getContractFactory('AerodromeGaugeWrapper')
@@ -89,12 +89,12 @@ async function main() {
8989

9090
const oracleError = combinedError(DEGEN_ORACLE_ERROR, ETH_ORACLE_ERROR) // 0.5% & 0.15%
9191

92-
collateral = <AerodromeVolatileCollateral>await AerodromeStableCollateralFactory.connect(
92+
collateral = <AerodromeVolatileCollateral>await AerodromeVolatileCollateralFactory.connect(
9393
deployer
9494
).deploy(
9595
{
9696
erc20: wWethDEGEN.address,
97-
targetName: ethers.utils.formatBytes32String('50%DEGEN50%ETH'), // lexicographical order for tokens
97+
targetName: ethers.utils.formatBytes32String('ETH_DEGEN_AERODROME_cpAMM'),
9898
priceTimeout: PRICE_TIMEOUT,
9999
chainlinkFeed: ONE_ADDRESS, // unused but cannot be zero
100100
oracleError: oracleError.toString(), // unused but cannot be zero

scripts/deployment/phase2-assets/collaterals/deploy_aerodrome_weth_well.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function main() {
6565

6666
// Only for Base
6767
if (baseL2Chains.includes(hre.network.name)) {
68-
const AerodromeStableCollateralFactory = await hre.ethers.getContractFactory(
68+
const AerodromeVolatileCollateralFactory = await hre.ethers.getContractFactory(
6969
'AerodromeVolatileCollateral'
7070
)
7171
const AerodromeGaugeWrapperFactory = await ethers.getContractFactory('AerodromeGaugeWrapper')
@@ -89,12 +89,12 @@ async function main() {
8989

9090
const oracleError = combinedError(WELL_ORACLE_ERROR, ETH_ORACLE_ERROR) // 0.5% & 0.15%
9191

92-
collateral = <AerodromeVolatileCollateral>await AerodromeStableCollateralFactory.connect(
92+
collateral = <AerodromeVolatileCollateral>await AerodromeVolatileCollateralFactory.connect(
9393
deployer
9494
).deploy(
9595
{
9696
erc20: wWethWELL.address,
97-
targetName: ethers.utils.formatBytes32String('50%ETH50%WELL'), // lexicographical order for tokens
97+
targetName: ethers.utils.formatBytes32String('ETH_WELL_AERODROME_cpAMM'),
9898
priceTimeout: PRICE_TIMEOUT,
9999
chainlinkFeed: ONE_ADDRESS, // unused but cannot be zero
100100
oracleError: oracleError.toString(), // unused but cannot be zero

test/plugins/individual-collateral/aerodrome/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const FIX_ONE = 1n * 10n ** 18n
107107
export const ORACLE_ERROR = fp('0.005')
108108
export const PRICE_TIMEOUT = bn('604800') // 1 week
109109
export const DEFAULT_THRESHOLD = fp('0.02') // 2%
110-
export const DELAY_UNTIL_DEFAULT = bn('259200') // 72h CAREFUL THIS IS ONLY FOR RTOKEN POOLS
110+
export const DELAY_UNTIL_DEFAULT = bn('259200') // 72h CAREFUL THIS IS ONLY FOR STABLE POOLS
111111
export const MAX_TRADE_VOL = fp('1e6')
112112

113113
export enum AerodromePoolType {

0 commit comments

Comments
 (0)