Adapters
Adapters normalize lending protocols behind ICoreAdapter. They expose the pool's loan token and market debt index, and provide authorized borrow/repay operations used by keeper automation.
Interface
interface ICoreAdapter {
function loanToken(bytes32 marketId) external view returns (address);
function borrowFor(
bytes32 marketId,
uint256 amount,
address accountOwner,
address receiver
) external;
function repayFor(
bytes32 marketId,
uint256 maxAmount,
address accountOwner
) external returns (uint256 repaid);
function getMarketDebtIndex(bytes32 marketId) external view returns (uint256);
}InterestRatePool allowlists adapters for new pool creation and pins the resolved loan token. Settlement clamps a returned debt index below its previous checkpoint, preventing a downward protocol index from bricking the series.
Account Models
Direct-account adapters act against the user's native lending account and use the protocol's delegation/operator mechanism where required. The repository contains Aave V3, Aave V4, Comet, Dolomite, Euler, Lista/Moolah, LlamaLend, Morpho, and Silo implementations.
Managed-account adapters deploy a dedicated account for each (marketId, accountOwner) pair. Fluid and Compound V2 use this path because their native account models do not provide the required direct delegation.
Adapter mutation is restricted to the pool, the account owner, or an operator approved by that owner in InterestRatePool.
Production Status
The Base deployment currently publishes Aave V3, Morpho, Comet, and Compound V2 managed adapter addresses. Other adapters in src/adapters are code support, not a statement that a live pool exists. Always discover PoolCreated events and confirm the deployed adapter allowlist before presenting a market as executable.
