A bad-debt recovery marketplace for LlamaLend. LEVY wraps impaired vault positions into transferable DebtClaim (LVDC) ERC-20 tokens — giving lenders a liquid exit at a market-determined discount and giving speculators a path to full-par redemption when the vault recovers. One permissionless protocol resolves the lender's trilemma: wait indefinitely, sell into a market that doesn't exist, or hold a dead position.
LlamaLend's LLAMMA soft-liquidation handles gradual declines well, but a severe, fast crash can leave a vault with bad debt that the AMM can't unwind. LEVY turns that frozen position into a tradeable instrument and a clean recovery path.
check_recovery() reads vault NAV and transitions when it climbs back to par. Synthetic: a DAO, whale, or recovery fund calls inject_recovery() with crvUSD to cover the shortfallredeem() burns LVDC and returns vault shares plus a crvUSD top-up, with total value guaranteed ≥ par at the recovery snapshotThe protocol holds custody of impaired shares and other parties' injected crvUSD, so correctness of the lifecycle and the par-coverage math is the entire security model. Both are enforced structurally rather than by trust.
OPEN → RECOVERING → SETTLED guarded by a single new_state == old_state + 1 assertion; a skip or regression is arithmetically impossiblerecovery_nav is frozen at the RECOVERING transition so per-claim payout valuation cannot be manipulated after the factDebtClaim.vy (36 lines) is a snekmate mint/burn ERC-20 owned solely by the RecoveryVault; recovery triggers are permissionlessadmin_settle() requires DebtClaim.totalSupply() == 0 (every claim redeemed) before final settlementDebtClaim and RecoveryVault — wrap, redeem, both recovery paths, and every state transition@notice Status: unaudited until a formal external review clears before mainnet TVL