Product semantics
Owns user journeys, entities, surfaces, risk framing, and the mental model for spells, positions, triggers, and automation.
Spells v2 Walkthrough
An alignment artifact for product, design, and engineering.
On This Page
Spells v2 is an event-driven DeFi system that lets users express a market view, route that view through a curated Spell, and execute or automate the result through a user-controlled Metavault. The key promise is not generic automation. It is legible automation with explicit limits, visible risk, and durable safety paths when infrastructure degrades.
4
Discovery, execution, monitoring, automation.
5
Growth, liquidity, risk, regulation, shock.
2
Durable orchestration plus per-vault transaction control.
Fail Closed
Protective actions continue; stale or unsafe execution does not.
Users discover a signal, choose a bounded strategy, route it through a user-owned account, and keep visibility after entry. The product is not a generic terminal. It is an opinionated loop with explicit ownership and risk framing at every handoff.
Edge workers own the contract surface, workflows own durable business sequencing, and the TLM owns ambiguous transaction state. This separation is what lets the system keep user requests fast while still treating blockchain execution as a durable actor problem.
Spells assumes infrastructure failures will happen. Position monitoring, alerting, trigger continuity, and emergency close each have a minimum dependency set so safety-critical behavior survives the loss of a single component.
The docs deliberately split into two lenses. The PRD defines what the user experience must mean. The spec defines how the system enforces those promises in runtime, storage, resilience, and security. This walkthrough keeps that line visible so alignment conversations stay grounded.
Owns user journeys, entities, surfaces, risk framing, and the mental model for spells, positions, triggers, and automation.
Owns topology, orchestration, storage authority, service boundaries, failure modes, observability, and testing gates.
If a topic appears in both places, PRD owns product meaning and spec owns runtime behavior. This site mirrors that rule instead of flattening it away.
Spells v2 is not an incremental patch on the prototype. It is a clean reimplementation optimized around durable orchestration, serialized execution, compute-near-data, and a single relational authority with explicit degraded paths.
The architecture resets around v2 constraints instead of carrying prototype seams forward into launch-critical systems.
Workflows own business sequencing. The TLM owns blockchain ambiguity per Metavault, including nonce serialization and recovery.
Edge handles user-facing latency; regional workflows stay close to Neon for high-frequency monitoring and enrichment loops.
| Surface | Why it exists | What it must not do |
|---|---|---|
| Next.js / Vercel | User-facing UI, wallet flows, dashboards. | It is not trusted for autonomous trading or safety-critical automation. |
| Cloudflare Worker | Owns the public contract surface, auth, reads, and emergency entrypoints. | It does not become a hidden second frontend or bypass scoped access rules. |
| Cloudflare Workflows | Owns durable monitoring, trigger evaluation, and refresh pipelines. | It does not own transaction ambiguity or serialized nonce control. |
| Durable Objects | Own per-vault transaction lifecycle, session mirror use, and finality. | They are not a second general-purpose database. |
Most documents in the set either define one of these flows directly or define the controls that keep them safe. If the team stays aligned on these three, the rest of the spec reads as reinforcement rather than complexity.
Prediction markets and WorldMonitor factors feed into bounded Triggers, which can dispatch a spell or a GMX trade when a condition is met.
User-facing execution hands off to durable backend logic, then to a per-vault actor that handles gas estimation, submission, verification, and recovery.
Positions stay observable after entry. Monitoring is continuous, alert thresholds are explicit, and degraded automation is surfaced as attention state instead of being hidden in backend logs.
This microsite rearranges the Markdown set into an alignment narrative. The original docs still matter when the team needs detail, but the fastest path to shared context is to move from product meaning to system shape to execution risk to launch sequencing.