- Docs
- Infrastructure
- Settlement
On-Chain Settlement
Learn how Dual anchors state to the blockchain with cryptographic proofs, enabling trust without intermediaries and immutable audit trails.
Dual anchors platform state to the blockchain every 15 minutes through cryptographic proofs, creating an immutable audit trail and enabling trust without intermediaries.
Why On-Chain Settlement
Trust Without Intermediaries, No reliance on Dual or any central authority. Cryptographic proofs verify state transitions directly on the blockchain.
Immutable Audit Trail, Every settlement is permanently recorded on-chain. Audit, verify, and reconstruct platform state at any point in time.
Regulatory Compliance, Verifiable proofs provide cryptographic evidence of transaction execution and settlement, supporting regulatory requirements.
Independent Verification, Validators and users can independently verify all settlements without trusting Dual infrastructure.
Settlement Architecture
Dual uses a two-phase model to combine instant responsiveness with absolute finality:
Phase 1, Checkpoint: Actions batch into sealed checkpoints every 15 minutes. Sequencer commits to ordering.
Phase 1, ZK Proof: Prover generates cryptographic proof proving checkpoint validity and state transitions.
Phase 2, L1 Submission: Proof and commitment data submitted to L1 smart contract verifier.
Phase 2, Confirmed: Contract verifies proof and updates on-chain state root. Settlement is final.
Two-Phase Model
Optimistic phase: Actions are instantly accepted and begin executing as soon as they reach the sequencer. Provides immediate user feedback and low latency.
Final phase: Every 15 minutes, actions are sealed into a cryptographic checkpoint, proven, and anchored to L1. This creates absolute finality backed by on-chain state.
The Checkpoint-to-Chain Pipeline
1. Checkpoint Sealing
At fixed 15-minute intervals, the sequencer seals all actions received in the current window. A deterministic hash is computed from all state transitions, creating a commitment to the checkpoint's ordering and contents. This sealed checkpoint cannot be modified.
2. Proof Generation
The proving system (see ZK Rollup) generates a zero-knowledge proof. This proof cryptographically certifies that all state transitions in the checkpoint are valid according to Dual's execution rules, without revealing individual transaction details.
3. Transaction Submission to L1
A relayer submits the proof and minimal commitment data (checkpoint hash, new state root, data availability commitment) to the settlement contract on the L1 chain (Ethereum, Polygon, Arbitrum, etc.). The transaction is included in an L1 block.
4. Confirmation and Finality
The contract verifies the proof in-chain. Once verified, the new state root is stored on-chain and cannot be reverted. The settlement is now final across all chains where the verifier is deployed.
What Goes On-Chain vs Off-Chain
On-chain: Proof, state root, data availability commitment, checkpoint hash
Off-chain but published: Full state diffs, action details, merkle proofs for individual verification
Chain Selection & Strategy
Why EVM-Compatible Chains
EVM chains provide the most mature ecosystem for zero-knowledge verification. Dual's verifier contract is optimized for Solidity and can be deployed quickly across any EVM-compatible chain.
Supported chains include Ethereum, Polygon, Arbitrum, Optimism, Base, and others.
Multi-Chain Strategy
Dual deploys verifier contracts on multiple chains. The same proof verifies settlement across all chains in parallel, ensuring consistency. Allows investors and applications to verify settlement on their preferred chain without additional delay.
Chain Selection Criteria
Gas Costs, Lower per-operation costs reduce settlement overhead. L2 chains (Arbitrum, Optimism) offer significant savings over Ethereum L1.
Finality Time, Different chains have different block times and finality guarantees. Ethereum provides the highest security; L2s offer faster finality.
Ecosystem Alignment, Deploy on chains where your investors and applications already operate for seamless verification workflows.
Future: Cross-Chain Settlement, Dual is exploring chain abstraction protocols to unify settlement verification across heterogeneous chains, enabling true interoperability without requiring multiple proofs.
Data Availability
What is Data Availability?
Data availability ensures that all data needed to verify platform state is publicly accessible. Without it, a malicious sequencer could commit to state that no one can verify or reconstruct. DA is critical for trust in decentralized systems.
Dual's Approach
Dual publishes complete state diffs alongside every checkpoint proof. This includes:
- Ordered action logs from the checkpoint
- Account state changes (balances, holdings, etc.)
- Merkle proofs for individual transaction verification
- Complete state root path for independent computation
All data is published on decentralized storage (IPFS) and indexed for efficient retrieval.
State Reconstruction
Any party can independently reconstruct the full platform state from published data. This enables independent validators to verify proofs without relying on Dual, and provides an immutable audit trail for regulatory and forensic purposes.
Data Availability Approaches
Dual's strategy: Full state diffs are published via IPFS and DA layers for redundancy. This ensures high availability while minimizing on-chain footprint. Investors can verify data availability through IPFS nodes and DA layer clients.
Finality Guarantees
Dual provides three distinct levels of settlement finality:
Level 1: Optimistic Confirmation (under 1 second)
Your action is accepted by the sequencer and begins execution immediately. Provides instant user feedback and low-latency transactions.
Use when: Display feedback, quick status updates, responsive UX
Level 2: Checkpoint Inclusion (~15 minutes)
Your action is sealed into a checkpoint and committed cryptographically. The ordering is now immutable, but not yet on-chain.
Use when: Prevent frontrunning, lock-in ordering, settlements that cannot be reordered
Level 3: On-Chain Finality (~20 minutes)
Your action's proof is verified on-chain and the state root is updated. Settlement is now absolute and backed by the L1 blockchain. Cannot be reverted under any circumstances.
Use when: Regulatory requirements, large settlements, cross-chain bridges, irrevocable commitments
Most applications use optimistic confirmation for UX responsiveness and checkpoint inclusion for settlement certainty. On-chain finality is essential for settlements that interact with external systems or require maximum security guarantees.
Settlement Costs
Cost Breakdown
Settlement costs are amortized across all actions in a checkpoint:
- Proof generation: ~$0.50 per checkpoint (independent of action count)
- L1 submission: ~$5–50 depending on chain and gas market
- Data publication: ~$0.01–0.10 per checkpoint on DA layers
- Cost per action: Total checkpoint cost ÷ number of actions
Comparison: Dual vs Direct L1
Direct L1: Per-action cost: $50–500+ (depending on chain and market). Suitable for high-value transactions, low-volume systems.
Dual Settlement: Per-action cost: $0.01–0.50 (with 1000+ actions per checkpoint). Suitable for high-volume systems, retail transactions, frequent updates.
Projected Costs at Different Volumes
Developer Integration
Settlement Status API
Check the settlement status of any action:
GET /api/settlement/status/:actionIdResponse:{"actionId": "action_xyz123","status": "finalized","optimistic": {"confirmed": true,"confirmedAt": "2026-03-16T12:00:00Z"},"checkpoint": {"included": true,"checkpointId": "cp_456","checkpointHash": "0x789...","sealedAt": "2026-03-16T12:15:00Z"},"finality": {"onChain": true,"txHash": "0xabc...","blockNumber": 18500000,"verifiedAt": "2026-03-16T12:20:00Z"}}
Example: Checking On-Chain Finality
import { DualClient } from "dual-sdk";const client = new DualClient({token: process.env.DUAL_API_KEY,authMode: "api_key",});// Poll for on-chain finalityconst settlement = await client.settlement.wait(actionId, {level: "finalized", // Wait for on-chain finalitymaxWaitMs: 60000 * 30 // 30 minutes});if (settlement.finality.onChain) {console.log("Settlement final on chain:",settlement.finality.txHash);} else {console.log("Awaiting on-chain confirmation");}
Webhook Events
checkpoint.anchored, Fired when your action is sealed into a checkpoint. Contains checkpoint ID and hash.
checkpoint.confirmed, Fired when the checkpoint's proof is verified on-chain. Contains L1 transaction hash and block number.
Independent Verification
Verify settlement directly on-chain without relying on Dual APIs:
import { ethers } from "ethers";const provider = new ethers.JsonRpcProvider("https://eth-mainnet.g.alchemy.com/v2/...");// Dual verifier contract on Ethereumconst verifierAddress = "0x...";const verifierABI = [...]; // ABI from Dual docsconst verifier = new ethers.Contract(verifierAddress,verifierABI,provider);// Check if checkpoint hash is verified on-chainconst checkpointHash = "0x789...";const verified = await verifier.isCheckpointVerified(checkpointHash);if (verified) {console.log("Settlement confirmed on Ethereum");const stateRoot = await verifier.getStateRoot(checkpointHash);console.log("Current state root:", stateRoot);}