USD₮0
  • Overview
    • USD₮0
    • How USDT0 Works
      • The Legacy Mesh
    • Use Cases
  • Tutorial
    • How To
  • Technical Documentation
    • Developer
    • Security
    • Mediakit
  • XAUt0
Powered by GitBook
On this page
  • 1. Architecture Overview
  • Core Components
  • Component Interaction Diagram
  • 2. Interfaces Reference
  • Token Interfaces
  • OFT Interfaces
  • 3. Deployments
  • Ethereum Mainnet
  • Arbitrum One
  • Berachain
  • Ink
  • Optimism
  • Unichain
  • Corn
  • Sei
  • Flare
  • HyperEVM
  • 4. Security Configuration (DVNs)

Was this helpful?

Export as PDF
  1. Technical Documentation

Developer

PreviousHow ToNextSecurity

Last updated 26 days ago

Was this helpful?

USD₮0 is an . The OFT standard allows tokens to move seamlessly across multiple blockchains using LayerZero's messaging protocol, ensuring a unified supply across all chains. USD₮0 follows this standard, leveraging LayerZero's infrastructure to enable secure and efficient cross-chain transfers while maintaining compatibility with existing USD₮ functionality.

1. Architecture Overview

The USD₮0 implementation separates token functionality from cross-chain messaging. This split enables independent upgrades of token and messaging components while maintaining consistent token behavior across chains.

Core Components

The implementation consists of three main components:

  1. OAdapterUpgradeable (on Ethereum):

    1. Implements LayerZero OFT functionality for Ethereum

    2. Handles both sending and receiving cross-chain messages

    3. Interfaces directly with the TetherToken contract on Ethereum

    4. Locks/Unlocks USD₮ for cross-chain transfers

  2. OUpgradeable (on other chains):

    1. Implements LayerZero OFT functionality for other chains

    2. Handles both sending and receiving cross-chain messages

    3. Interfaces with the TetherTokenOFTExtensoin

    4. Controls minting/burning for cross-chain transfers

  3. TetherTokenOFTExtension (on other chains):

    1. Offers mint/burn interface for the OFT

Component Interaction Diagram

The graphic illustrates how USD₮ and USD₮0 are transferred across Ethereum, Chain A, and Chain B:

  1. Ethereum → Chain B:

    • USDT Adapter locks USDT on Ethereum.

    • A LayerZero message triggers USDT0 OFT on Chain B to mint equivalent USD₮0.

  2. Chain B → Chain A:

    • USDT0 OFT burns USD₮0 on Chain B.

    • A message triggers USDT0 OFT on Chain A to mint the equivalent.

  3. Chain A → Ethereum:

    • USDT0 OFT burns USD₮0 on Chain A.

    • A message instructs the USDT Adapter to unlock USD₮ on Ethereum.

The flow ensures consistent token supply across chains.

2. Interfaces Reference

Token Interfaces

The USD₮0 token implements the following standard interfaces:

  • ERC20

  • ERC20Permit (EIP-2612)

  • EIP-3009 (Gasless transfers)

Key public functions for integration:

