Someone initiating a cross-chain bridge transfer on laptop, phone showing confirmation, coffee shop background, casual DeFi moment.
Protocols

Wallet and Exchange OFT Integration Patterns

Implementation playbook for centralized exchanges, custodians, and wallet providers to correctly detect, credit, and initiate OFT and OFTAdapter transfers, which differ fundamentally from standard ERC-20 Transfer events.
introduction
INBOUND TRANSFER DETECTION

Why Standard ERC-20 Detection Fails for OFTs

Standard ERC-20 transfer detection logic fails for Omnichain Fungible Tokens because inbound cross-chain value delivery does not emit a conventional Transfer event.

Centralized exchanges, custodians, and wallet providers typically detect inbound token deposits by monitoring for standard Transfer(address indexed from, address indexed to, uint256 value) events where the from address is a known deposit address or the zero address. This pattern breaks for LayerZero Omnichain Fungible Tokens (OFTs). When an OFT transfer arrives on the destination chain, the token contract's lzReceive override mints new tokens directly to the recipient's balance via an internal _mint or _credit call. The standard Transfer event emitted during this mint has the zero address as the from field, which is indistinguishable from a native mint or airdrop and does not contain the cross-chain source information that integration teams need for reconciliation.

The operational consequence is that a wallet or exchange relying solely on Transfer event monitoring will either miss inbound OFT deposits entirely or misclassify them as internal mints. For an OFTAdapter wrapping an existing ERC-20, the inbound flow involves the adapter contract releasing tokens from its own balance to the recipient, emitting a Transfer from the adapter's address—not from the canonical source-chain sender. Integration teams must instead monitor for the PacketReceived event on the LayerZero Endpoint contract or the ReceiveFromChain event emitted by the OFT contract itself, correlating the srcEid (source endpoint ID) and sender bytes to reconstruct the true origin of the deposit. This requires maintaining a mapping of LayerZero chain IDs to internal chain identifiers and handling the ABI-encoded sender address format.

Teams that fail to adapt their detection logic risk user fund crediting delays, incorrect balance displays, and reconciliation failures that can cascade into withdrawal freezes or audit findings. Chainscore Labs provides OFT integration review and inbound-detection testing to validate that exchange and wallet systems correctly identify, credit, and reconcile omnichain token transfers across all supported chain paths.

OFT INBOUND DETECTION AND OUTBOUND INITIATION

Integration Surface at a Glance

Key differences from standard ERC-20 integration that affect centralized exchanges, custodians, and wallet providers when detecting inbound OFT transfers and initiating outbound omnichain transfers on behalf of users.

AreaWhat changesWho is affectedAction

Inbound transfer detection

OFTs use PacketReceived events instead of standard ERC-20 Transfer events for cross-chain receives

Exchange deposit monitors, custodians, wallet indexers

Add PacketReceived event monitoring to deposit detection pipelines alongside Transfer events

Outbound transfer initiation

Must call sendFrom with destination chain ID and adapter params instead of standard transfer

Exchange withdrawal engines, wallet transaction builders

Implement OFT-specific sendFrom flow with correct chain ID encoding and adapter parameter construction

Gas fee handling

Outbound transfers require native gas on source chain plus destination gas estimation for lzReceive execution

Exchange fee engines, wallet gas estimators

Build dynamic fee estimation that accounts for source gas, LayerZero message fee, and destination execution gas

Token supply tracking

OFT.sol uses mint-and-burn across chains while OFTAdapter.sol uses lock-and-mint with a reserve contract

Exchange treasury teams, token issuers

Verify supply model (OFT vs OFTAdapter) and monitor total supply across all deployed chains

Event indexing consistency

PacketSent and PacketReceived events must be correlated across chains to build complete transfer history

Data teams, analytics providers, backend developers

Implement cross-chain event correlation pipeline linking source PacketSent to destination PacketReceived

Deposit finality

Inbound OFT transfers require DVN verification and Executor delivery, adding latency beyond chain finality

Exchange operations teams, risk managers

Configure deposit confirmation thresholds accounting for DVN verification time and Executor delivery status

Address format compatibility

OFT recipient addresses must be encoded in correct format for destination chain (EVM vs non-EVM)

Wallet UI developers, exchange address validators

Implement chain-aware address validation and encoding for each supported destination chain

Failed message recovery

BLOCKING mode can halt channel on single message revert; NON_BLOCKING stores failed messages for retry

Exchange operations teams, incident responders

Build monitoring for stuck channels and implement retry or clear mechanisms for failed inbound messages

technical-context
OFT TRANSFER DETECTION

Inbound Detection: Event Signatures and Indexing Logic

How exchanges, custodians, and wallets must detect and credit inbound OFT transfers, which differ fundamentally from standard ERC-20 Transfer events.

Detecting inbound Omnichain Fungible Token (OFT) transfers requires a fundamentally different indexing strategy than standard ERC-20 tokens. A native OFT does not emit a Transfer event on the destination chain when tokens arrive. Instead, the lzReceive function on the destination OFT contract mints tokens directly to the recipient's address and emits a ReceiveFromChain event. Indexing infrastructure that monitors only for the standard Transfer(address,address,uint256) signature will completely miss inbound OFT credits, leading to failed deposits and unreconciled user balances for exchanges and custodians.

