Smart Contracts

DUAL's on-chain contract layer anchors cryptographic proofs and ownership records to the blockchain. Four core contracts work together to enforce tokenization rules, validate state transitions, and provide settlement guarantees for enterprise tokenized assets.

Overview

DUAL's smart contracts enforce ownership, validate token transfers, and anchor cryptographic state to the blockchain. Unlike traditional smart contracts that execute business logic, DUAL contracts serve as a verification and settlement layer for a high-performance tokenization platform.

Why smart contracts matter for trust: Code-enforced rules ensure no single entity can unilaterally change ownership records. State root updates pass through cryptographic verification before being recorded on-chain, creating an immutable audit trail for regulatory compliance.

Contracts Deployed

4 Core

Audit Status

Audited

Upgrade Model

Proxy-Upgradeable

Chain Support

EVM-Compatible

Contract Architecture

DUAL's four core contracts form an integrated system for on-chain verification and state anchoring:

DUALRegistryState root anchorDUALVerifierZK proof verificationDUALOwnershipL1 settlement recordsDUALGovernanceProtocol parametersupdateStateRoot()

DUALRegistry

Central registry mapping organization IDs to cryptographic state roots. Maintains the single source of truth for all tokenization state on-chain.

  • Register organizations and assign unique orgIds
  • Store state root checkpoints indexed by organization
  • Enable cryptographic verification of state transitions
  • Emit audit events for all state updates

DUALVerifier

Verifies zero-knowledge proofs submitted by the DUAL sequencer and authorizes state root updates to DUALRegistry. Acts as the gatekeeper for on-chain state.

  • Verify ZK proofs against stored verification keys
  • Accept checkpoint submissions from authorized sequencer
  • Call DUALRegistry.updateStateRoot() upon successful verification
  • Manage verification key rotation and updates

DUALOwnership

Optional L1 settlement layer for high-value assets requiring regulatory compliance or cross-platform interoperability. Supports ERC-721 for NFT marketplaces.

  • Mint and manage on-chain ownership records
  • Enable L2↔L1 bridging for cross-chain settlement
  • Support ERC-721 compatible NFT transfer
  • Track regulatory holds and compliance flags

DUALGovernance

Manages protocol parameters, upgrade proposals, and emergency procedures. Multi-sig controlled to ensure decentralized protocol evolution.

  • Define checkpoint intervals and batch sizes
  • Set and adjust protocol fee rates
  • Propose and execute contract upgrades
  • Manage emergency pause and circuit breaker states

DUALRegistry: State Root Anchor

The DUALRegistry is the authoritative on-chain record of DUAL tokenization state. Every cryptographically verified state transition is anchored here, creating an immutable audit trail.

Key Functions

  • registerOrg(orgId, name)
  • updateStateRoot(orgId, root)
  • getStateRoot(orgId)
  • getCheckpoint(orgId, id)

Storage Layout

  • mapping(bytes32 → StateRoot)
  • mapping(bytes32 → uint[] checkpoints)
  • mapping(bytes32 → Checkpoint)
  • address verifierAddress

Events Emitted

event OrgRegistered(indexed orgId, name, timestamp)
event StateRootUpdated(indexed orgId, root, checkpointId, timestamp)
event CheckpointAnchored(indexed orgId, checkpointId, root, proofHash)

DUALVerifier: Proof Verification

The DUALVerifier performs cryptographic verification of zero-knowledge proofs submitted by the sequencer. This ensures only valid state transitions are recorded on-chain.

Verification Flow

  1. 1.Sequencer submits checkpoint with ZK proof
  2. 2.Verifier validates proof against stored verification key
  3. 3.On success, calls DUALRegistry.updateStateRoot()
  4. 4.Emits CheckpointVerified event for off-chain indexing

Key Functions

  • verifyProof(proof, pubInputs)
  • submitCheckpoint(checkpoint)
  • getVerificationKey()
  • rotateVerificationKey(newKey)

Gas Costs

  • Per verification:~300,000 gas
  • Constant regardless ofbatch size or proof complexity

DUALOwnership: L1 Settlement

The DUALOwnership contract provides optional on-chain settlement for high-value assets that require regulatory compliance or cross-platform interoperability. It implements ERC-721 compatibility for integration with NFT marketplaces.

When to Use DUALOwnership

  • Regulatory requirements for specific jurisdictions
  • High-value assets requiring L1 settlement guarantees
  • Cross-platform interoperability with existing NFT ecosystems
  • Assets requiring compliance holds and transfer restrictions

