# Funding & On-Ramps

TherosAI operates on an **operator-funds-fleet** model. Operators deposit USDC to their organisation reserve, then allocate it to individual agent vaults. Agents spend from their own ring-fenced balances.

***

## Funding flow

```
Operator bank / wallet
        │
        ▼
TherosAI Organisation Reserve   ← USDC deposited here
        │
        ├──► Agent Vault A      ← Allocated by operator
        ├──► Agent Vault B
        └──► Agent Vault C
```

1. **Deposit USDC** to your TherosAI organisation reserve.
2. **Allocate USDC** to individual agent vaults via the API or dashboard.
3. **Agents spend** from their vault balances, governed by their policy.
4. **Top up** as balances decrease — manually or via auto-topup rules.

***

## Depositing USDC

### Direct USDC transfer (crypto-native)

The fastest path. Send USDC (Solana SPL) directly to your organisation's TherosAI deposit address, available in the dashboard under **Funding → Deposit Address**.

Minimum deposit: $10 USDC. Deposits are credited as soon as the transaction confirms on Solana (\~400ms).

### Bank wire to USDC (fiat on-ramp)

For operators depositing from fiat (USD):

1. Initiate a USD bank wire to TherosAI's banking partner using the reference code shown in the dashboard under **Funding → Bank Wire**.
2. TherosAI mints USDC to your organisation account via Circle's USDC mint infrastructure.
3. Funds appear in your organisation reserve within 1–2 business days (dependent on wire processing time).

Supported currencies at beta: USD. Additional fiat currencies are on the roadmap.

***

## Allocating to vaults

```typescript
// Fund a single vault
await client.wallets.fund({
  walletId: "wal_9f3a2b",
  amount: "100.00",
  currency: "USDC",
});

// Fund multiple vaults in a batch
await client.wallets.fundBatch([
  { walletId: "wal_9f3a2b", amount: "100.00" },
  { walletId: "wal_7d1e4c", amount: "250.00" },
  { walletId: "wal_2a8f0d", amount: "50.00" },
]);
```

Allocations are deducted from the organisation reserve immediately. If the reserve is insufficient, the allocation fails — the vault is not partially funded.

***

## Auto-topup

Auto-topup rules automatically refill a vault's balance when it drops below a threshold:

```typescript
await client.wallets.setAutoTopup("wal_9f3a2b", {
  enabled: true,
  triggerBelow: "10.00",   // Top up when balance drops below $10
  topupAmount: "50.00",    // Add $50
});
```

Auto-topup draws from the organisation reserve. If the reserve is insufficient when the trigger fires, a `balance.low` event is emitted on the organisation account and the topup is skipped until the reserve is replenished.

***

## Withdrawing from vaults

Operators can withdraw unspent USDC from a vault back to the organisation reserve:

```typescript
await client.wallets.withdraw({
  walletId: "wal_9f3a2b",
  amount: "50.00",
});
```

To withdraw the entire balance, pass `"all"` as the amount:

```typescript
await client.wallets.withdraw({
  walletId: "wal_9f3a2b",
  amount: "all",
});
```

Withdrawals settle on-chain and are reflected in the dashboard immediately.

***

## Withdrawing from your organisation reserve

To withdraw USDC from your TherosAI organisation reserve to an external wallet or bank:

1. Navigate to **Funding → Withdraw** in the dashboard.
2. Enter the destination Solana address (for USDC withdrawal) or initiate a bank wire.
3. Confirm the withdrawal — for amounts above $1,000, operator co-signature is required.

Withdrawals to Solana addresses settle in under a second. Bank wire withdrawals (USDC → USD fiat) process in 1–2 business days via Circle.

***

## Balance events

| Event                   | Trigger                                                          |
| ----------------------- | ---------------------------------------------------------------- |
| `balance.low`           | Vault or organisation reserve drops below a configured threshold |
| `wallet.funded`         | USDC successfully allocated to a vault                           |
| `wallet.withdrawn`      | USDC withdrawn from a vault                                      |
| `org.deposit_confirmed` | Organisation deposit confirmed on-chain                          |

Configure low-balance alert thresholds per vault in the dashboard under **Wallet Detail → Alerts**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.therosai.com/core-concepts/funding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