interface IERC20 {
    function transfer(address to, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function approve(address spender, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function totalSupply() external view returns (uint256);
}

interface IERC20Permit {
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

// EIP-3009 functions for gasless transfers
interface IEIP3009 {
    function transferWithAuthorization(
        address from,
        address to,
        uint256 value,
        uint256 validAfter,
        uint256 validBefore,
        bytes32 nonce,
        bytes memory signature
    ) external;
    
    function receiveWithAuthorization(
        address from,
        address to,
        uint256 value,
        uint256 validAfter,
        uint256 validBefore,
        bytes32 nonce,
        bytes memory signature
    ) external;
}

OFT Interfaces

The OFT implementation provides cross-chain transfer functionality through LayerZero:

interface IOFT {
    struct SendParam {
        uint32 dstEid;          // Destination endpoint ID
        bytes32 to;             // Recipient address
        uint256 amountLD;       // Amount to send
        uint256 minAmountLD;    // Minimum amount to receive
        bytes extraOptions;     // Additional options
        bytes composeMsg;       // Optional composed message
        bytes oftCmd;           // OFT-specific command
    }

    struct MessagingFee {
        uint256 nativeFee;     // Fee in native gas
        uint256 lzTokenFee;    // Fee in LZ token
    }

    struct OFTReceipt {
        uint256 amountSentLD;      // Amount sent
        uint256 amountReceivedLD;  // Amount received
    }
    
    // Get expected received amount
    function quoteOFT(SendParam calldata sendParam) 
        external view returns (
            OFTLimit memory,          // Min/max amounts
            OFTFeeDetail[] memory,    // Fee breakdown
            OFTReceipt memory        // Expected amounts
        );

    // Get messaging fee
    function quoteSend(SendParam calldata sendParam, bool payInLzToken)
        external view returns (MessagingFee memory);
    
    // Execute the cross-chain transfer
    function send(
        SendParam calldata sendParam,
        MessagingFee calldata fee,
        address refundAddress
    ) external payable;
}

The OFT interface is consistent across all chains, whether using OAdapterUpgradeable on Ethereum or OUpgradeable on other chains. The only difference is that on Ethereum, users need to approve the OFT adapter to spend their USD₮ before calling send.

Example

The following example shows how to bridge USD₮ from Ethereum to Arbitrum, including necessary approvals and parameter handling.

import { ethers } from "ethers";

const USDT_ADDRESS = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
const OFT_ADDRESS = "0x6C96dE32CEa08842dcc4058c14d3aaAD7Fa41dee";
const ARB_EID = 30110;
const MAX_UINT256 = ethers.constants.MaxUint256;

const OFT_ABI = [
    "function quoteOFT(tuple(uint32,bytes32,uint256,uint256,bytes,bytes,bytes)) view returns (tuple(uint256,uint256), tuple(int256,string)[], tuple(uint256,uint256))",
    "function quoteSend(tuple(uint32,bytes32,uint256,uint256,bytes,bytes,bytes), bool) view returns (tuple(uint256,uint256))",
    "function send(tuple(uint32,bytes32,uint256,uint256,bytes,bytes,bytes), tuple(uint256,uint256), address) payable returns (tuple(bytes32,uint64,tuple(uint256,uint256)), tuple(uint256,uint256))"
];

async function sendUSDT0ToArbitrum(signer: ethers.Signer, amount: string, recipient: string) {
    const usdt = new ethers.Contract(USDT_ADDRESS, ["function approve(address,uint256)"], signer);
    const oft = new ethers.Contract(OFT_ADDRESS, OFT_ABI, signer);
    
    const amountWei = ethers.utils.parseUnits(amount, 6);
    
    // Approve max amount
    await usdt.approve(OFT_ADDRESS, MAX_UINT256);
    
    const sendParam = [
        ARB_EID,
        ethers.utils.hexZeroPad(recipient, 32),
        amountWei,
        0,
        "0x",
        "0x",
        "0x"
    ];

    const [,, oftReceipt] = await oft.callStatic.quoteOFT(sendParam);
    sendParam[3] = oftReceipt[1];
    const msgFee = await oft.callStatic.quoteSend(sendParam, false);

    const tx = await oft.send(
        sendParam,
        msgFee,
        recipient,
        { value: msgFee[0] }
    );
    
    return tx;
}

3. Deployments

Ethereum Mainnet

Arbitrum One

Berachain

Ink

Optimism

Unichain

Corn

Sei

Flare

HyperEVM

4. Security Configuration (DVNs)

USD₮0 utilizes a dual-DVN security configuration requiring verification from:

  • LayerZero DVN

  • USDT0 DVN

Both DVNs must verify the payloadHash before a cross-chain message can be committed for execution. This setup ensures enhanced security through independent verification of all cross-chain transfers.

OAdapterUpgradeable:

Safe:

ArbitrumExtensionV2:

OUpgradeable:

Safe:

TetherTokenOFTExtension:

OUpgradeable:

Safe:

TetherTokenOFTExtension:

OUpgradeable:

Safe:

TetherTokenOFTExtension:

OUpgradeable:

Safe:

TetherTokenOFTExtension:

OUpgradeable:

Safe:

TetherTokenOFTExtension:

OUpgradeable:

Safe:

TetherTokenOFTExtension:

OUpgradeable:

Safe:

TetherTokenOFTExtension:

OUpgradeable:

Safe:

HyperliquidExtension:

OUpgradeable:

Safe:

For detailed information about LayerZero DVNs and security stacks, refer to:

Omnichain Fungible Token (OFT)
0x6C96dE32CEa08842dcc4058c14d3aaAD7Fa41dee
0x4DFF9b5b0143E642a3F63a5bcf2d1C328e600bf8
0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9
0x14E4A1B13bf7F943c8ff7C51fb60FA964A298D92
0x4DFF9b5b0143E642a3F63a5bcf2d1C328e600bf8
0x779Ded0c9e1022225f8E0630b35a9b54bE713736
0x3Dc96399109df5ceb2C226664A086140bD0379cB
0x425d1D17C33bdc0615eA18D1b18CCA7e14bEeb58
0x0200C29006150606B650577BBE7B6248F58470c1
0x1cB6De532588fCA4a21B7209DE7C456AF8434A65
0xc95de55ce5e93f788A1Faab2A9c9503F51a5dAE2
0x01bFF41798a0BcF287b996046Ca68b395DbC1071
0xF03b4d9AC1D5d1E7c4cEf54C2A313b9fe051A0aD
0x4DFF9b5b0143E642a3F63a5bcf2d1C328e600bf8
0x9151434b16b9763660705744891fA906F660EcC5
0xc07bE8994D035631c36fb4a89C918CeFB2f03EC3
0x4DFF9b5b0143E642a3F63a5bcf2d1C328e600bf8
0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb
0x3f82943338a8a76c35BFA0c1828aA27fd43a34E4
0x57d798f9d3B014bAC81A6B9fb3c18c0242A9411E
0x9151434b16b9763660705744891fA906F660EcC5
0x56Fe74A2e3b484b921c447357203431a3485CC60
0x4DFF9b5b0143E642a3F63a5bcf2d1C328e600bf8
0xe7cd86e13AC4309349F30B3435a9d337750fC82D
0x567287d2A9829215a37e3B88843d32f9221E7588
0x6ae078461f35c3cC216A71029F71ee7Bc4d9a10b
0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb
0x904861a24F30EC96ea7CFC3bE9EA4B476d237e98
0xB64A89AD247a2D691A728Bb6822a85EeDD7Fc541
https://docs.layerzero.network/v2/home/modular-security/security-stack-dvns
Component Interaction Diagram