The canonical event to monitor is ReceiveFromChain(uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _to, uint256 _amount). The _to parameter identifies the credited address, and _amount is the token quantity received. Critically, the _srcChainId and _srcAddress fields must be decoded and correlated with the source-chain transaction to build a complete audit trail. For OFTAdapter deployments, the pattern differs: the adapter contract emits a standard Transfer event from the token pool to the recipient, but the cross-chain origin is recorded in a separate ReceiveFromChain event on the adapter. Teams must index both event signatures and join them to reconstruct the full message lifecycle.

Operational risk is concentrated in the gap between standard ERC-20 indexing assumptions and OFT-specific event logic. A wallet or exchange that deploys a generic ERC-20 deposit monitor will silently fail to credit OFT transfers. Chainscore Labs provides OFT integration review and inbound-detection testing to validate that indexing pipelines correctly handle ReceiveFromChain events, decode _srcChainId and _srcAddress fields, and reconcile adapter-specific event patterns before user funds are at risk.

INTEGRATION IMPACT BY ACTOR

Affected Systems and Teams

Exchange Integration Impact

Exchanges must replace standard ERC-20 Transfer event monitoring with OFT-specific detection logic. Inbound PacketReceived events, not Transfer events, signal a user credit on the destination chain.

Required Actions:

  • Update indexing pipelines to listen for PacketReceived on destination chain OFT contracts.
  • Decode the _payload to extract the recipient address and token amount.
  • Implement reconciliation checks to ensure credited amounts match the source chain's PacketSent event.
  • For outbound withdrawals, integrate sendFrom with accurate _lzSend parameters, including destination gas estimation.

Risk: Crediting users based on Transfer events from the OFT contract will result in missed deposits and significant reconciliation failures.

implementation-impact
SECURE OMNICHAIN SEND PATTERNS

Outbound Transfer Initiation and Gas Management

Practical patterns for exchanges, custodians, and wallets to securely initiate outbound OFT transfers on behalf of users, including gas estimation, fee collection, and failure recovery.

03

Fee Collection and Accounting Models

Exchanges and wallets must decide whether to collect destination gas fees from users in the source-chain native token, a stablecoin, or the OFT itself. The msg.value attached to sendFrom must cover the quoted native fee exactly. Common patterns include: collecting an estimated fee plus a buffer and refunding the excess, or using a fixed-fee model with periodic rebalancing. Incorrect fee collection leads to underfunded messages that will not execute on the destination chain, requiring manual intervention or a costly rescue transaction.

05

Stuck Message Recovery Procedures

Outbound transfers can become stuck on the destination chain if the supplied gas is insufficient, the receiving contract reverts, or the executor fails to deliver. Integrators must build monitoring on PacketDelivered and PacketReceived events to detect undelivered messages. Recovery options include: re-submitting the message with higher gas via a custom executor, or implementing an application-level retry mechanism. Without a documented recovery path, user funds can remain in limbo indefinitely, creating a significant support burden and potential liability.

WALLET AND EXCHANGE OFT INTEGRATION

Integration Risk Matrix

Risk assessment for centralized exchanges, custodians, and wallet providers integrating Omnichain Fungible Tokens that deviate from standard ERC-20 transfer patterns.

AreaWhat changesWho is affectedAction

Inbound Detection

OFT transfers emit PacketReceived events on the destination, not standard ERC-20 Transfer events from a token contract

Exchange deposit monitors, custodians, wallet indexers

Implement PacketReceived event listeners indexed by the destination address to credit inbound OFT transfers

Outbound Initiation

Initiating a send from a user's address requires calling sendFrom on the OFT contract, not a standard transfer to a bridge address

Exchange withdrawal engines, wallet transaction builders

Integrate sendFrom with correct destination chain ID, recipient address, and adapter parameters for each supported path

Token Balance Logic

OFTs using the mint-and-burn model alter total supply across chains; the token contract on each chain may not hold a locked balance

Accounting systems, treasury management, proof-of-reserves

Verify whether the OFT uses lock-and-mint or burn-and-mint and adjust balance reconciliation logic accordingly

Gas Payment

Outbound OFT sends require payment of a native gas token on the source chain to cover message verification and execution on the destination

Transaction fee estimators, wallet UX

Quote and display the total LayerZero fee alongside the transfer amount before user confirmation to prevent stuck transactions

Chain Path Validation

Not all chain pairs have a configured OFT path; sending to an unsupported chain can result in a permanent loss of funds

Exchange listing teams, wallet multi-chain support

Query the OFT contract's peer address for each destination chain before enabling withdrawals to that chain

Adapter Contract Risk

OFTAdapter.sol wraps an existing token and holds a locked supply; a misconfigured adapter can break the peg or allow double-spending

Token issuers, exchange risk teams

Audit the adapter's supply cap and ownership configuration to ensure the locked supply matches the circulating supply on remote chains

Event Indexing Race

