Price oracle adapter smart contracts with upper-bound price protection for assets used by the Aave protocol. These adapters wrap Chainlink price feeds and cap prices to prevent oracle manipulation or malfunction from affecting Aave pools.
Aave protocol relies on external oracles for asset prices. If an oracle returns a negative, zero, or an abnormally high price (due to bugs, manipulation, or errors), it could lead to protocol exploits. This repository provides protective wrappers that:
- Fetches prices from Chainlink oracles
- Validates prices against configured maximum bounds
- Returns capped prices if bounds are exceeded
For Liquid Staking Tokens (wstETH, rETH, weETH, etc.) that grow in value over time.
- Price capped based on maximum allowed yearly growth rate
- Uses snapshot ratio and timestamp as reference values to determine growth since then
- Returns capped ratio if current ratio exceeds calculated maximum
Base contract: PriceCapAdapterBase—see detailed documentation
For USD-pegged stablecoins (USDC, USDT, DAI) with fixed 1:1 peg.
- Price capped at a single configured maximum value (e.g., $1.04 for 4% cap)
- Returns capped price if current price exceeds the fixed maximum
Contract: PriceCapAdapterStable
Combine two price feeds to derive a third pair.
- Does not cap the price derived from the feed's composition
| Adapter | Input Feeds | Output |
|---|---|---|
CLSynchronicityPriceAdapterBaseToPeg |
Asset/USD + ETH/USD | Asset/ETH |
CLSynchronicityPriceAdapterPegToBase |
Asset/ETH + ETH/USD | Asset/USD |
| Adapter | Purpose |
|---|---|
PendlePriceCapAdapter |
PT tokens with linear discount decay |
CLRatePriceCapAdapter |
Generic Chainlink rate-based cap |
DiscountedMKRSKYAdapter |
MKR price from SKY with dynamic discount |
FixedPriceAdapter |
Hardcoded fixed price |
See misc-adapters documentation for details.
├── src/
│ ├── contracts/ # Core adapters
│ │ ├── lst-adapters/ # Asset-specific LST adapters (22 files)
│ │ └── misc-adapters/ # Specialized adapters
│ └── interfaces/
├── scripts/ # Deployment scripts per network
├── tests/ # Test suite per network
├── reports/ # CAPO snapshots, report generator, and markdown outputs
└── security/ # Audit reports
Note
The contracts in this repository use the Shanghai EVM version, please check network support before deploying.
# Install dependencies
make install
# Run tests (unit and adapter/fork tests)
make test
# Run report generator tests
pnpm run vitestBaseTest generates CAPO markdown reports during retrospective tests.
- Input snapshot:
./reports/out/<REPORT_NAME>.json(temporary) - Output report:
./reports/out/<REPORT_NAME>.md
The generator script is reports/capo-report.ts and is executed through FFI:
pnpm exec tsx ./reports/capo-report.ts -i ./reports/mocks/capo.json -o ./reports/out/capo.mdSee how-to.md for detailed instructions on adding LST or stablecoin adapters.
The currently audited adapters expose only latestAnswer(), which is used by Aave v3 Oracle. Aave v4 Oracle uses latestRoundData() instead.
For v4 compatibility:
- Add the
latestRoundData()method to theICLSynchronicityPriceAdapterinterface:
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);- Core Adapters Documentation—Detailed mechanics and formulas
- Misc Adapters Reference—Specialized adapters
- How to Add New Adapters—Step-by-step guide
- The original contracts of this repository were developed inside the CL Synchronicity Price Adapter repository.
- They were later moved and improved in the Aave Capo repository.
- The Aave Capo repository was later renamed to Aave Price Feeds to better reflect its purpose.
- Following the Multichain Strategy Proposal, we removed the scripts and tests for the Soneium and zkSync chains from this repository. Please refer to address-book for deployed adapter addresses.
Copyright © 2026, Aave DAO, represented by its governance smart contracts.
Created by BGD Labs.
The default license of this repository is BUSL1.1, but all interfaces are open source, MIT-licensed.
IMPORTANT. The BUSL1.1 license of this repository allows for any usage of the software, if respecting the Additional Use Grant limitations, forbidding any use case damaging anyhow the Aave DAO's interests.
