Exit to App
Security

Spending Authorization

Per-trade ceilings, 24-hour cumulative caps, and reserve floor invariants.

Spending authority is bounded by mathematical limits stored in the database and checked by the policy engine on every quote:

  • `maxTradeAtomic`: Absolute upper bound on tokens that can be committed in a single conversion.
  • `dailySellCapAtomic`: Rolling 24-hour cumulative ceiling. Every trade increments a rolling ledger window; if current_sum + trade > cap, execution is blocked.
  • `minimumReserveAtomic`: Inviolable floor. An agent can never trade if remaining balance would drop below this safety margin.