Skip to content

Checks and errors

Every action that moves money goes through one function on Lotvs’s servers, before anything is signed. All the checks are evaluated and written down, not only the first that fails. The first that fails, in this order, is the rule that stopped it.

# Check Stopped as
1 The accounts are not being checked being_checked
2 The agent is not paused paused
3 Its time has not run out (Works until) ended
4 The owner switched this kind of action on: paying, buying and selling, earning, vaults switched_off
5 What is set aside for the cost of actions still covers this action, and taking every agent’s money back afterwards costs_used_up
6 A transfer goes to the owner or to a person the owner allowed transfer_to
7 A vault named as the source exists, is this agent’s, and the owner opened it vault_locked
8 A trade is within the limit per trade per_trade
9 A payment is within the limit per payment, unless allowed once per_payment
10 With it, the last 24 hours stay within the limit per day, unless allowed once per_day
11 The source covers it: what is free to use, or the vault not_enough
12 A payment that passed everything: does it have to ask? Waits for the owner

Checks 10, 11 and the hold on the amount are one write, so two calls at the same moment cannot both pass.

Tool Checks
pay_usdc 1 to 7, and 9 to 12
pay_x402 1 to 5, and 7 to 12, once the site has said its price
buy_asset, sell_asset 1 to 5, 7, 8 and 11
earn_deposit, earn_withdraw 1 to 5, 7 and 11

A refusal comes back as a tool result with isError: true and one sentence the agent can pass on: the rule, the figures, and “The owner has been told. Only the owner can change a rule.” There is never a way around it.

A payment that has to ask is not an error: the agent is told that nothing was paid, given a request id and the time it waits until, and told to call check_request instead of paying again.

done, pending, waiting, stopped, short (not enough free to use), failed, expired, declined, cancelled.