Core Concepts#
The Mental Model Behind TetraFi
This page covers the mental model behind TetraFi: how intents flow through the system, who the participants are, and the key primitives that make cross-chain DvP settlement possible.
Intent Execution Stack#
TetraFi separates what the user wants from how it gets done. Each layer is independently upgradeable.
Intent Execution Stack
Typed SDK with RFQ submission, WebSocket quote streaming, and settlement tracking.
Async Python client for institutional trading desks and algorithmic strategies.
Embeddable React component for instant OTC swap integration.
Direct HTTP interface for any language - full endpoint coverage.
High-throughput Rust HTTP handlers for RFQ submission, quote retrieval, and order management.
Real-time quote streaming and event notifications to solvers and takers.
UCCP-based quote ranking with compliance filtering and fair pricing guarantees.
Maps token pairs to directed corridors and routes to qualified solver sets.
ERC-7683 StandardOrder parsing, validation, and lifecycle tracking.
Executes fills on destination chain OutputSettler contracts.
Watches for oracle proofs and triggers claim/refund on escrow.
Real-time price feeds with gas estimation for competitive quoting.
On-chain attestation storage. Per-chain deployment. Checked pre-trade.
Vendor adapters for Chainalysis, Elliptic, and other identity providers.
IVMS101 message construction and VASP-to-VASP transmission.
Append-only audit trail. Write-Once Read-Many for regulatory compliance.
Origin chain deposit locking. Two modes: Permit2Escrow and CompactEscrow (ResourceLock).
Destination chain fill recording. Resolves limit, dutch auction, and exclusive order types.
Cross-chain attestation verification via Hyperlane ISM integration.
Token approval infrastructure - gasless approvals and allocator-based locking.
| Layer | Concern | TetraFi Role |
|---|---|---|
| Intent Expression (WHAT) | User declares desired outcome via StandardOrder | Defines the format |
| Orderflow Auction (WHO) | Solvers compete via RFQ or Dutch auction | Runs the auction |
| Settlement Primitive (HOW) | ResourceLock, Permit2Escrow - orthogonal to intent format | Provides the contracts |
| Solver Liquidity | How the solver sources funds - inventory, DEX, OTC | Out of scope (solver's problem) |
How a Trade Works#
Settlement DvP Sequence
In plain language - taker submits RFQ → solvers bid → best quote wins (UCCP) → taker signs StandardOrder (EIP-712) → funds lock in escrow → solver fills on destination chain → oracle attests → escrow releases = DvP complete.
Full lifecycle with contract calls and state transitions: Settlement Flows.
Key Terminology#
ERC-7683 typed struct: user, nonce, inputs, outputs, deadlines, oracle references. Signed off-chain via EIP-712. The universal format for cross-chain settlement intents.
Output leg specifying destination chain requirements: oracle, settler, token, amount, recipient. Each StandardOrder has one or more MandateOutputs.
A directed route: origin_chain:token → destination_chain:token. The cross-chain analog of a trading pair. Each corridor has its own solver set and compliance requirements.
Solver - Liquidity provider competing on price. Fills orders with own capital on the destination chain.
Taker - Institutional client initiating a trade: asset managers, corporate treasuries, funds.
Atomic settlement where both legs execute or neither does. The solver delivers on the destination chain, the escrow releases on the origin chain - simultaneously via oracle attestation.
All orders in a batch receive the same effective bps rate. Prevents information leakage and ensures fair execution across simultaneous RFQs on the same corridor.
ResourceLock - Output-first lock via The Compact. Solver fills before user funds lock. Highest capital efficiency.
Permit2Escrow - Input-first lock. User deposits, then solver fills. Broader token coverage.
Traditional vs. TetraFi Settlement#
Bridge + Swap + Wait
- Find a bridge, approve tokens
- Bridge to destination chain (15-45 min)
- Swap on a DEX (slippage risk)
- Manual compliance per jurisdiction
- No atomic guarantee
Submit Intent + Settle
- Submit a single StandardOrder
- Solvers compete to fill
- Atomic DvP in under 10 min
- On-chain compliance enforced
- Both legs or neither - guaranteed
All terms above have inline tooltips throughout the docs. Hover any underlined term for a quick definition, or visit the Glossary for the full reference.