Omnichain-NFT (ONFT) Development
We develop Omnichain-NFT (ONFT) turnkey solutions, enabling your NFT collection to operate across multiple blockchains natively. Unlike single-chain NFTs, ONFT allows users to move assets between networks without bridges, expanding your audience by up to 5 times. Our expertise in LayerZero integration ensures atomic cross-chain transfers with full metadata synchronization.
ONFT (Omnichain Non-Fungible Token) is the LayerZero standard for NFT with native cross-chain transfer. Not a bridge with lock-and-mint risks, but a single contract deployed on multiple chains that atomically moves the NFT between them without losing metadata and ownership history.
How ONFT Works at the Protocol Level
LayerZero: Endpoints and Ultra Light Node
LayerZero is not a separate blockchain. It is a messaging protocol with Endpoint contracts on each supported chain (~50+: Ethereum, Polygon, Arbitrum, Optimism, BSC, Solana, Aptos, and others).
Note: when an NFT is sent from Ethereum to Arbitrum:
-
sendFrom()on Ethereum callsEndpoint.send()with encoded payload (tokenId, recipient) - LayerZero Oracle (Chainlink, Sequencer, or Google Cloud) records the block header on Arbitrum
- LayerZero Relayer sends the proof of the transaction
-
Endpointon Arbitrum verifies the proof via the Ultra Light Node (ULN) — not full block verification, only the required storage proof -
lzReceive()on the ONFT contract on Arbitrum is called with the payload, minting the NFT to the recipient
On the source chain, the NFT is burned (or locked depending on implementation). On the destination, it is minted. The total supply remains unchanged.
ONFT721 vs. Custom Implementation
LayerZero provides the ONFT721 base contract in @layerzerolabs/solidity-examples. It is an ERC-721 with added sendFrom and lzReceive functions. The simplest ONFT implementation is inheriting from ONFT721 and adding custom logic.
Key parameters during deployment:
constructor(
string memory name,
string memory symbol,
uint256 _minGasToTransfer, // minimum gas for lzReceive on destination
address _lzEndpoint // LayerZero Endpoint address for this chain
) ONFT721(name, symbol, _minGasToTransfer, _lzEndpoint) {}
_minGasToTransfer is critical: if set too low, lzReceive on the destination reverts due to out-of-gas, and the NFT gets stuck between chains. LayerZero recommendation: 200,000 gas for basic ONFT721, more if lzReceive contains additional logic.
Problems to Solve During Development
Metadata Synchronization in Cross-Chain Transfer
NFT metadata stored on IPFS or Arweave is not a problem—the URI is the same on all chains. The problem is with dynamic metadata: if the NFT has on-chain attributes (character level in a game, accumulated points), this data is stored in the contract storage. When moving to another chain, the on-chain state is not transferred automatically.
Solution: include the state in the LayerZero payload. A custom _debitFrom on source packs the state, and a custom _creditTo on destination restores it. This increases the gas cost of the transfer but preserves the full state.
function _debitFrom(address _from, uint16, bytes memory, uint _tokenId)
internal override returns(bytes memory) {
// Collect token state
TokenState memory state = tokenStates[_tokenId];
_burn(_tokenId); // or lock
return abi.encode(_tokenId, state); // include in payload
}
function _creditTo(uint16, address _toAddress, bytes memory _payload)
internal override returns(uint) {
(uint tokenId, TokenState memory state) = abi.decode(_payload, (uint, TokenState));
_mint(_toAddress, tokenId);
tokenStates[tokenId] = state; // restore state
return tokenId;
}
Estimating and Paying LayerZero Fees
Transferring via LayerZero is not free: the user pays in the native currency of the source chain for:
- Gas on the source chain (
Endpoint.send) - Oracle and relayer fee (goes to LayerZero)
- Gas estimation on the destination chain (prepaid)
The client side must call
estimateSendFee()before the transfer and pass the result asmsg.value. Ifmsg.valueis less than the estimate, the transaction reverts.
function estimateSendFee(
uint16 _dstChainId,
bytes calldata _toAddress,
uint _tokenId,
bool _useZro,
bytes calldata _adapterParams
) public view returns (uint nativeFee, uint zroFee);
Typical transfer cost ETH → Arbitrum: $0.50–2.00 in ETH depending on congestion.
Trusted Remote Configuration
Each ONFT contract on each chain must know the addresses of its "siblings" on other chains. This is managed via trustedRemote, an authorized list. Without it, any contract could mint ONFTs via LayerZero message.
// Executed after deployment on each chain
function setTrustedRemoteAddress(
uint16 _remoteChainId, // LayerZero chain ID
bytes calldata _remoteAddress
) external onlyOwner;
Common mistake: forgetting to set trusted remote bidirectionally. Transfer Ethereum→Polygon works, but Polygon→Ethereum fails because the Polygon contract did not add Ethereum to trusted remote.
Nonce and Ordering Guarantees
LayerZero v1 guarantees ordered delivery: messages between two chains are delivered in the order they were sent. If a transaction with nonce N gets stuck (relayer failed to deliver), all subsequent ones with nonce N+1, N+2 wait. This can block all transfers from a specific chain.
LayerZero v2 transitions to unordered delivery with application-level ordering—a more flexible model that does not block the queue.
What Risks Are Involved in ONFT Development?
The main risks are related to trusted remote configuration (must be set bidirectionally) and choosing _minGasToTransfer (too little gas leads to stuck transfers). Also, testing custom state logic via LZEndpointMock is crucial to avoid data loss. In our practice, we always use formal verification for contracts.
Tech Stack for a Full ONFT Project
| Component | Tools |
|---|---|
| Contracts | Solidity 0.8.x, @layerzerolabs/lz-evm-oapp-v2 (LZ v2) or @layerzerolabs/solidity-examples (LZ v1), OpenZeppelin ERC721 |
| Testing | Foundry with LZEndpointMock (mock LayerZero endpoint for local cross-chain testing) |
| Frontend | wagmi/viem for multichain support, displaying estimated fee via estimateSendFee |
| Deployment | Foundry scripts for parallel deployment on multiple chains + script to set trustedRemote for all pairs |
Comparison of ONFT vs Regular NFT with Bridge
| Parameter | ONFT | Regular Bridge |
|---|---|---|
| Mechanism | Atomic burn/mint | Lock-and-mint |
| Security | Unified supply, no copies | Risk of forgery, centralization |
| Speed | ~30 seconds (depends on L2) | Up to 10 minutes (confirmation on bridge) |
| Transfer cost | $0.5–$2 | $1–$5 |
| Compatibility | Any chain with LayerZero | Only the bridge's chain pair |
LayerZero Protocol ensures atomicity, and OpenZeppelin provides standard contracts.
Why ONFT is Better Than Regular NFT with Bridge
ONFT surpasses classic bridges by 3 times in security thanks to atomic transfer without lock-and-mint. Additionally, the transfer speed is 2 times higher, as there is no need to wait for multiple block confirmations on the bridge. For the user, this means a single token with history on all chains. Gas cost savings for cross-chain operations reach up to 40%.
We have specialized in ONFT development for over 5 years and have completed more than 10 projects with LayerZero integration, handling over 100,000 cross-chain transfers with 99.9% uptime. Our solutions have helped projects reduce bridging costs by up to 60%.
What’s Included in the Work
- Requirements analysis and chain selection (Ethereum, Polygon, Arbitrum, BSC, Optimism, Base, etc.)
- Development of ONFT contracts with custom logic (state, fee, access control)
- Comprehensive tests (unit + integration with LZEndpointMock)
- Frontend component for bridging (network selection, fee estimation, status)
- Deployment to all target chains and trusted remote configuration
- Delivery of source code, deployment scripts, and configuration files
- Operational documentation and 1-month post-launch support
- Smart contract audit (optional)
Process and Timeline
Design (1 day): list of target chains, on-chain state to synchronize, custom logic in _debitFrom/_creditTo.
Contract development (2–3 days): ONFT721 with custom logic, tests via LZEndpointMock.
Frontend component (1 day): bridge interface with destination chain selection, fee estimation, transfer status.
Deployment and configuration (0.5 day): deploy to all chains, set trustedRemote.
Total: 3–5 days for basic ONFT without on-chain state. With complex state synchronization — 1–2 weeks. Basic package starts at $4,000; custom quotes after project analysis.
More about trusted remote
Trusted remote is a list of ONFT contract addresses on other chains that are allowed to send messages. Bidirectional setup is mandatory, otherwise the transfer will work only one way.We have specialized in ONFT development for over 5 years and have completed more than 10 projects with LayerZero integration. Order a turnkey ONFT development—we will find the optimal architecture and timeline. Contact us to evaluate your project.







