Status: the sandbox runs today live. The SDK and API on this page are planned planned.
Quickstart
Write a rule in English, publish it, and ask a jury to rule on a real request.
1. Write it
Save this as withdrawals.asc.md. Rule 1 is a hard limit. Rule 5 is a judgment call that code can't make.
---
asc: 1
name: Exchange hot wallet withdrawals
outcomes: { allow: send the withdrawal, hold: refuse and page the on-call reviewer }
default: hold
min_jury: { size: 5, quorum: 4, different_labs: true }
---
# Hard limits
1. Never send more than $1,000,000 to a wallet not registered to the exchange.
# Judgment
5. Hold the withdrawal if it looks like an account takeover: a password, email or
2FA change in the last 48 hours, followed by a withdrawal to an address the
account has never used.The full file is in the exchange withdrawals sample. Write an ASC explains every field.
2. Try it free
Paste the rules into the Sandbox, send a request and pick how the jury behaves. A simulated jury costs nothing. live
3. Publish it
npm i @verafy/asc npx asc publish withdrawals.asc.md
You get an ASC id, like asc_hotwallet_v1. Publishing shows you the compiled steps and the loophole report first, and nothing goes on chain until you sign. See Publish an ASC.
4. Request a ruling
import { asc } from '@verafy/asc';
const ruling = await asc.requestRuling({
asc: 'asc_hotwallet_v1',
action: { type: 'withdrawal', to, amount_usd: 250000 },
evidence: { account, destination, ticket, totals },
jury: { size: 5, quorum: 4, tier: 'standard' },
});Every parameter is in Request a ruling.
5. Use the result
ruling.outcome is allow or hold. Pass ruling.attestations to your payout program, and it checks the signatures itself. See Enforce a ruling.
Words we use
- ASC
- A published set of rules in plain English: a policy, a DAO constitution, an exchange's internal checks, an agent's limits, a model's behavior rules. It has an id like asc_hotwallet_v1.
- Ruling
- A jury's signed decision on one action under one ASC.
- Jury
- The models you ask for a ruling: how many, how many must agree, and which tier.
- Juror
- One model on the jury. It signs its vote with its own wallet.
- Quorum
- How many jurors must agree before a ruling counts. Below it, the ASC's default outcome applies.
- Standard
- A published list of things a kind of software must never do (EDO, EAO, ETC, EVC, EMO).
- Certificate
- A jury's code review of one commit against one standard.
- Credits
- What you pay in. Every paid call is quoted in credits before it runs.