Method and limits
Everything the studio assumes.
What is real today, what each number means, and what is planned. If something is not listed here, the studio does not do it.
What runs today
- Strategy parser
- Prototype Fixed patterns in the page (src/lib/rules/parse.ts), no language model. Reads one buy strategy for one asset. Asks instead of guessing: which asset (several or none named), fuzzy amounts (“about $50”), missing amount, weekly without a day, monthly, times without a time zone, whether approvals are needed. Refuses to silently drop selling, price conditions and percentages.
- Rule check
- Prototype Every line editable, with its source (written, derived, default, answered) and the same validity rules as the contract.
- Scenario lab
- Prototype Standard and custom test orders on a fresh practice book; each result names the rule and the numbers.
- Versions and approvals
- Prototype Practice book in this browser; on chain through LotiqRuleBook once deployed.
- Order journal
- Prototype The agent records orders on chain; the contract counts them against the limits. No tokens move.
- Hosted service + holder tier
- Prototype One EIP-4361 sign-in signature (≤ 4 h, checked against a fixed domain list on every request, revoked on sign out). Saved rule books and server scenario runs with quotas enforced on the server; holder = balance ≥ total supply / 1000 of the token, read on chain at each request. Unlocks at launch.
- Alerts
- Prototype Free. A bell inbox derived from the rule book's events (refused orders via submitOrder, period limit ≥ 80 % / reached, versions waiting, pause, revoke) and browser notifications while a tab is open. No e-mail, no push service.
- Trade execution
- Concept Routing real buys through a DEX, with the output forced to the owner, is planned. It is not built because it moves funds and needs its own contract, fork tests and an outside review.
- Agent runtime
- Concept A hosted agent that reads the approved version and records orders on schedule is planned. Today the agent is whatever wallet you bind.
Rules, units and calendar
- Money
- US dollars with 6 decimals (the same scale as USDG). Limits are in dollars, not token units: a planned agent would size each order from a price feed.
- Days and hours
- UTC. Weekdays Monday to Sunday; hours from H (inclusive) to H (exclusive), whole hours only.
- Periods
- 1 day (resets 00:00 UTC), 7 days (resets Monday 00:00 UTC) or 30 days (fixed windows counted from Monday 1970-01-05). Spending is counted per rule book, so a new version with a lower limit sees what was already spent in the window.
- Approval threshold
- An order strictly above the threshold needs the owner's approval of that exact order (rule book, version, asset, amount, order number). The approval is used up when the order is recorded.
- Minimum gap
- Seconds between two recorded orders, up to 30 days.
- Validity
- A version is valid from the minute it is proposed to its end date, at most 730 days. An expired version cannot be approved.
- Canonical text
- The rule set written as fixed lines (format lotiq-rules/1). Its keccak256 is the version's commitment on chain; the studio shows both before you approve.
Reason codes
The same 17 bits in the studio and in LotiqRuleBook. A unit test reads the Solidity source and fails if they ever differ.
| Bit | Name | Rule | Meaning |
|---|---|---|---|
| 0 | R_UNKNOWN_BOOK | Rule book | There is no rule book with this number. |
| 1 | R_REVOKED | Rule book | The owner revoked this rule book. It refuses every order. |
| 2 | R_PAUSED | Pause | The rule book is paused. |
| 3 | R_NO_ACTIVE_VERSION | Approval | No version of the rules has been approved yet. |
| 4 | R_VERSION_MISMATCH | Approval | The order names a version that is not the approved one. |
| 5 | R_NOT_AGENT | Agent | This address is not the agent bound to the approved version. |
| 6 | R_WRONG_ASSET | Asset | The order is for a different asset than the rule set allows. |
| 7 | R_ZERO_AMOUNT | Amount | The order amount is zero. |
| 8 | R_OVER_ORDER_MAX | Max per order | The order is larger than the maximum per order. |
| 9 | R_OVER_PERIOD_MAX | Max per period | The order would take this period's spending past its maximum. |
| 10 | R_OFF_DAY | Schedule | The agent may not act on this weekday. |
| 11 | R_OFF_HOURS | Schedule | The agent may not act at this hour (UTC). |
| 12 | R_NOT_STARTED | Validity | The rule set is not valid yet at this time. |
| 13 | R_EXPIRED | Validity | The rule set has expired. |
| 14 | R_TOO_SOON | Minimum gap | Too soon after the previous order. |
| 15 | R_NEEDS_APPROVAL | Approval threshold | Orders above the approval threshold need your approval for that exact order. |
| 16 | R_NONCE_USED | Order number | This order number was already used. |
The contract: LotiqRuleBook
LotiqRuleBook on Robinhood ChainLive from chain
0xe32009d97332710696bae0a2b0420759aff18288
Deployed in block 122,889,425 (creation tx), source verified on the explorer. Reading counters…
- Address
- 0xe32009d97332710696bae0a2b0420759aff18288
- Stores
- Rule books (owner, label, active version, pause / revoke, spending window, last order time, order count) and versions (hash + every limit + status + parent).
- Owner can
- openBook, propose, approve (exact number + hash), withdraw, pause, unpause, revoke (final), approveOrder, cancelOrderApproval.
- Agent can
- recordOrder (re-checks every rule at the current block and reverts with Refused(bits) when one fails), submitOrder (same check, but a refusal is logged as OrderRefused instead of reverting, so the owner is alerted) and halt (pause only; it can never unpause or raise a limit).
- Anyone can
- checkOrder (reason bits for any order and time), getBook, getVersion, remainingInPeriod, orderKey, booksOf, booksOfAgent.
- Never
- Holds or moves tokens or ETH, has no admin, no fee, no upgrade path, no owner over other people's books.
- Tests
- Unit, fuzz (1,024 runs each), invariant (5 invariants over random owner/agent sequences) and Robinhood Chain fork tests (real stock tokens, a real Chainlink feed).
- Review
- Source verified on the explorer; deployment checked byte for byte with verify-deployment. No outside security review yet. It holds no funds, but treat it as new code.
Networks and data sources
- Robinhood Chain
- Chain id 4663, gas in ETH, explorer https://robinhoodchain.blockscout.com. Reads go through the site's rate-limited relay first, then public RPCs.
- Robinhood Chain Testnet
- Chain id 46630, proven from this build's machine on 25 Nov 2026 (RPC and explorer answered). The rule book has no chain-specific code, so a trial copy could be deployed there; the live rule book and the studio are on mainnet, where stock-token identity can be proven.
- Stock tokens
- See Assets: proxy code hash + beacon slot + minted supply, re-read live; candidates from a vetted 23 Nov 2026 scan.
- Prices
- Chainlink data feeds on Robinhood Chain (stock feeds pause outside market hours); ETH/USD at 0x78f3556b67e17df817d51ef5a990cdaf09e8d3a9.