Documentation

Guides

QUARN.md rules

Write the rules every action is checked against.

How it works

Put a QUARN.md in your project. Your agent checks every action against it with quarn_check_policy before anything is prepared, and quarn_prepare_swap refuses when a rule says no. Revokes are always allowed, because they only reduce risk.

Example

# QUARN.md
- never buy below score 55
- max 100 USDC per swap
- only swap through uniswap
- no unlimited approvals
- never touch tokens younger than 1h
- block 0x000000000000000000000000000000000000dead

Rules you can write

  • minimum score: never buy below score 55
  • maximum per transaction: max 100 USDC per swap
  • no unlimited approvals
  • allowed venues: only swap through uniswap
  • minimum token age: younger than 1h or 2d
  • blocked addresses: block 0x…
On this page
  1. How it works
  2. Example
  3. Rules you can write