LearnAgent Creditchain 4663

OpenZaps protocol research · 29 July 2026

Purpose-bound credit for onchain agents.

Registered agents lock 0xZAPS, borrow existing USDG into a policy account, and can use it only for pre-committed strategies whose outputs stay locked. Identity controls access. Collateral and first-loss capital control risk.

01Lock 0xZAPS
02Verify account
03Borrow USDG
04Execute one policy
05Lock output
06Repay or liquidate
Research verdict

Keep access, credit, and stablecoin issuance separate.

The original loop is compelling, but three corrections make it defensible: authenticate a canonical policy account rather than a hook callback address, contain debt inside an isolated market, and use the dollar asset Robinhood Chain already has.

Live infrastructure

Robinhood Chain mainnet + Uniswap v4

Robinhood Chain is live at chain ID 4663, Uniswap publishes v4 deployments for it, and OpenZaps already executes bounded routes across pinned 0xZAPS, aeWETH, and USDG pools.

Canonical loan asset

USDG already exists

USDG is the canonical dollar stablecoin listed by Robinhood Chain and the lending asset in Robinhood Earn. A second OpenZaps stablecoin would add peg and redemption risk without improving the first credit pilot.

Research proposal

Agent access + isolated credit

The identity adapter, agent router, gate hook, lender vault, credit controller, policy accounts, and liquidation engine described here are not deployed OpenZaps contracts.

Must be solved first

Independent executable-value oracle

A 0xZAPS-backed market cannot safely launch if the same pool financed agents trade in is also the only source used to value their collateral.

Recommended productOpenZaps Agent Credit Lane

A purpose-bound USDG credit rail for registered, policy-constrained agent accounts—not a new stablecoin, not unsecured credit, and not a way to recursively finance 0xZAPS demand.

01

Agent Access Pools

Uniswap v4 liquidity reserved for registered, policy-constrained agent accounts.

Build first without credit. Validate identity, router, hook, quoting, LP unwind, and liquidation bypass paths with no borrowed capital.
02

Agent Credit Vaults

Tiny, isolated USDG working-capital lines overcollateralized by deposited 0xZAPS.

Borrowed USDG goes directly into a policy account. It never becomes a transferable agent wallet balance.
03

Agent Credit Markets

Later sponsor-backed lines where underwriters post first-loss capital against proven repayment history.

Identity creates continuity; sponsor capital creates real underwriting. Reputation alone never creates unsecured credit.
System architecture

One bounded account sits between identity and capital.

The principal owns the collateral, recovery path, and debt. The agent receives a revocable session key for typed actions. This preserves OpenZaps' core rule: automation can choose when to submit, never what authority exists.

AccessERC-8004-compatible identitycurrent wallet binding + qualification policy
AuthorityPrincipal-owned AgentCreditAccounttyped permit · fixed recipient · nonce · deadline · policy hash
ExecutionAgentRouter → v4 AgentGateHookBUY_AND_LOCK or ADD_LIQUIDITY_AND_LOCK
CreditCreditController ← USDGLenderVaultisolated caps · interest · health · reserve
Risk reduction stays openOracleGuard · repay · top up · unwind · permissionless liquidation
01

AgentIdentityAdapter

Pins an approved ERC-8004-compatible registry, checks the current agent-wallet binding, and optionally requires approved validation or attestation policy.

Identity grants eligibility, not creditworthiness.
02

AgentCreditAccount

A factory-deployed, principal-owned account with an agent session key. It holds collateral, debt proceeds, purchased 0xZAPS, and LP positions.

Debt never follows a transferable identity NFT.
03

AgentRouter

Verifies one EIP-712 or ERC-1271 action permit and passes its digest through hookData for same-transaction consumption.

Never trust tx.origin or an address merely supplied in hookData.
04

AgentGateHook

Allows swaps and leveraged liquidity additions only from the approved router with an unused action digest for the exact pool and account.

Repay, unwind, and liquidation routes remain available without active agent status.
05

CreditController

Accounts for eligible 0xZAPS collateral, USDG debt, interest, per-agent caps, the global ceiling, health, and liquidation state.

Financed assets can be seized but never create new borrowing power.
06

USDGLenderVault

Accepts lender USDG and issues ERC-4626-style shares, subject to a utilization cap, reserve factor, withdrawal-liquidity controls, and explicit market risk.

Lenders bear smart-contract, oracle, collateral, liquidity, and bad-debt risk.
07

RiskOracle

Values 0xZAPS using independent inputs, conservative time windows, staleness and deviation checks, an L2 sequencer guard, and executable-liquidity haircuts.

No borrow when observations are stale, divergent, or insufficient.
08

LiquidationEngine

Lets any liquidator repay USDG and unwind locked strategy assets through a dedicated adapter when the account breaches its threshold.

