Skip to content

aave-dao/aave-price-feeds

Repository files navigation

Aave Price Feeds

This repository contains custom oracle adapters used when plain Chainlink pricing is not correct and/or not enough for Aave risk requirements.

Examples

Price Cap adapters architecture

  • LSTs with rate-based caps (wstETH, rsETH, weETH, ezETH, osETH)
  • Stablecoins with fixed caps (USDC, USDT, EURC, RLUSD)
  • Composed feeds for non-direct pairs (e.g. asset/ETH and ETH/USD to derive asset/USD)
  • Pendle PT pricing with time-decaying discount
  • Custom transforms such as discounted MKR from SKY or fixed-price adapters

Adapter types

RatioCapAdapter (LSTs)

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

FixCapAdapter (stablecoins)

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

Synchronicity adapters

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

Specialized adapters

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.

Repository structure

├── src/
│   ├── contracts/                       # Core adapters
│   │   ├── lst-adapters/                # Asset-specific LST adapters (22 files)
│   │   └── misc-adapters/               # Specialized adapters
│   └── interfaces/
├── scripts/                             # Deployment scripts per network
├── tests/                               # Foundry test suites (adapters, unit-tests)
├── reports/                             # CAPO snapshots, report generator, and markdown outputs
└── security/                            # Audit reports

Development

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 vitest

CAPO report generator

BaseTest 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.md

Adding new adapters

See how-to.md for detailed instructions on adding LST or stablecoin adapters.

Aave V4 compatibility

The currently audited adapters expose only latestAnswer(), which is used by Aave v3 Oracle. Aave v4 Oracle uses latestRoundData() instead.

For v4 compatibility:

  1. New adapters must inherit from the IExtendedFeed interface, which implements the latestRoundData() function.

  2. Implement it on the adapter (see latestRoundData() example in OneUSDFixedAdapter.sol).

Security

Audits

Related documentation

Repository history

Note

Following the Multichain Strategy Proposal, Soneium and zkSync scripts and tests have been removed from this repository. For deployed adapter addresses, please consult the address-book repository.

License

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.

About

Custom price feeds for the Aave protocol

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors