AVENOR
Operational reference

Avenor Vault Docs

Architecture, fee configuration, role permission matrix, and operational references. Numbers here are configuration constants; live on-chain values are on the vault page with their block citations.

Architecture

Overview

Avenor is an ERC-4626 vault for USDG on Robinhood Chain (chain ID 4663), layered on
Yearn V3 Allocator Vault API 3.1.1. Deposits flow: user → AvenorVault (ERC-4626 proxy) →
TokenizedStrategy allocator → SteakUSDG venue adapter → steakUSDG (the yield venue).

Deploy order

1. Deploy TimelockController (≥ 48 h delay) as role_manager.
2. Deploy AvenorAllocatorStrategy with the vault as its vault and the timelock as role_manager.
3. Deploy DepositCapHook; set it as the vault's transfer_hook.
4. Grant GUARDIAN role to a separate guardian address (not the timelock proposer).
5. Set deposit_limit to 0 until the timelock delay has elapsed; then raise via governance proposal.

Key invariants

• setPaused is for incidents only and blocks both deposits and withdrawals.
• Deposit freezing uses deposit_limit or deposit_hook, never setPaused.
• role_manager must be a TimelockController answering getMinDelay() ≥ 48 h before public deposits.
• Guardian address must not be the timelock proposer.
• All amounts are uint256 with 6 decimals (USDG). No floats anywhere in the stack.

Source of truth

docs/ARCHITECTURE.md — ADRs and deploy sequence.
docs/BASELINE.md — toolchain pins, bytecode hash, block pin.
docs/WITHDRAWAL_SEMANTICS.md — withdrawal behaviour and 12 test cases.
docs/ROLE_PERMISSION_MATRIX.md — role bits and their assignments.
docs/DEPLOYMENT.md — environment variables, deploy modes, post-deploy assertions.

Fee Configuration

Current parameters

All fee values are read from the on-chain accountant at the named block; none are
hard-coded here. The vault page shows the live values next to their block citation.
See docs/FEE_CONFIG.md for the governance history of each parameter.

Fee types

Management fee: charged continuously on assets under management (basis points per year).
Performance fee: charged on strategy gains at report time (basis points of gain).
Refund ratio: fraction of losses that the accountant refunds from its own buffer.
Protocol fee: set by the Yearn protocol factory; not under Avenor control.

Fee mechanics

Fees are minted as new shares, not deducted from assets. This means totalAssets does not
decrease when fees are charged; instead totalSupply rises and pricePerShare dilutes. The
reconciliation formula accounts for this correctly: gain/loss events exclude fee shares,
and the indexed formula never double-counts. See reconcile.ts §S-11 comment.

Role Permission Matrix

Role bits (VaultV3)

ADD_STRATEGY_MANAGER     — adds / removes strategies from the queue.
REVOKE_STRATEGY_MANAGER  — emergency revoke; sits on the bounded fast lane.
FORCE_REVOKE_MANAGER     — forced revoke regardless of debt; highest risk.
ACCOUNTANT_MANAGER       — sets the accountant address.
QUEUE_MANAGER            — sets the default withdrawal queue order.
REPORTING_MANAGER        — calls report() on strategies to realize gains/losses.
DEBT_MANAGER             — sets per-strategy debt limits.
MAX_DEBT_MANAGER         — raises the global debt ceiling.
DEPOSIT_LIMIT_MANAGER    — raises/lowers deposit_limit.
WITHDRAW_LIMIT_MANAGER   — sets minimum_total_idle.
MINIMUM_IDLE_MANAGER     — alias of WITHDRAW_LIMIT_MANAGER in some API versions.
PROFIT_UNLOCK_MANAGER    — sets profit_max_unlock_time.
DEBT_PURCHASER           — purchases bad debt at par.
EMERGENCY_MANAGER        — shuts the vault down (irreversible).

Assignment policy

All roles are assigned exclusively via the TimelockController (role_manager). No role
may be granted directly by an EOA after public deposit opens. The guardian holds a
subset of roles on the bounded fast lane for emergency response; it is never the
timelock proposer. Full matrix: docs/ROLE_PERMISSION_MATRIX.md.

Known Limitations

Instant liquidity

Only idle cash (totalIdle) is available for withdrawal without a strategy queue cycle.
At the captured block: idle = 27,024,457.98 USDG vs TVL = 538,856,055.99 USDG (5.02%).
maxWithdraw() on the steakUSDG venue returns 0 at this block and must not be used as a
liquidity signal. The UI always shows "position value" and "withdrawable now" as separate
figures. See docs/WITHDRAWAL_SEMANTICS.md for the full withdrawal flow and all 12 test cases.

Audit status

The 2023 upstream Yearn V3 audit covers packages/core with its stated scope and date.
The 2026 Robinhood Chain pin, Avenor adapters, and Avenor configuration have not been
independently audited. No "audited" badge is claimed for any Avenor-authored code.

Fork-only deployment

All contract addresses are fork addresses on a local anvil instance. eth_getCode for the
vault address returns 0x on Robinhood Chain mainnet. No mainnet deployment exists or is implied.

max_loss parameter

The SDK always requires an explicit max_loss parameter for redeem() and withdraw().
Callers may not rely on the VaultV3 defaults (10000 for redeem, 0 for withdraw). Every
SDK call enforces this; see packages/sdk/src/reads.ts and writes.ts.

Timelock delay

The TimelockController enforces a minimum delay of 48 hours before any governance
action takes effect. Emergency actions via the guardian bypass the timelock only for
the roles explicitly listed on the bounded fast lane. Shutdown is irreversible.

Deposit indexer events (S-20)

The indexer does not yet store a dedicated Deposit/Withdraw event table. The daily
reconciliation formula is correct per VaultV3 semantics (deposits do not change
totalAssets independently of the on-chain snapshot), but until S-20 is implemented
the indexer cannot produce per-depositor history from events alone. See reconcile.ts §S-11.

Operational References

Key documents

docs/SIGNER_POLICY.md   — key management, who holds which keys, rotation procedures.
docs/BACKUP_RECOVERY.md — backup procedures, emergency access, recovery runbook.
docs/KNOWN_LIMITATIONS.md — exhaustive limitations list (mirrors this page).
docs/REMEDIATION.md     — audit findings and their remediation status.

Verification

python scripts/verify-all.py — full gate: secrets, vendor, interfaces, build, fmt, tests, bytecode.
python scripts/fork-status.py — diagnose fork RPC connectivity and pin health.
python scripts/fork-test.py  — run Foundry fork tests via local anvil (required; do not use --fork-url directly).

Keeper service

services/keeper/ — monitors the vault and submits report() calls when due.
Keeper confirms transaction inclusion (waitForTransactionReceipt) before marking a job done.
In-flight guard prevents double-submission during pending transactions.
Max nominal per allocation and cooldown interval are enforced in keeper.ts.

Sources: docs/ARCHITECTURE.md · docs/FEE_CONFIG.md · docs/ROLE_PERMISSION_MATRIX.md · docs/WITHDRAWAL_SEMANTICS.md · docs/DEPLOYMENT.md