Risk reduction cannot be agent-gated or paused.
Identity + Uniswap v4

The hook cannot identify an agent from sender alone.

In a normal v4 swap, the callback's sender is usually the router that called PoolManager. The hook itself is called by PoolManager. A simple registry lookup on sender would authenticate infrastructure, not the ultimate agent.

01Agent walletsigns exact action
02AgentRouterverifies signer + nonce
03PoolManagerpasses router as sender
04AgentGateHookconsumes action digest
Authenticate this

Canonical account + one-use permit

  • Factory-deployed policy-account bytecode.
  • Current registry wallet binding checked on every risk-increasing action.
  • EIP-712 for EOAs or ERC-1271 for smart-account signatures.
  • Approved router plus same-transaction action consumption.
  • Identity transfer freezes new actions but never moves the loan.
Do not claim this

“Only AI can use the pool”

  • Onchain identity cannot prove software is autonomous.
  • Permissionless registration does not prevent Sybil identities.
  • Reputation does not prove solvency or honest control.
  • The accurate claim is “registered, policy-constrained agent accounts.”
  • Global caps remain necessary even with per-agent limits.
Credit + stable asset

Borrow USDG. Keep it inside the position.

A normal ERC-20 cannot be purpose-restricted after it reaches an arbitrary wallet. The CreditController must send borrowed USDG directly to an atomic execution adapter, fix every recipient to the indebted account, and verify the locked output before the transaction completes.

Use nowCanonical USDG on Robinhood Chain

USDG already has native issuance, an official contract address, external redemption and reserve infrastructure, and a live lending use case through Robinhood Earn and Morpho.

DeferA new OpenZaps stablecoin

A closed-loop token spendable only on 0xZAPS or one LP is protocol credit—not a credible general stablecoin. Issuance would add peg, reserve, redemption, bad-debt, legal, and shutdown systems.

Higher reflexivity

Buy and lock 0xZAPS

Deposit 0xZAPS → borrow bounded USDG → atomically buy 0xZAPS through an approved route → lock output in the same account → repay or liquidate.

Pilot only at tiny caps. The acquired tokens improve recoverable value but never increase the account's borrow limit, preventing recursive leverage.
Preferred productive path

Add locked agent liquidity

Deposit 0xZAPS → borrow bounded USDG → pair it with an equal-value slice of deposited 0xZAPS → lock the non-transferable position → route fees to debt first.

Ship after the buy-and-lock path. Concentrated ranges, fee variability, impermanent loss, and unwind liquidity create extra failure modes.
Why financed collateral gets a 0% factor

Recursive borrowing manufactures leverage, not creditworthiness.

If debt-funded 0xZAPS can be posted again at LTV λ, theoretical exposure compounds to original collateral ÷ (1 − λ) before slippage and price impact.

20% recursive LTV
1.25× exposure
40% recursive LTV
1.67× exposure
50% recursive LTV
2.00× exposure
70% recursive LTV
3.33× exposure
Productive loop
  1. Agents lock externally acquired 0xZAPS.
  2. Bounded USDG enters locked liquidity.
  3. Real swaps produce fees.
  4. Fees repay interest and principal first.
  5. Safe capacity grows from observed repayment.
Loop to reject
  1. Borrow stablecoins.
  2. Buy 0xZAPS.
  3. Count the purchase as fresh collateral.
  4. Borrow again and farm rewards.
  5. Liquidations unwind the same manufactured demand.
Interactive simulations

Make the reflexivity and lender risk visible.

This tested model compares buy-and-lock against a full-range locked LP, sweeps 0xZAPS shocks from −80% to +25%, marks USDG depegs, applies oracle and liquidation haircuts, and calculates health, equity, impermanent loss, and bad debt.

Deterministic design simulator

Stress one purpose-bound credit position.

Change collateral, debt, rates, peg, and exit conditions. The model keeps all borrowed USDG inside the policy account and gives financed assets zero new borrowing power.

Healthy in model
01

Position

02

Risk policy

03

Carry + peg

Health factor1.16Below 1.00 triggers liquidation
Net equity$6,001+$1.17 vs holding 0xZAPS
Estimated bad debt$0After the selected execution loss
Withdrawable borrowed USDG0Policy account only
Same inputs, two uses

Strategy comparison

The LP row uses a full-range 50/50 constant-product approximation. Concentrated liquidity requires a separate range-path simulation.

Locked LP$6,001 equity
Health
1.16
Liquidation trigger
−50.6%
Interest
$59
Fee income
$176
Impermanent loss
−3.2%
Risk LTV
30.1%
Buy + lock$5,132 equity
Health
1.04
Liquidation trigger
−42.2%
Interest
$59
LP fee income
$0
Impermanent loss
n/a
Risk LTV
33.7%
Fixed shock sweep

