Concepts
Errands and policies
An errand is a sentence the server compiles into a policy, signed on chain by the owner. The policy is what the program enforces; the sentence is how you write it.
What a sentence can say
The compiler reads a small, exact language. Every part of the sentence has to be one of these, in any order:
| Part | How to write it | Example | If you leave it out |
|---|---|---|---|
| Principal | an amount followed by USDC, with k or m allowed | 10,000 USDC, 25k USDC | required |
| Target rate | a percentage, optionally a year, per year, annual or apr | 6% a year | required |
| Term | for or over a number of days, weeks, months or years | for 90 days, for 6 months | 90 days |
| Cap per lender | at most, max, no more than or up to a percentage per protocol | at most 30% per protocol | 40% |
| Recall window | withdrawable, redeemable, recallable, out or back within or in a number of minutes, hours or days | withdrawable within 24 hours | 24 hours |
These phrases are read and add nothing, because the policy already excludes what they name: no memecoins, no perps, no borrowing, no leverage, no bridges, lending only. Words like earn, keep, grow, on, with and and are read as connecting words.
A month counts as 30 days and a year as 365. Anything else in the sentence stops the compile with a message saying which part wasn't understood, so a limit you wrote is never dropped silently.
Ranges
| Field | Allowed |
|---|---|
| Target rate | 0% to 100% a year |
| Term | 1 day to 365 days |
| Recall window | 1 minute to 7 days |
| Cap per lender | above 0% up to 100% of NAV |
What the policy holds
Besides what the sentence says, every policy carries the same limits:
- Spending limit: deposits into lenders, added up over the whole term, can't exceed the principal.
- Fee share: an agent may ask for at most 40% of the excess.
- Bond: at least 1% of the principal, in USDC, escrowed by the program with the bid.
- Keeper compensation: 1% of the principal, paid from the agent's bond if a keeper has to unwind the errand. See Recall and the keeper.
- Lenders: the USDC reserves in Errand's catalog. Today that is Kamino and Solend; Parameters lists the reserves.
Draft, then posted
Compiling and confirming saves the errand as a draft on the server. Posting it is the owner's on-chain signature over the exact terms: principal, target, term end, recall window, fee limit, minimum bond, spending limit, keeper compensation and the reserve for each lender. The program stores a hash of those terms, and the server checks every later transaction against them.