Skip to main content
Avana logo

Integrations

Everything a wallet, app, keeper or indexer needs to work with Avana's contracts directly, without Avana's frontend.

Overview

Avana runs on Ethereum and Base. Each chain has one Avana Hub, a Lend Spoke and CDP Spokes per AMM protocol and risk tier. Today the CDP Spokes take Uniswap v3 and Uniswap v4 positions on Ethereum and unstaked Aerodrome Slipstream positions on Base. The Hubs and Spokes are standard, unmodified Aave V4 contracts owned and configured by the Aave DAO; Avana's contracts handle custody, valuation, borrower actions and liquidation around them.

Anyone can call the contracts directly. Avana's frontend and AppKit are optional; repay, debt-free withdrawal, fee collection and liquidation never depend on them. Each chain's contracts are separate: nothing is shared across chains, and every operation runs through that chain's own timelock.

Contracts to Call

ContractWho calls itFor
AaveAdapterBorrowers, apps, anyone repaying for a borrowerEvery borrower action: pledge, re-credit, borrow, repay, withdraw, partial removal, repay-all-and-withdraw, repay with collateral, fee collection, zero-credit release. One per chain.
LPVaultSwapAny unfrozen address: Avana's keeper, other liquidators and flash liquidation helpersLiquidation with liquidate, the only liquidation entry point, funded with the caller's own debt asset
Flash liquidation helperLiquidation callers that hold none of the debt assetflashLiquidate: flash-borrows the debt asset from the Aave V3 Pool, calls liquidate and repays the loan from the caller's payout. Public and immutable, one per chain.
LPOracle, DebtOracleKeepers, anyonepoke() to store price state; views for state and ages
Uniswap v3 or Slipstream position managerBorrowersThe per-token approval of a position to the LPVault before a pledge, and adding liquidity before a re-credit

Addresses

Each chain has its own deployment and its own verified deployment manifest. Upgradeable contracts keep one fixed proxy address for life, and each market's vault token and LPOracle addresses are fixed at listing. Never take a contract address from an untrusted source; use the manifest or the published list.

Per-chain contract addresses are listed on the contracts reference page: Contract Addresses.

Off-Chain Components

ComponentWhat it does
packages/protocolCalldata builders for every AMM integration and chain, built in the browser from a bundled, verified deployment manifest. It ships the upstream Aave error ABIs. Its builders request only the exact approvals listed below.
KeeperAvana's keepers poke every oracle on schedule, record breaker breaches every block, liquidate every eligible account after simulating each liquidation, fund the debt asset from their own inventory or through the flash liquidation helper, pay their own gas and accept a recovery a few units below the debt repaid out of their own payout.
IndexerA Ponder indexer stores live chain events in Postgres for the app: positions, debt and health factors.
App backendStores app data, preferences and intent status. It never supplies a transaction target or calldata, so a compromised backend cannot redirect a user's transaction.

The off-chain code is covered by tests; the on-chain contracts re-check every input, so no off-chain component can authorize an action.

Accounts and Positions

  • Each wallet gets one PositionProxy per CDP Spoke and market, deployed on its first pledge. The proxy address is known before deployment from the Adapter's predictProxy view.
  • Each proxy is a separate Aave account with its own health factor. A problem in one market never makes another market of the same wallet liquidatable.
  • Positions are named by the AMM integration identifier and a position key: the token ID for Uniswap v3, and the token ID with the position-manager generation in its high byte for Slipstream.
  • A market accepts only positions whose tick range equals the market's exactly.

Approvals

Users grant only two kinds of approval, each for exactly what one transaction needs:

  • For a pledge, an approval of exactly one position to the immutable LPVault of that AMM protocol: a per-token ERC-721 approval or permit for Uniswap v3 and Slipstream, or an exact LP-token amount for a fungible-share protocol.
  • For a repay, an approval to the AaveAdapter of exactly the repay amount in the debt asset, for the account being repaid. For a repay-all it is a repay-all quote sized to the deadline; the Adapter pulls it in full and refunds the rest in the same call, leaving zero allowance.
Never use an operator approval for all tokens or an unlimited allowance. Never approve the RiskModule, MarketRegistry, ParameterStore, an oracle, LPVaultSwap, a swap route, the flash source or a proxy. The AaveAdapter is the only spender a user trusts beyond the immutable LPVaults, and an exact amount limits what a faulty Adapter could pull to that one repay.

Deadlines and Nonces

  • Every AaveAdapter entry point and every liquidation takes a deadline and reverts once the block timestamp passes it. Previews use the same deadline and add the margins (interest accrual, Aave's dust rule) that keep the transaction valid until then.
  • Every borrow names the proxy's current borrow nonce. The Adapter consumes it, so a borrow cannot be replayed or reordered.
  • Borrow, withdraw and partial removal take a minimum health factor that the caller chooses. Repay with collateral takes minimum amounts and a minimum repayment, and every swap leg also carries an oracle-derived minimum output.
  • There is no minimum borrow beyond a non-zero amount and no minimum debt. Each pledge must be worth at least the market's minimum pledge value ($10 at launch).

Events to Index

ContractEvents
AaveAdapterUserProxyCreated, CollateralAdded, CollateralSupplied, Borrowed, Repaid, CollateralWithdrawn, CollateralRecredited, CollateralReduced, RepaidWithCollateral, CollateralDisabled, SeizedUnitsBurned
CDP Spoke (per proxy)Supply, Borrow, Repay, Withdraw, LiquidationCall
ProxyManagerProxyDeployed
CollateralizationCollateralPledged, CollateralReleased, RecordReduced, RecordRecredited, RecordDebited, SeizureSettled, SeizureReconciled, PendingSettled, CounterSaturated
LPVaultPositionReceived, PositionReturned, UnitsUnwound, UnitsReleased, FeesCollected, StrayReceived, StrayReturned, MarketBound
LPVaultSwapLiquidationSettled, BorrowerSurplusPaid, FlashLoanUsed, RouteFailed, ResidueReturned, PendingSettlementForwarded, Deleveraged, KeeperAdded, KeeperRemoved
LPOraclePriceStateChanged, PriceAccepted, FailureRecorded, FailureCleared, DisagreementRecorded, DisagreementCleared, OutageExpiredLatched, GraceStarted, QuoteChangeCapped, RouteChanged
DebtOracleDebtPriceStateChanged, DebtPriceAccepted, DebtFailureRecorded, DebtFailureCleared, DebtDisagreementRecorded, DebtOutageExpiredLatched, DebtGraceStarted
MarketRegistryPauseStateChanged, PauseReasonChanged, AddressFrozen, AddressUnfrozen, BreakerLatched, GateBreached, BreakerReset, StandbyRouteActivated, MarketActivated, MarketOffboarding, WindDownStepped, MarketClosed, RouteDisabled
RiskModuleBreakersPoked, ConfigDriftDetected
ParameterStoreParameterSet, ParameterTightened, ParameterLoosened, CapTightened, CapLoosened, MinPledgeUsdSet, FeedConfigured, SecondSourceSwitched
VaultTokenFactory, vault tokensIntegrationRegistered, VaultTokenDeployed, Transfer, ProxyAdded
Flash liquidation helperFlashLiquidated
Payout escrowRemainderEscrowed, RemainderClaimed
AvanaTimelockCallScheduled, CallExecuted, Cancelled, NormalDelayChanged, ShortDelaySelectorSet, PublicExecutionToggled, ExpiredOperationCleaned

Borrowers and apps should watch the timelock's scheduled operations: every normal-delay change is public for 5 days before it executes, which is the window to exit if a change is unwelcome.

Integration Pages