0xZAPS downside table

Liquidation state shown in red
Buy-and-lock and locked-liquidity health factors across 0xZAPS price shocks
0xZAPS moveBuy healthBuy bad debtLP healthLP bad debt
−80%0.35$220.51$0
−60%0.69$00.85$0
−40%1.04$01.16$0
−20%1.39$01.46$0
0.0%1.73$01.76$0
+25%2.16$02.11$0
Model boundary.This is reproducible design math, not a live quote or forecast. It uses simple interest, one terminal price shock, an assumed fee APR, and a full-range LP approximation. It does not model intraperiod liquidations, concentrated ranges, path-dependent fees, MEV, gas, correlated agents, oracle lag, or actual 0xZAPS depth. Those belong in the fork and Monte Carlo gates before any credit deployment.
Pilot risk policy

Debt capacity follows stressed executable value.

Market capitalization and a same-pool spot quote are not liquidation capacity. The controller should lend against the minimum of haircutted oracle value, stressed exit depth, the per-agent cap, and the remaining global ceiling.

Maximum debtmin(LTV × stressed executable value, agent cap, remaining global cap)
Illustrative parameters for a tiny Agent Credit pilot
ControlResearch starting pointPurpose
Borrow LTV≤ 20%Applied only to unfinanced 0xZAPS deposited before the borrow.
Liquidation LTV≤ 35%A 15-point buffer before oracle and execution haircuts.
Per-agent debt cap≤ 2,500 USDGA hard ceiling; identity reputation cannot raise it during the pilot.
Global debt ceiling≤ 25,000 USDGLimits the maximum lender loss while price and liquidation evidence is sparse.
Utilization cap≤ 70%Preserves lender exit liquidity and steepens rates before the cap.
Oracle haircut≥ 15%Applied on top of staleness, divergence, and executable-depth checks.
New-borrow pauseAutomaticTriggers on stale oracle data, sequencer outage, peg deviation, or thin liquidation depth.
Financed collateral factor0%Purchased 0xZAPS and LP positions never create additional borrowing power.
Oracle

Independent and fail-closed

Multiple observations, conservative windows, staleness and divergence limits, USDG peg checks, sequencer status, and executable-depth haircuts. If no defensible 0xZAPS price exists, mainnet borrowing remains disabled.

Liquidation

Open to anyone

Liquidators do not need agent identity. They repay USDG and seize or unwind locked assets through a dedicated adapter. A hook pause cannot block repayment, top-ups, or risk reduction.

Underwriting

First-loss capital before reputation

Later undercollateralized limits require a sponsor to stake USDG and absorb defaults before passive lenders. Protocol-generated repayment history can tune terms but never override the solvency floor.

Incentives

Pay realized value, not financed volume

Credit-funded buys, self-trades, and LP notional earn no marketplace or league score. Rewards use net realized value after funding, slippage, losses, and liquidation expense.

Mandatory adversarial simulation set
  1. Borrow, pump the pricing pool, and try to borrow again in the same transaction.
  2. Forge an agent ID in hookData or call PoolManager through an unapproved router.
  3. Replay one permit across another pool, chain, policy account, or nonce.
  4. Transfer the identity NFT or revoke the ERC-1271 policy while debt is open.
  5. Route proceeds through arbitrary approvals, Permit2, callbacks, or a malicious recipient.
  6. Create 100 identities controlled by one principal and test global exposure limits.
  7. Remove 25%, 50%, 75%, and 90% of liquidation depth while 0xZAPS falls.
  8. Hold a stale-high oracle through a sequencer outage and delayed liquidations.
  9. Move a concentrated LP entirely into 0xZAPS during a collapse.
  10. Attack the first lender deposit through ERC-4626 donation and rounding paths.
Phased rollout

Prove the gate, then shadow the debt, then cap the capital.

Every phase has a terminal gate. Progress depends on executable evidence—not a date, token price, agent count, or emissions schedule.

  1. Phase 0No capital

    Virtual credit league

    Run the exact strategy and stress models against delayed or historical data. Build agent repayment and drawdown histories without issuing debt.

  2. Phase 1No borrowing

    Agent access pool

    Deploy the identity adapter, canonical policy accounts, router, hook, and unwind path. Prove direct-call, replay, identity-transfer, and router-bypass resistance.

  3. Phase 2Virtual USDG

    Shadow credit

    Mirror live quotes and liquidations with virtual balances. Publish missed-liquidation and expected-shortfall evidence.

  4. Phase 3Independent review

    Tiny LP-only pilot

    Open full-range locked-liquidity working capital with a funded reserve. Financed LP assets keep a zero origination factor and fees repay debt first.

  5. Phase 4No oracle-feedback path

    Smaller buy-and-lock pilot

    Add leveraged token exposure at a lower cap. Purchased tokens stay locked, never expand the borrow base, and earn no volume-based rewards.

  6. Phase 5Proven repayment history

    Sponsor-backed agent credit

    Underwriters stake first-loss USDG and grant revocable lines. Global limits still apply across Sybil-linked identities.

  7. Phase 6Independent demand

    Stablecoin decision

    Only evaluate a native unit after external use, reserve/redemption design, legal review, robust oracle coverage, and multiple deep exit venues exist.

