Skip to content
errandDocsOpen the app

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:

PartHow to write itExampleIf you leave it out
Principalan amount followed by USDC, with k or m allowed10,000 USDC, 25k USDCrequired
Target ratea percentage, optionally a year, per year, annual or apr6% a yearrequired
Termfor or over a number of days, weeks, months or yearsfor 90 days, for 6 months90 days
Cap per lenderat most, max, no more than or up to a percentage per protocolat most 30% per protocol40%
Recall windowwithdrawable, redeemable, recallable, out or back within or in a number of minutes, hours or dayswithdrawable within 24 hours24 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

FieldAllowed
Target rate0% to 100% a year
Term1 day to 365 days
Recall window1 minute to 7 days
Cap per lenderabove 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.

    Search page titles, headings and text. Arrow keys move, Enter opens.