Skip to content

00/Agent payments on Robinhood Chain

Your agents, within bounds.Every payment, checked on chain.

Give your agents a spending policy that merchants can check on Robinhood Chain, and take their USDG payments over x402 at a payment address of your own.

Policy module on SafeUSDG over x402EIP-712 readings

01Session02Valid until03Token04Per payment05Daily06Float

Within policyUSDG moves, the merchant gets paid over x402

Built on

  • ChainRobinhood Chain 4663
  • AssetUSDG
  • Paymentsx402
  • IdentityERC-8004
  • AccountsSafe
  • ReadingsEIP-712
  • Checks per payment6
  • Raise delay1 h to 30 d
  • Daily window00:00 UTC

01/How a payment moves

Permission to move. A line that holds.

Operators define the policy. Agents transact within it. Merchants receive proof they can check themselves.

Operatorsets the policyAgentpays within itMerchantchecks it
  1. 1Operator

    Set the boundary

    Choose a ceiling for each payment, each day and the agent's float. Name the contracts it may call. Any increase takes at least an hour to activate.

    Configure an agent

    Agent policyset by the operator

    perTx
    ceiling for one payment
    perDay
    ceiling per UTC day
    floatMax
    most the agent holds at once
    targets
    contracts and functions it may call
    validUntil
    when the policy ends
    increaseDelay
    1 h to 30 d before a raise applies
  2. 2Agent

    The agent pays

    The agent signs its own USDG payments over x402. It draws from a float the policy sizes, with its own session key.

    See the payment flow

    x402 exchangeHTTP

    1. GET /resourcethe agent asks for a paid resource
    2. 402 Payment Requiredthe merchant names price, asset and payee
    3. X-PAYMENTthe agent signs a USDG transferWithAuthorization
    4. 200 OKthe merchant settles and serves the resource
  3. 3Policy module

    Checked before value moves

    The module on the agent's Safe runs six checks in order. The first one that fails stops the transfer with its own error.

    Try the checks
    1. 1SessionNotActive
    2. 2Valid untilExpired
    3. 3TokenTokenNotAllowed
    4. 4Per paymentPerTxExceeded
    5. 5DailyDailyCapExceeded
    6. 6FloatFloatExceeded
  4. 4Merchant

    Proof the merchant can read

    A merchant reads the address behind the payment and verifies an EIP-712 signature covering identity, policy and current spend.

    Inspect a payer

    Signed readingEIP-712 · Aphrodel Check

    account · agentId
    who paid, and its ERC-8004 identity
    status · policyHash
    the session and the policy in force
    caps · spentToday
    ceilings and what is already spent
    probedAt · endpointsLive
    the latest endpoint probe
    blockNumber · validUntil
    the block it was read at, and how long it holds

02/The six checks

Six checks, in order. Set them and watch one hold.

Move the ceilings and the payment. The page runs the same comparisons as AphrodelPolicyModule, in the same order, and lights the first one that stops the transfer with the error the chain returns.

Session
Policy
Within policy

All six checks pass. 40 USDG moves to the agent's float.

Largest payment now
50 USDG
Left today
80 USDG
Float room
70 USDG
Raising a ceiling
waits 1 h or more
  1. 1Sessionsigner holds an active sessionok
  2. 2Valid untilblock.timestamp <= validUntilok
  3. 3Tokentoken is listed in policy.capsok
  4. 4Per payment0 < amount <= perTxok
  5. 5DailyspentToday + amount <= perDayok
  6. 6Floatbalance + amount <= floatMaxok

03/The system

Five hops from a policy to a signed reading.

Funds stay on the operator's Safe. The agent only ever holds the float its policy sizes, and every payment leaves a record on Robinhood Chain.

How a payment moves through the system05 hops

  1. 01 · Operator

    Owner wallet

    Installs the module on a Safe and writes the agent's policy.

  2. 02 · On chain

    Safe + policy module

    Holds the USDG and runs the six checks on every top-up.

    AphrodelPolicyModule
  3. 03 · Agent

    Session signer

    Holds a float the policy sizes and signs x402 payments.

  4. 04 · Merchant

    Payment address

    Takes USDG over x402 at an address of its own.

  5. 05 · Reading

    Attestor + lens

    The lens reads the signer's session; a key the attestor lists signs it as an EIP-712 reading.

    AphrodelAttestor · AphrodelLens

04/The reading

What a merchant reads before it serves an agent.

Every field of the signed reading, exactly as the EIP-712 type defines it. The SDK checks the signature against the attestor's keys.

EIP-712{ name: "Aphrodel Check", version: "1", chainId: 4663, verifyingContract: attestor }
  • signeraddress
  • accountaddress
  • agentIduint256
  • owneraddress
  • boundbool
  • installedbool
  • statusuint8
  • sessionEpochuint64
  • sessionCreatedAtuint64
  • accountKinduint8
  • signerIsAccountOwnerbool
  • otherAccountModulesbool
  • signerHasCodebool
  • paidAtuint64
  • policyHashbytes32
  • capsTokenView[] (token, perTx, perDay, floatMax, spentToday)
  • targetsHashbytes32
  • policyValidUntiluint64
  • increaseDelayuint32
  • pendingHashbytes32
  • pendingReadyAtuint64
  • verifiedbool
  • probedAtuint64
  • endpointsLivebool
  • registrationValidbool
  • domainVerifiedbool
  • validForuint64
  • issuedAtuint64
  • validUntiluint64
  • blockNumberuint64
  1. 01

    Who pays

    The signer that paid, the Safe account behind it, the account's owner and the agent's ERC-8004 identity, bound to that account.

  2. 02

    The session

    Whether the policy module is installed on the account and the state of the agent's session key.

  3. 03

    The policy

    The policy in force as a hash, every ceiling with today's spend, the allowed calls, and any raise waiting out its delay.

  4. 04

    The endpoint

    The latest probe of the agent's endpoints, its registration and its domain.

  5. 05

    The window

    When the reading was issued, how long it holds, and the block it was read at.

05/Live chain view

Start with the payer.

Enter an address to see the policy and spend recorded for its agent account. Values appear only after a chain read.

Open the full reading
Check a payerOpen to anyone
Payer checks coming soon
Spent today· of · USDG
Per payment·
Float ceiling·
Signed payer reports come from the APIGet credits

06/Privacy · Coming soon

Keep your balance and your orders to yourself.

Shield will hold USDG out of view and move it with a zero knowledge proof built in your browser. Eclipse and Quiet Book will keep each order sealed until its batch clears.

Orders stay sealed

07/TOKEN

Value follows use.

Protocol revenue buys TOKEN for staking and burns. Pool swap fees flow to Earn depositors. Credit packs and agent verification also accept TOKEN when available.

08/On chain

Read it from the chain. Every address, every block.

The block and the daily window below come from Robinhood Chain while you read this. Each contract links to Blockscout.

Robinhood ChainConnecting

Latest block
·
Block time (UTC)
·
Daily ceilings reset in
·
Chain ID
4663

ContractsBlockscout

  • AphrodelPolicyModuleRuns the six checks on each SafeAddress at deployment
  • AphrodelAttestorLists the keys that sign readingsAddress at deployment
  • AphrodelLensReads a signer's session in one callAddress at deployment
  • Identity registryERC-8004 agent identitiesAddress at deployment
  • USDGThe asset agents pay in0x5fc536…F1d168

09/Questions

What to know before you start.

Give your first agent a boundary it keeps.

Write the policy, open a session for the agent and hand merchants a reading they can verify.