CAPO Adapter Maintenance Update
CAPO Adapter Maintenance Update
Author
BGD Labs (@bgdlabs)
Creator
0xf71fc92e2949ccF6A5Fd369a0b402ba80Bc61E02
Simple Summary
Maintenance proposal to update stable price cap adapters across all v2 and v3 instances to the latest version. The sDAI adapters on Ethereum and Gnosis Aave instances are also updated from non-capo to capo adapters, and USDS adapters are updated to use USDS/USD feed from the previous DAI/USD feed, given that liquidity of USDS is perfectly normalized.
Motivation
With the Aave Generalized Risk Stewards (AGRS) being activated on proposal 197 it is important to update the CAPO adapters for stablecoins across both Aave V2 and V3 instances for it to work seamlessly with the new system. Currently this is not possible, because certain CAPOs are missing a getter method getPriceCap() which prevents the AGRS system from updating the price caps.
The CAPO adapter for sDAI was not activated before due to its un-stability on its growth rate, but with positive signaling from Chaos Labs, it is now to be enabled on Aave V3 Ethereum and Aave V3 Gnosis instances.
USDS asset was listed with a Chainlink DAI/USD underlying feed as given the asset was just released, and its underlying equivalence with DAI. Since USDS is totally stable now, it is reasonable to migrate to an USDS/USD feed.
Specification
The following stable-coin CAPO feeds are being updated across all networks and instances:
| Aave Instances | Underlying assets for which CAPO feed is updated |
|---|---|
| AaveV3Ethereum | USDC, USDT, USDS, DAI, LUSD, FRAX, crvUSD, pyUSD, sDAI |
| AaveV3EthereumLido | USDS |
| AaveV3EthereumEtherFi | USDC, pyUSD, FRAX |
| AaveV2Ethereum | USDC, USDT, DAI, FRAX, LUSD, USDP, sUSD, BUSD, TUSD, UST |
| AaveV3Polygon | USDC, USDCn, USDT, DAI, miMATIC, |
| AaveV2Polygon | USDC, USDT, DAI |
| AaveV3Avalanche | USDC, USDT, DAI, FRAX, MAI |
| AaveV2Avalanche | USDC, USDT, DAI |
| AaveV3Arbitrum | USDC, USDCn, USDT, DAI, MAI, LUSD, FRAX |
| AaveV3Optimism | USDC, USDCn, USDT, DAI, MAI, LUSD, FRAX |
| AaveV3Base | USDC, USDbC |
| AaveV3BNB | USDC, USDT, fdUSD |
| AaveV3Gnosis | USDC, USDCe, wxDAI, sDAI |
| AaveV3Metis | USDC, USDT, DAI |
| AaveV3Scroll | USDC |
Price Feeds will be updated using AAVE_ORACLE.setAssetSource() method on Aave V2 Instances and using config-engine on Aave V3 Instances.
Please note that the configurations for the Price Caps adapters and the underlying chainlink feeds are exactly the same as before. Also, price feeds of AaveV2 instances are updated as their underlying feed used ASSET/USD could also be updated via the Stewards using the AaveV3 ACL_MANAGER contract
To be more explicit on the code changes between the previous stablecoin CAPO feed and the new one on v3 markets, the following method is being added on the new stablecoin CAPO feed:
/// @inheritdoc IPriceCapAdapterStable
function getPriceCap() external view returns (int256) {
return _priceCap;
}
On v2 markets, the code diff between the previous feed and the new feed is zero, however the ASSET_TO_PEG underlying feed of the CLSynchronicityPriceAdapterBaseToPeg contract uses the new CAPO feed than the previous.
More detailed on-chain code diffs can be found below:
-
Ethereum V3 Core:
- CURRENT_SDAI_NEW_SDAI: Big diff as feed changed from non-capo to capo
- CURRENT_USDS_NEW_USDS: Only unrelated dependency changes
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_USDT_NEW_USDC: No diff
- CURRENT_USDT_CURRENT_USDC: No diff
- NEW_DAI_NEW_USDC: No diff
- CURRENT_DAI_CURRENT_USDC: No diff
- NEW_LUSD_NEW_USDC: No diff
- CURRENT_LUSD_CURRENT_USDC: No diff
- NEW_FRAX_NEW_USDC: No diff
- CURRENT_FRAX_CURRENT_USDC: No diff
- NEW_CRVUSD_NEW_USDC: No diff
- CURRENT_CRVUSD_CURRENT_USDC: No diff
- NEW_PYUSD_NEW_USDC: No diff
- CURRENT_PYUSD_CURRENT_USDC: No diff
-
Ethereum V3 Prime:
- CURRENT_USDS_NEW_USDS: Only unrelated dependency changes
-
Ethereum V3 EtherFi:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_PYUSD_NEW_USDC: No diff
- CURRENT_PYUSD_CURRENT_USDC: No diff
- NEW_FRAX_NEW_USDC: No diff
- CURRENT_FRAX_CURRENT_USDC: No diff
- CURRENT_USDC_NEW_USDC: Addition of
-
Ethereum V2:
- CURRENT_USDC_NEW_USDC: No diff
- CURRENT_USDT_NEW_USDT: No diff
- CURRENT_DAI_NEW_DAI: No diff
- CURRENT_FRAX_NEW_FRAX: No diff
- CURRENT_LUSD_NEW_LUSD: No diff
- CURRENT_USDP_NEW_USDP: No diff
- CURRENT_SUSD_NEW_SUSD: No diff
- CURRENT_BUSD_NEW_BUSD: No diff
- CURRENT_TUSD_NEW_TUSD: No diff
- CURRENT_UST_NEW_UST: No diff
-
Polygon V3:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_USDT_NEW_USDC: No diff
- CURRENT_USDT_CURRENT_USDC: No diff
- NEW_DAI_NEW_USDC: No diff
- CURRENT_DAI_CURRENT_USDC: No diff
- NEW_MIMATIC_NEW_USDC: No diff
- CURRENT_MIMATIC_CURRENT_USDC: No diff
- CURRENT_USDC_NEW_USDC: Addition of
-
Polygon V2:
- CURRENT_USDC_NEW_USDC: No diff
- CURRENT_USDT_NEW_USDT: No diff
- CURRENT_DAI_NEW_DAI: No diff
-
Avalanche V3:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_USDT_NEW_USDC: No diff
- CURRENT_USDT_CURRENT_USDC: No diff
- NEW_DAI_NEW_USDC: No diff
- CURRENT_DAI_CURRENT_USDC: No diff
- NEW_FRAX_NEW_USDC: No diff
- CURRENT_FRAX_CURRENT_USDC: No diff
- NEW_MAI_NEW_USDC: No diff
- CURRENT_MAI_CURRENT_USDC: No diff
- CURRENT_USDC_NEW_USDC: Addition of
-
Avalanche V2:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_USDT_NEW_USDC: No diff
- NEW_DAI_NEW_USDC: No diff
- CURRENT_USDC_NEW_USDC: Addition of
-
Arbitrum V3:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_USDT_NEW_USDC: No diff
- CURRENT_USDT_CURRENT_USDC: No diff
- NEW_DAI_NEW_USDC: No diff
- CURRENT_DAI_CURRENT_USDC: No diff
- NEW_LUSD_NEW_USDC: No diff
- CURRENT_LUSD_CURRENT_USDC: No diff
- NEW_FRAX_NEW_USDC: No diff
- CURRENT_FRAX_CURRENT_USDC: No diff
- NEW_MAI_NEW_USDC: No diff
- CURRENT_MAI_CURRENT_USDC: No diff
- CURRENT_USDC_NEW_USDC: Addition of
-
Optimism V3:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_USDT_NEW_USDC: No diff
- CURRENT_USDT_CURRENT_USDC: No diff
- NEW_DAI_NEW_USDC: No diff
- CURRENT_DAI_CURRENT_USDC: No diff
- NEW_LUSD_NEW_USDC: No diff
- CURRENT_LUSD_CURRENT_USDC: No diff
- NEW_SUSD_NEW_USDC: No diff
- CURRENT_SUSD_CURRENT_USDC: No diff
- NEW_MAI_NEW_USDC: No diff
- CURRENT_MAI_CURRENT_USDC: No diff
- CURRENT_USDC_NEW_USDC: Addition of
-
Base V3:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes
- CURRENT_USDC_NEW_USDC: Addition of
-
BNB V3:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_USDT_NEW_USDC: No diff
- CURRENT_USDT_CURRENT_USDC: No diff
- NEW_FDUSD_NEW_USDC: No diff
- CURRENT_FDUSD_CURRENT_USDC: No diff
- CURRENT_USDC_NEW_USDC: Addition of
-
Gnosis V3:
- CURRENT_SDAI_NEW_SDAI: Big diff as feed changed from non-capo to capo
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes - NEW_WXDAI_NEW_USDC: No diff
- CURRENT_WXDAI_CURRENT_USDC: No diff
-
Scroll V3:
- CURRENT_USDC_NEW_USDC: Addition of
getPriceCap()method plus unrelated dependency changes
- CURRENT_USDC_NEW_USDC: Addition of
As suggested by Risk Contributors (Chaos Labs), the following configuration for CAPO has been set for sDAI on Aave V3 Ethereum and Gnosis instances:
| maxYearlyRatioGrowthPercent | MINIMUM_SNAPSHOT_DELAY |
|---|---|
| 16% | 7 days |
References
- Implementation: AaveV3Ethereum, AaveV3Polygon, AaveV3Avalanche, AaveV3Optimism, AaveV3Arbitrum, AaveV3Metis, AaveV3Base, AaveV3Gnosis, AaveV3Scroll, AaveV3BNB
- Tests: AaveV3Ethereum, AaveV3Polygon, AaveV3Avalanche, AaveV3Optimism, AaveV3Arbitrum, AaveV3Metis, AaveV3Base, AaveV3Gnosis, AaveV3Scroll, AaveV3BNB
- Discussion
Copyright
Copyright and related rights waived via CC0.