PacketReceived events may be indexed by a relayer before the corresponding token balance is reflected in view functions

Data teams, analytics providers

Build a small confirmation delay or use a message lifecycle tracker that correlates PacketSent and PacketReceived before crediting

Contract Upgradeability

OFT contracts may be proxy-based; an upgrade can alter the token's cross-chain behavior or add unexpected fee logic

Security engineers, integration maintainers

Monitor the OFT contract's proxy admin and implementation changes as part of ongoing integration risk assessment

OFT INBOUND DETECTION AND OUTBOUND INITIATION

Integration Rollout Checklist

A phased checklist for exchanges, custodians, and wallet providers integrating Omnichain Fungible Token (OFT) support. This guide focuses on the two critical deviations from standard ERC-20 integration: correctly detecting inbound OFT transfers that do not emit standard `Transfer` events, and securely constructing outbound omnichain transactions on behalf of users.

What to check: Your deposit monitoring service must listen for the PacketReceived event on the destination chain's Endpoint contract, not just the Transfer event on the OFT contract. The Transfer event is only emitted if the internal _credit function is called, which may not happen if the token uses a custom _lzReceive override.

Why it matters: A standard ERC-20 deposit scanner will miss inbound OFT transfers, leading to user funds not being credited and a significant support burden. The canonical signal of a cross-chain delivery is the successful execution of lzReceive on the OApp.

Readiness signal: Your indexing pipeline successfully parses PacketReceived events, decodes the payload to extract the recipient address and amount, and correlates this with a successful lzReceive execution on your OFT contract. Test this explicitly on testnet with a token that uses a non-standard _lzReceive override.

Chains We Build On

Looking to build on a specific blockchain?

We build smart contracts, DeFi applications, wallets, tokenization platforms, and blockchain infrastructure across the major ecosystems teams choose today. That includes Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana, Sui, Aptos, Hedera, Stellar, and NEAR, with support for additional EVM and non-EVM networks based on your product requirements.

EVM ecosystems

  • Ethereum logo
    Ethereum
  • Arbitrum logo
    Arbitrum
  • Optimism logo
    Optimism
  • Polygon logo
    Polygon
  • Avalanche logo
    Avalanche
  • Cronos logo
    Cronos

Non-EVM ecosystems

  • Solana logo
    Solana
  • Sui logo
    Sui
  • Aptos logo
    Aptos
  • Hedera logo
    Hedera
  • Stellar logo
    Stellar
  • NEAR logo
    NEAR

Additional ecosystems

  • Polkadot logo
    Polkadot
  • Cosmos logo
    Cosmos
  • TON logo
    TON
  • Cardano logo
    Cardano
  • Algorand logo
    Algorand
  • Tempo logo
    Tempo

Also available for Base, appchains, custom EVM networks, and cross-chain product architecture.

OFT INTEGRATION FAQ

Frequently Asked Questions

Common questions from exchanges, custodians, and wallet providers integrating Omnichain Fungible Tokens, covering inbound detection, outbound initiation, and operational edge cases.

The standard Transfer(address from, address to, uint256 value) event is emitted on the destination chain, but its parameters can be misleading for integration purposes.

  • The from address is often the OFT contract itself or address(0), not the sending wallet on the source chain. This is because the OFT contract mints tokens to the recipient on the destination chain.
  • The to address is the final recipient, which is correct, but this event alone provides no context about the source chain, the sender on the source chain, or the LayerZero message path used.

Correct Detection Method: You must listen for the PacketReceived event from the LayerZero Endpoint contract, filtered for the specific OFT contract's address. This event contains the srcEid (source chain identifier) and a nonce. You then need to decode the message payload to extract the original sender's address and the amount. Alternatively, many OFT implementations emit a custom ReceiveFromChain event that bundles this information. Teams should verify the specific event signature of the deployed OFT contract they are integrating.

Trusted by Industry Leaders

Delivering blockchain solutions for 5+ years.

We have partnered with 50+ leading DeFi protocols, NFT ecosystems, and fintech innovators to build secure, scalable, and capital-efficient blockchain products.

Selected Partners & Clients

ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
I've been working with Chainscore Labs for last 3+ years, they've consistently delivered with strong ownership across multiple projects. The team is reliable and detail-oriented.
L
Lee Erswell
CEO, Telos Foundation
how to get started

How to get started?

If you're looking for blockchain integration, ChainScore Labs has 5+ years of experience helping teams build and integrate exchanges, wallets, smart contracts, tokenization solutions, and protocol-connected products, we can help you choose the right path, integrate securely, and get to production faster. Our team consists of experienced blockchain developers and architects who can help you with your blockchain integration needs.

01

Exploration & Strategy

Define your product goals and choose the right blockchain architecture for your use case.

02

Architecture & Design

Design the smart contracts, tokenomics, and security parameters of your system.

03

Development & Integration

Build and integrate with wallets, oracles, and front-end dApps for a seamless experience.

04

Security & Launch

Comprehensive audits followed by a risk-managed mainnet deployment to protect your users.

Start a build

Need a blockchain engineering team?

Send the project context and we will respond with next steps, scope questions, and a practical path to delivery.