# Custody and keys

Where the money sits on each network, who holds which key, which part of Abazi may sign, and how the owner withdraws Abazi's permission.

<ShortProductTruth>**Your wallet. Not our vault.** On Solana, the owner's USDC stays in the owner's account and Abazi spends through a capped on-chain permission the owner can remove at any time. On EVM networks and Tron, each agent pays from its own spending wallet held by Abazi's signer, funded by the owner with only what the agent may spend and sweepable back. The agent never holds a key.</ShortProductTruth>

## Who needs it [#who-needs-it]

Owners, who want to know exactly what Abazi can do with their money. Security reviewers, who need to know where every key lives.

## Who holds what [#who-holds-what]

| Holder | Holds | Can do | Cannot do |
| --- | --- | --- | --- |
| Agent | An Abazi agent credential, shown once and stored only as a hash | Search, request purchases, read its own payments, receipts and budget | Sign, move funds, approve, change rules, see keys or card numbers |
| Owner | Their Solana wallet and their passkeys | Connect the wallet, grant and remove the spending permission, sign mandates, approve, sweep spending wallets | |
| Signer | The keys Abazi uses to pay, inside one isolated module | Sign a payment after rechecking the decision | Sign without an ALLOW decision, a held reservation and a matching fingerprint |
| Wallet service | The seed for per-agent spending wallets on EVM networks and Tron, built on Tether WDK, in a separate process | Sign direct USDT transfers, receipt anchors and attestations | Accept requests from other machines by default |
| Card issuer | The card numbers, at Lithic | Authorize card payments that Abazi approves | |

Only the signer module loads signing keys. Every other part of Abazi sees addresses and signatures, not keys. The language model behind an agent never sees a key either: none of the agent's tools takes a key, a price or a payout address, and none returns a key or a card number.

## Where the money sits [#where-the-money-sits]

| Network | Pays from | What Abazi can spend |
| --- | --- | --- |
| Solana (USDC over x402) | **The owner's own USDC account.** The owner signs an SPL token approval that makes Abazi's signer a delegate of that account. | Up to the cap the owner set, which cannot exceed the organization budget. The owner removes the permission in their wallet at any time. |
| Base, Polygon, Avalanche (USDC over x402) | **A per-agent spending wallet** held by the signer. It signs an EIP-3009 transfer authorization, so it needs USDC but no gas. | What the owner funded it with. The owner can sweep it back. |
| Ethereum, Tron (direct USDT) | **A per-agent spending wallet** built on Tether WDK, held by the wallet service. It pays gas in ETH or TRX. | What the owner funded it with. The owner can sweep it back. |
| Virtual card | **A card per agent**, issued by Lithic. | Each authorization, decided by Abazi's policy. |

This is the custody design, network by network:

- **Solana is non-custodial.** The owner's USDC never leaves the owner's account until a payment, and the signer can spend only the delegated amount.
- **EVM networks and Tron use capped spending wallets.** Abazi's signer holds the key to each agent's wallet. The owner decides how much goes in, sees the balance in the Console, and sweeps it back at any time. An agent can never spend more than its wallet holds, and its mandate and budgets still apply to every payment.

The full list of wallets, owner-connected and provisioned, is on [Wallets](/docs/platform/wallets).

<Screenshot id="console-wallets" />

## Card numbers [#card-numbers]

Card numbers never reach the agent. When an agent buys with its virtual card, the signer requests the card details from the card issuer and posts them server to server to the merchant's checkout. They are not logged or stored, and the merchant's authorization comes back to Abazi's policy to be approved or declined. See [Cards](/docs/platform/cards).

## Boundary [#boundary]

- **Delegation is one permission per account.** An SPL token account has one delegate. That is why each installment plan funds its own owner-owned plan account. See [Installments and subscriptions](/docs/concepts/installments-and-subscriptions).
- **Removing the permission stops Solana at once.** Payments that would need it are denied with <ReasonCode code="DELEGATION_MISSING" />. Other networks are not affected.
- **Sweeping a spending wallet stops that network.** With an empty wallet, the network is skipped at selection and the next allowed, funded network is tried.
- **Revoking an agent cuts every path.** Its credential stops working, purchases it had reserved are denied, its card is closed and its plans are cancelled. The owner is prompted to remove the on-chain permission too.

## Example [#example]

An owner with a funded Solana account and one agent:

<Steps>
  <Step>The owner connects a Solana wallet in the Console and grants Abazi a permission capped at the organization budget, <Limit name="orgBudget" /> in the example mandate.</Step>
  <Step>The agent buys an x402 service on Solana. The USDC moves straight from the owner's account to the merchant; the remaining permission goes down by the price.</Step>
  <Step>The owner removes the permission in the wallet. The next Solana purchase is denied with <ReasonCode code="DELEGATION_MISSING" />, and nothing else changes.</Step>
</Steps>

## Failure cases [#failure-cases]

| Case | Result |
| --- | --- |
| No permission, or it is used up | DENY <ReasonCode code="DELEGATION_MISSING" /> on Solana. |
| The spending wallet is empty on every allowed network | DENY <ReasonCode code="NO_FUNDED_CHAIN" />. |
| The purchase changed between decision and signing | The signer refuses to sign (<ReasonCode code="APPROVAL_INVALIDATED" />). |
| Payments are paused | The signer refuses to sign (<ReasonCode code="KILL_SWITCH_ACTIVE" />). |

## How to verify [#how-to-verify]

- The Console's wallets page shows the connected wallet, the permission's cap and remaining amount, and each agent's spending wallets with their balances.
- The permission is an ordinary SPL token approval: any Solana explorer shows the delegate and the amount on the owner's account.

## Next steps [#next-steps]

<Cards>
  <Card title="Wallet" href="/docs/products/wallet" description="See the wallet connection, the permission and the spending wallets as a product." />
  <Card title="Security model" href="/docs/concepts/security-model" description="Read what protects the money, zone by zone." />
  <Card title="Rails and networks" href="/docs/concepts/rails-and-networks" description="See how one network is chosen for each payment." />
</Cards>