Technical specification

The implementation is a set of invariants, not a permissive router.

The contracts may change, but these properties cannot. They should become stateful fuzz tests, invariant suites, deployment canaries, monitoring rules, and incident-runbook checks.

Typed action permit

Every strategy request binds

  • agent ID and policy-account address
  • action kind: BUY_ZAPS or ADD_AGENT_LP
  • exact pool ID, input asset, and maximum input
  • minimum output or minimum liquidity
  • maximum price impact and approved LP range
  • recipient fixed to the indebted policy account
  • policy hash, nonce, deadline, chain ID, and verifying contract
Protocol invariants

Every implementation preserves

  1. Borrowed USDG can never be sent to an arbitrary receiver or approved to an untrusted spender.
  2. Purchased 0xZAPS and leveraged LP positions remain in the indebted account until debt is repaid or liquidated.
  3. Financed strategy assets never increase eligible collateral or the borrow limit.
  4. Every gated swap or liquidity addition consumes exactly one current, signed action authorization.
  5. Identity transfer or agent-key revocation stops new strategy actions without transferring ownership or debt.
  6. Repayment, collateral top-ups, liquidation, and emergency risk reduction do not require agent eligibility.
  7. The oracle used to open credit cannot be raised by the financed trade in the same transaction.
  8. Total debt never exceeds the per-agent cap, global debt ceiling, or utilization cap.
  9. Only risk-increasing actions can pause; users and liquidators retain a bounded exit path.
  10. Rewards are based on realized net value after financing, slippage, losses, and liquidation cost—not raw borrow or volume.
Repository documentationArchitecture, accounting, formulas, interfaces, launch gates, and test plan
Read the full design document
Industry research

Primary sources behind the refinement.

Reviewed 29 July 2026. Draft standards, deployment addresses, protocol integrations, and product status can change; they must be re-verified before implementation or deployment.

  1. 01
    Robinhood Chain overview and ecosystemRobinhood

    Chain 4663 is live; the official ecosystem lists Uniswap, Morpho, Chainlink, and Paxos USDG.

    Source
  2. 02
    Robinhood Chain token contractsRobinhood

    The official contract registry identifies canonical WETH and USDG on Robinhood Chain.

    Source
  3. 03
    Robinhood EarnRobinhood

    USDG lending already runs through a self-custody Morpho vault with explicit liquidity and smart-contract risk.

    Source
  4. 04
    ERC-8004: Trustless AgentsEthereum Improvement Proposals

    Draft identity, wallet-binding, reputation, and validation registries; registration and feedback are not proof of solvency or capability.

    Source
  5. 05
    Uniswap v4 hooksUniswap

    A pool can attach one hook that runs around swaps and liquidity operations.

    Source
  6. 06
    Uniswap v4 swap hooksUniswap

    The hook callback sender is normally the router calling PoolManager—not the ultimate agent.

    Source
  7. 07
    Permissioned Pools architectureUniswap

    Approved wrappers, per-action checks, non-transferable LP positions, and explicit unwind paths are the closest current v4 precedent.

    Source
  8. 08
    Aave Isolation ModeAave

    Volatile collateral is restricted to approved stablecoin debt and contained by a debt ceiling.

    Source
  9. 09
    Morpho isolated marketsMorpho

    A minimal isolated market binds one collateral, one loan asset, one oracle, one LLTV, and one interest-rate model.

    Source
  10. 10
    Euler Vault KitEuler

    ERC-4626-style credit vaults can isolate accounts and add custom restrictions, caps, oracles, and hooks.

    Source
  11. 11
    ERC-4626: Tokenized VaultsEthereum Improvement Proposals

    A standard single-asset share interface is appropriate for the lender vault, with careful rounding and preview semantics.

    Source
  12. 12
    Chainlink L2 data-feed guidanceChainlink

    L2 price consumers must account for sequencer outages; a latest answer alone is not a complete safety policy.

    Source
North starOpenZaps gives registered agents bounded working capital for productive onchain execution while every permission, debt, output, and loss remains attributable and enforceable onchain.

Research and simulation only. Not an offer, lending product, stablecoin, promise of yield, or financial advice. Any live credit system would require independent security, oracle, economic, legal, and operational review.