Delegation and protection

The technical reference for builders. What Thirdfy checks before every write, which wallet signs on each lane, delegating from a user's wallet (ERC-7710), venue signers, revocation and custody.

Thirdfy decides who may act and whether each write is allowed before a wallet signs or a venue accepts an order. The same checks run on every surface: Command, MCP, the CLI and the API. The agent proposes; the Thirdfy API decides. The runtime never approves its own writes, and if a check fails, nothing is broadcast.

Owners set an agent's rules in the app: see Policy. This page is the reference behind it.

Agent policy limits

Every agent carries a policy, checked on every write whatever the model asks for:

LimitFieldWhat it does
Allowed actionsallowedActionsThe agent runs only these. Discovery with the agent's key returns only these (GET /api/v1/agent/actions adds policyScoped: true). Allowing an entry also allows its exit, paying out to the agent's own wallet
Daily limitmaxDailyAmountUsdA cap per UTC day on the capital the agent commits. A perps open counts its margin; closes, reduce-only orders, take-profit and stop-loss, leverage changes, cancels and setup don't count
Per-action limitmaxAmountPerActionUsdA cap on the full size of one write
Kill switchexecutionPausedStops every write

A write over the daily limit is refused with blockedReason: POLICY_DAILY_LIMIT and dailyLimitUsd, dailyUsedUsd, remainingUsd. An action outside the allowlist returns 403. Policies are set by the owner in the app or by a hosting platform (such as EarnOrg) from its deploy settings, never by the agent.

What preflight checks

CheckExamples
Identity and laneThe runMode, the agent or subscriber acting
PolicyAllowed action, daily and per-action limits, risk limits, pause
DelegationFor user-wallet lanes: the grant is active, not revoked or expired, and its caveats cover the action
Wallet and fundingBalances, allowances, venue funding
Venue readinessCredentials, approvals, account setup
CatalogThe action exists for this provider, chain and lane
CreditsThe account can pay

Run it without executing: thirdfy-agent preflight --json, MCP previewOrder, or the directory preflight route.

RefusalUsually meansDo this
PolicyNot allowed, or over a limitChange the policy, or pick an allowed action
FundingWrong wallet funded, or not enoughFund the execution wallet
Venue setupCredentials, approvals or account missinggetVenueReadiness, then the venue's setup guide
DelegationGrant missing, expired or revokedCreate, activate or renew it
CapabilityAction not on this chain or laneCheck the catalog and runMode

Which wallet signs

Most builders need only the first row.

LaneWho signsUse it for
agent_walletThe agent's own managed execution walletYour own agent: sign in with Thirdfy (or use an agent key), fund the wallet, run. No delegation to sign. Command, EarnOrg agents and most integrations use it
DelegationAn executor acting within a user's delegationAn agent acting for a user's own wallet under an ERC-7710 grant
Signer userThe user's or agent's own keyA wallet you sign with yourself (getSelfReadiness, buildTx, walletSign, walletSubmit)
Fan-outEach subscriber's executorOne intent run for many delegated wallets with executeIntent. See Act for many wallets

agent_wallet is the one run mode and the default. The old run modes thirdfy and hybrid still parse and run as agent_wallet; self means signer user. Delegation and fan-out work as before, but they are not run modes.

On agent_wallet the API skips subscription and delegation binding checks; policy, Credits and funding still apply.

The delegation, signer user and fan-out tools (delegation*, getSelfReadiness, buildTx, walletSign, walletSubmit, executeIntent, consoleMandate*, managedWallet*) need an agent key. An app signed in with a Thirdfy account doesn't get them; it uses previewOrder and walletExecute.

Venue signers

Off-chain venues sign with their own credentials, set up through venue readiness, not with ERC-7710:

VenueSigner
EVM swaps, earn, approvalsThe lane's wallet; on delegated lanes the grant's caveats must cover the generated calldata
HyperliquidAn API wallet. Funding moves through the execution wallet
PolymarketA managed signer and encrypted CLOB credentials
LighterAPI keys (agent key, CLI or API only)
ExchangesYour own exchange API keys, never an agent wallet: stored as a credentialRef (Bitfinex), or used through Hummingbot's exchange connectors behind Thirdfy's checks

Gator and ERC-7710 lifecycle

For an agent acting on a user's own wallet, Thirdfy uses a Gator-compatible ERC-7710 delegation (delegationModel=gator_erc7710). Keys never leave the user's wallet.

  1. Create: the API builds the delegation payload with its caveats (for example erc20PeriodTransfer).
  2. Sign: the wallet owner signs it (EIP-712) in MetaMask or another supported wallet. This step needs a person with the wallet; it can't be skipped.
  3. Activate: stores the signed delegation, executor, expiry and permissions.
  4. Inspect: status, expiry, revocation and the period allowance left.
  5. Execute: delegated lanes run only when the active grant and its on-chain caveats cover the action.
SurfaceTools
CLIthirdfy-agent delegation create, activate, status, inspect, balance, redeem, revoke (delegation grant runs create, sign and activate)
MCP (agent key)delegationCreate, delegationActivate, delegationStatus, delegationInspect, delegationBalance, delegationRedeem, delegationRevoke
APIDelegation API, World ID delegation
thirdfy-agent delegation create --json ...
# The user signs the EIP-712 grant in their wallet
thirdfy-agent delegation activate --json ...
thirdfy-agent preflight --json ...
thirdfy-agent run --json ...

See Delegation and machine output.

Account mandate

A separate ERC-7710 grant from your own wallet, per chain, with a daily USD cap and an expiry (consoleMandate* tools with an agent key, CLI console-mandate). It belongs to the earlier Console; the app today checks every write against the agent's policy instead. Revoking it doesn't touch any agent delegation, and the reverse.

Before broadcast (on-chain writes)

For EVM spot and earn:

  • Quote broadly, execute narrowly. Compare routes, then build only the best executable one for this chain, wallet and provider.
  • Simulate where possible (eth_call or gas estimation) before the wallet signs.
  • Unknown providers fail closed. An action must be registered for the target chain and lane.

Revocation

  • An agent: pause it or revoke its key from the app. See Policy and Connect.
  • A signed-in app: revoke it at auth.thirdfy.com/connections.
  • A delegation: delegation revoke (CLI) or delegationRevoke (MCP). Future authorizations stop; anything not yet signed is cancelled; what's already broadcast completes. Every revocation is recorded.

Custody

Thirdfy never pools user funds. Each agent's execution wallet holds only that agent's funds. With delegation, funds stay in the user's wallet and the executor acts only within the grant.

Wallet glossary

TermWhat it is
Owner walletThe wallet linked to your Thirdfy sign-in. It proves who you are. Don't fund it for agent trading
Agent key (agentKey)The agent's 0x identity in the registry, shown by whoami. Not the execution wallet, and not the agent-... API key
Execution wallet (agent_wallet)The agent's own managed wallet. Fund it; the agent trades from it
Custodial delegation walletA Thirdfy-managed session account for delegation (managedWalletInit, agent key only). Separate from the execution wallet
Delegated user walletA user's own wallet that gives the agent scoped authority with an ERC-7710 grant
Venue signerWhat a venue needs: a Hyperliquid API wallet, Lighter API keys, Polymarket CLOB credentials or your own exchange API keys

Security

  • Wallets hold keys. Thirdfy checks intents and routes execution when policy allows.
  • Grants are scoped and revocable; preflight fails closed.
  • Never put API keys, agent keys or venue secrets in an agent's repository.
  • Thirdfy targets 99.9% monthly uptime for the MCP and public APIs, excluding scheduled maintenance.

Report a security issue to security@thirdfy.com.