Key Functions

  • mintOnChain(orgId, tokenId)
  • transferOnChain(to, tokenId)
  • bridgeToL2(tokenId)
  • bridgeFromL2(tokenId)

Bridge Mechanics

L2 → L1: Lock token in DUAL sequencer, mint on L1

L1 → L2: Burn token on L1, unlock on DUAL sequencer

Both directions use merkle proofs for security

DUALGovernance: Protocol Parameters

Protocol governance is managed through multi-signature control and time-locked execution. All parameter changes and contract upgrades follow a proposal-voting-execution workflow with community oversight.

Configurable Parameters

  • Checkpoint Interval: Block frequency for state anchoring
  • Max Batch Size: Maximum transactions per checkpoint
  • Verification Fee: Cost per proof submission
  • Settlement Fee: L1 ownership recording cost

Governance Process

  1. 1. Proposal submitted
  2. 2. Multi-sig voting period
  3. 3. Timelock delay (48h)
  4. 4. Execution

Emergency Procedures

Pause Function: Emergency pause of checkpoint submissions (requires 3-of-5 multi-sig)

Circuit Breaker: Automatic pause if verification failure rate exceeds threshold

Both require governance to re-enable normal operation

Security & Audits

Professional Audit

All core contracts have undergone professional security audits with no critical findings. Regular re-audits are conducted following major protocol upgrades.

Upgrade Pattern: UUPS with Timelock

  • Upgradeable Proxy (UUPS) pattern for contract evolution
  • 48-hour timelock before execution prevents flashloan attacks
  • Multi-sig authorization required for all upgrades
  • Transparent upgrade process with public proposal logs

Immutability Guarantees

Cannot Change: Core verification logic, state root history, audit events

Can Change: Verification keys (with timelock), protocol fees, parameter thresholds

Historical state roots remain immutable on-chain permanently

Bug Bounty Program

DUAL operates a responsible disclosure program for security researchers. Critical vulnerabilities can earn substantial bounties before public disclosure.

Developer Integration

Get started integrating DUAL smart contracts into your applications. Contract addresses and ABIs are available at mainnet launch.

Contract Addresses

Deployed on EVM-compatible chains — addresses will be published at launch.

DUALRegistry: 0x...
DUALVerifier: 0x...
DUALOwnership: 0x...
DUALGovernance: 0x...

Read State Root from Registry

import { ethers } from 'ethers';

const provider = new ethers.providers.JsonRpcProvider(
  'https://rpc.example.com'
);

const DUAL_REGISTRY_ABI = [
  'function getStateRoot(bytes32 orgId) external view returns (bytes32)',
  'function getCheckpoint(bytes32 orgId, uint256 id) external view returns (tuple(bytes32 root, uint256 timestamp, bytes32 proofHash))',
];

const registryAddress = '0x...'; // Published at launch
const registry = new ethers.Contract(
  registryAddress,
  DUAL_REGISTRY_ABI,
  provider
);

// Query the current state root for an organization
const orgId = ethers.utils.id('acme-corp');
const stateRoot = await registry.getStateRoot(orgId);

console.log('Current state root:', stateRoot);

// Get a specific checkpoint
const checkpoint = await registry.getCheckpoint(orgId, 42);
console.log('Checkpoint 42:', checkpoint);

Listen for Checkpoint Events

import { ethers } from 'ethers';

const provider = new ethers.providers.JsonRpcProvider(
  'https://rpc.example.com'
);

const DUAL_REGISTRY_ABI = [
  'event CheckpointAnchored(indexed bytes32 orgId, indexed uint256 checkpointId, bytes32 root, bytes32 proofHash)',
];

const registryAddress = '0x...'; // Published at launch
const registry = new ethers.Contract(
  registryAddress,
  DUAL_REGISTRY_ABI,
  provider
);

// Listen for new checkpoints
registry.on('CheckpointAnchored', (orgId, checkpointId, root, proofHash) => {
  console.log(`New checkpoint: org=${orgId}, id=${checkpointId}`);
  console.log(`State root: ${root}`);
  console.log(`Proof hash: ${proofHash}`);
});

// Or filter by specific organization
const orgId = ethers.utils.id('acme-corp');
registry.on(
  registry.filters.CheckpointAnchored(orgId),
  (orgId, checkpointId, root, proofHash) => {
    console.log(`Checkpoint anchored for ${orgId}`);
  }
);

For detailed integration guides, contract ABIs, and deployment information:

View Developer Guide →

Related Resources