통합
지갑, 앱, 키퍼, 인덱서가 Avana 프런트엔드 없이 Avana 컨트랙트와 직접 작동하는 데 필요한 모든 것.
개요
Avana는 Ethereum과 Base에서 운영됩니다. 각 체인에는 하나의 Avana Hub, Lend Spoke, 그리고 AMM 프로토콜과 리스크 등급별 CDP Spoke가 있습니다. 현재 CDP Spoke는 Ethereum의 Uniswap v3 및 Uniswap v4 포지션과 Base의 스테이킹되지 않은 Aerodrome Slipstream 포지션을 받습니다. Hub와 Spoke는 Aave DAO가 소유하고 구성하는 수정되지 않은 표준 Aave V4 컨트랙트이며, Avana의 컨트랙트는 그 주변에서 수탁, 가치 평가, 차입자 작업, 청산을 처리합니다.
누구나 컨트랙트를 직접 호출할 수 있습니다. Avana 프런트엔드와 AppKit은 선택 사항이며, 상환, 부채 없는 인출, 수수료 수령, 청산은 절대 이들에 의존하지 않습니다. 각 체인의 컨트랙트는 분리되어 있습니다: 체인 간에 공유되는 것은 없으며, 모든 작업은 해당 체인 자체의 타임락을 통해 실행됩니다.
호출할 컨트랙트
| 컨트랙트 | 호출 주체 | For |
|---|---|---|
| AaveAdapter | 차입자, 앱, 차입자를 대신해 상환하는 누구나 | 모든 차입자 작업: 담보 제공, 재인정, 차입, 상환, 인출, 부분 제거, 전액 상환 후 인출, 담보로 상환, 수수료 수령, 인정 단위 0 해제. 체인당 하나. |
| LPVaultSwap | 동결되지 않은 모든 주소: Avana의 키퍼, 다른 청산인, 플래시 청산 헬퍼 | 다음을 통한 청산: liquidate, 유일한 청산 진입점이며 호출자 자신의 부채 자산으로 자금을 제공 |
| 플래시 청산 헬퍼 | 부채 자산을 전혀 보유하지 않은 청산 호출자 | flashLiquidate: Aave V3 Pool에서 부채 자산을 플래시 차입하고, liquidate를 호출하고, 호출자의 지급액에서 대출을 상환합니다. 공개되어 있고 변경 불가능하며, 체인당 하나입니다. |
| LPOracle, DebtOracle | 키퍼, 누구나 | poke() 로 가격 상태 저장, 상태와 연령에 대한 뷰 |
| Uniswap v3 또는 Slipstream 포지션 매니저 | 차입자 | 담보 제공 전 LPVault에 대한 포지션의 토큰별 승인, 재인정 전 유동성 추가 |
주소
각 체인에는 자체 배포와 자체 검증된 배포 매니페스트가 있습니다. 업그레이드 가능한 컨트랙트는 평생 하나의 고정 프록시 주소를 유지하며, 각 마켓의 vault token과 LPOracle 주소는 상장 시 고정됩니다. 신뢰할 수 없는 출처에서 컨트랙트 주소를 가져오지 마세요. 매니페스트나 공개된 목록을 사용하세요.
체인별 컨트랙트 주소는 컨트랙트 참조 페이지에 나열되어 있습니다: 컨트랙트 주소.
오프체인 구성 요소
| 구성 요소 | 역할 |
|---|---|
packages/protocol | Calldata 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. |
| 키퍼 | Avana'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. |
| 인덱서 | Ponder 인덱서가 앱을 위해 실시간 체인 이벤트를 Postgres에 저장합니다: 포지션, 부채, 헬스 팩터. |
| 앱 백엔드 | 앱 데이터, 설정, 인텐트 상태를 저장합니다. 트랜잭션 대상이나 calldata를 제공하지 않으므로, 손상된 백엔드도 사용자의 트랜잭션을 다른 곳으로 돌릴 수 없습니다. |
오프체인 코드는 테스트로 검증되며, 온체인 컨트랙트가 모든 입력을 다시 검사하므로 어떤 오프체인 구성 요소도 작업을 승인할 수 없습니다.
계정과 포지션
- 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뷰로 알 수 있습니다. - 각 프록시는 자체 헬스 팩터를 가진 별도의 Aave 계정입니다. 한 마켓의 문제가 같은 지갑의 다른 마켓을 청산 가능하게 만들지 않습니다.
- 포지션은 AMM 통합 식별자와 포지션 키로 지정됩니다: Uniswap v3는 토큰 ID, Slipstream은 최상위 바이트에 포지션 매니저 세대가 담긴 토큰 ID입니다.
- 마켓은 틱 범위가 마켓의 것과 정확히 같은 포지션만 받습니다.
승인
사용자는 두 종류의 승인만 부여하며, 각각 하나의 트랜잭션에 필요한 만큼만 정확히 부여합니다:
- 담보 제공의 경우, 해당 AMM 프로토콜의 변경 불가능한 LPVault에 정확히 하나의 포지션에 대한 승인: Uniswap v3와 Slipstream은 토큰별 ERC-721 승인 또는 permit, 대체 가능한 지분 프로토콜은 정확한 LP 토큰 수량.
- 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.
기한과 nonce
- 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.
- 모든 차입은 프록시의 현재 차입 nonce를 지정합니다. Adapter가 이를 소비하므로 차입은 재실행되거나 순서가 바뀔 수 없습니다.
- 차입, 인출, 부분 제거는 호출자가 선택한 최소 헬스 팩터를 받습니다. 담보로 상환은 최소 금액과 최소 상환액을 받으며, 모든 스왑 레그에는 오라클에서 도출한 최소 산출량도 있습니다.
- 0이 아닌 금액 외에는 최소 차입액이 없으며 최소 부채도 없습니다. 각 담보 제공은 마켓의 최소 담보 제공 가치(출시 시 $10) 이상이어야 합니다.
인덱싱할 이벤트
| 컨트랙트 | 이벤트 |
|---|---|
| AaveAdapter | UserProxyCreated, CollateralAdded, CollateralSupplied, Borrowed, Repaid, CollateralWithdrawn, CollateralRecredited, CollateralReduced, RepaidWithCollateral, CollateralDisabled, SeizedUnitsBurned |
| CDP Spoke(프록시별) | Supply, Borrow, Repay, Withdraw, LiquidationCall |
| ProxyManager | ProxyDeployed |
| Collateralization | CollateralPledged, CollateralReleased, RecordReduced, RecordRecredited, RecordDebited, SeizureSettled, SeizureReconciled, PendingSettled, CounterSaturated |
| LPVault | PositionReceived, PositionReturned, UnitsUnwound, UnitsReleased, FeesCollected, StrayReceived, StrayReturned, MarketBound |
| LPVaultSwap | LiquidationSettled, BorrowerSurplusPaid, FlashLoanUsed, RouteFailed, ResidueReturned, PendingSettlementForwarded, Deleveraged, KeeperAdded, KeeperRemoved |
| LPOracle | PriceStateChanged, PriceAccepted, FailureRecorded, FailureCleared, DisagreementRecorded, DisagreementCleared, OutageExpiredLatched, GraceStarted, QuoteChangeCapped, RouteChanged |
| DebtOracle | DebtPriceStateChanged, DebtPriceAccepted, DebtFailureRecorded, DebtFailureCleared, DebtDisagreementRecorded, DebtOutageExpiredLatched, DebtGraceStarted |
| MarketRegistry | PauseStateChanged, PauseReasonChanged, AddressFrozen, AddressUnfrozen, BreakerLatched, GateBreached, BreakerReset, StandbyRouteActivated, MarketActivated, MarketOffboarding, WindDownStepped, MarketClosed, RouteDisabled |
| RiskModule | BreakersPoked, ConfigDriftDetected |
| ParameterStore | ParameterSet, ParameterTightened, ParameterLoosened, CapTightened, CapLoosened, MinPledgeUsdSet, FeedConfigured, SecondSourceSwitched |
| VaultTokenFactory, vault token | IntegrationRegistered, VaultTokenDeployed, Transfer, ProxyAdded |
| 플래시 청산 헬퍼 | FlashLiquidated |
| 지급 에스크로 | RemainderEscrowed, RemainderClaimed |
| AvanaTimelock | CallScheduled, 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.
