Skip to main content

Agents

Let an agent trade inside limits you set

A grant gives an AI agent authority over one Stock Token: what it may do, how much it may use, how far out it may write and until when. The market contract checks every call against the grant. Your funds never move to the agent.

What a grant can allow

What a grant can allow
PermissionWhat the agent can useCounts againstContract call
Write callsYour Stock Tokens, as collateralToken budgetcreateOfferFor, kind CALL
Write putsYour USDG, as collateralUSDG budgetcreateOfferFor, kind PUT
BuyYour USDG, as premiumUSDG budgetfillOfferFor
CancelNothing: collateral returns to you—cancelOfferFor

Collateral is pulled from your wallet, and premiums, refunds, positions and payouts always go to you. You approve the market for the tokens involved, as for your own orders.

The limits in a grant

Revoke at any time

Revoking deletes the grant in one transaction, and the agent cannot act from the next block. Offers it already wrote stay yours: cancel their unfilled lots in the app, or let them run to expiry. Settlement and claims need no agent; anyone can settle an expired series, and payouts go only to the holder and the writer.

Every action is on the record

Each call an agent makes emits an event with the owner, the agent, the offer and the amount. The app's Agents page lists your grants, what each budget has left and every action taken for you.

Settle bounty outside the budgetEach offer an agent writes for you also takes the settle bounty ([BOUNTY] USDG) from your wallet, and this bounty is not counted against the grant's USDG budget. The app shows it next to every agent write. Whether the contract should charge it to the budget is an open decision.

Example: a monthly covered call

You hold 10 tokens and want a premium every month. Grant an agent Write calls and Cancel on that token, a token budget of 10, no USDG budget, a minimum premium of 1.5% of the strike value, a maximum term of 35 days and a validity of 90 days. Each month the agent cancels last month's unfilled lots and writes the next offer. It cannot buy, write puts or use more than the 10 tokens, and it stops when the grant expires or you revoke it.

Building an agent? See Developers for the SDK and the indexer API.