Architecture and security

This page explains how Allotr is put together and where the trust boundaries are. The short version: your money stays in your crypto wallet, limits are enforced by a contract nobody controls, and every key we hold can only do a narrow, limited job.

Status: testnet only (Base Sepolia, test USDC). The contract hasn’t been audited yet; mainnet follows an independent audit.


The parts

Part What it does Where it runs Holds money?
SpendController Enforces grants: limits, expiry, hierarchy, revocation Base (smart contract) No, never holds tokens
Agent’s spending wallet A small buffer the agent pays sellers from An address per account Yes, the buffer only
MCP server Tools for your AI tool, task budgets and shares, approvals, alerts app.allotr.xyz No
Relay Sends top-ups, refunds, grants and revocations so nobody needs ETH Same machine, separate process and wallet Only ETH for gas
Facilitator Verifies and settles x402 payments for API providers facilitator.allotr.xyz Only ETH for gas
Panel Sign in, link wallets, grant, approve, revoke, settings app.allotr.xyz/app/ No

The facilitator and agent budgets are separate products. The facilitator doesn’t know about budgets, and agents don’t need our facilitator: they pay any x402 seller with a standard signed transfer.


Keys and who holds them

Key Held by What it can do If it leaked
Your crypto wallet key You only Everything with your money We never see or store it
Agent (orchestrator) session key Our server, encrypted with AES-256-GCM and bound to your account Top up within your grant; pay sellers from the buffer Loss limited to your grant’s daily limit; revoke with one signature
Relay key Our server Submit transactions others signed; pay their gas Can’t move user funds: every action needs the user’s or agent’s signature, and the recipient and fee are signed
Facilitator settlement key Our server Submit sellers’ signed EIP-3009 transfers Can’t change amount or recipient; loss limited to its own gas ETH
Fee recipient (treasury) A separate wallet, not on the server Receives relay fees Not on the server, so a server breach can’t take collected fees

Master keys and service keys are backed up in a password manager, not in the code or repository.


Signatures that protect money

An email session alone can’t move money. These actions need an EIP-712 signature from a linked crypto wallet (domain Allotr MCP):

  • linking or removing a wallet, and changing their order,
  • connecting an AI tool to your account (OAuth consent),
  • approving a large or paused payment,
  • changing agent settings (buffer, approval threshold, seller mode),
  • creating or revoking facilitator API keys, payout addresses and webhooks.

Settings signatures carry an increasing deadline so an old signature can’t be replayed. Approvals are single-use and expire.


Sign-in and connections

  • Accounts can be opened with an email code, Google or a wallet (SIWE, EIP-4361). One account can link several wallets.
  • AI tools connect over OAuth 2.1: PKCE (S256) is required, tokens are bound to the MCP resource (RFC 8707), access tokens last 1 hour, refresh tokens 30 days and rotate on every use; reusing an old refresh token revokes the whole chain. Clients register dynamically (DCR).
  • Sign-in pages use a strict Content Security Policy and can’t be framed. Requests that change state check origin and a CSRF token, and endpoints are rate limited per IP.

What we store

  • On-chain (public): grants, top-ups, fees, revocations, payments.
  • On our server (SQLite): accounts and linked wallets, encrypted agent keys, tasks and shares, pending approvals, settings, spending history, blocklist entries, facilitator API keys (only as SHA-256 hashes), webhook secrets (encrypted). Email codes and tokens are stored only as hashes.
  • Not stored: your wallet keys, card data (there are no cards).

The database is backed up every 6 hours on the server’s encrypted volume, alongside the hosting provider’s volume snapshots.


What protects you if something goes wrong

  1. The contract: no transaction can move more than your grant allows, whoever sends it. Revoking takes one signature and works immediately for the grant and everything below it.
  2. The MCP server: task budgets, sub-agent shares, approvals for large payments, unusual-behaviour pauses.
  3. The client: the agent won’t sign a payment above its policy or a fee above its cap.

If our servers disappeared tomorrow, your money would still be in your crypto wallet. You can revoke grants yourself on a block explorer (with a little ETH for gas), and the buffer in the agent’s wallet is limited by your settings.

Sellers and payment safety

  • Paid calls only go to public https addresses (resolved IPs are checked and the connection goes to that IP), with no redirects, a 20-second timeout and a 1 MB response limit.
  • Agents pay with EIP-3009, so the worst a bad seller can do is keep one payment the agent signed. Repeat offenders are blocklisted, and with Pro flagged across accounts.

Licensing

Libraries, the contract and examples are Apache-2.0. Hosted services (MCP server, relay, facilitator, panel) are FSL-1.1-ALv2: you can read and run them, but not offer them as a competing hosted service; each version becomes Apache-2.0 after two years.