What is LayerZero, and how does an OFT move a token between chains?

LayerZero is a protocol for passing messages between blockchains in which each application picks who verifies its messages. A contract sends a message through a LayerZero endpoint, the verifier networks the application chose confirm it on the destination chain, and once every required verifier has done so, the message can be delivered.
That choice is the whole story of a LayerZero token. An OFT, LayerZero's token standard, is exactly as safe as the verifiers and the owner behind it, and both are readable on-chain. This article explains the mechanism, then reads the live configuration of one OFT pair: the one that moves the BT365 token between Base and HyperEVM.
What is LayerZero?
LayerZero's own repository describes it as "an immutable, censorship-resistant, and permissionless messaging protocol" (LayerZero V2). Three pieces do the work:
- The endpoint. One immutable contract per chain. An application, called an OApp, sends and receives every message through it. Each endpoint has its own ID: Base's endpoint reports 30184, and HyperEVM's is 30367.
- DVNs, decentralized verifier networks. They watch the source chain and attest on the destination that a message exists. An application can "configure any number and type" of them.
- Executors, which "for a fee, abstract away destination gas and automatically deliver messages on behalf of the source sender".
The verification rule sits in LayerZero's receive library (ReceiveUlnBase.sol). Each application's configuration names a list of required DVNs, a list of optional DVNs with a threshold, and a number of confirmations, meaning how many blocks deep the source transaction must be. A message is verifiable only when every required DVN has attested with at least that many confirmations, plus the threshold of optional ones. If the application sets nothing, the library's defaults apply.
That is the main design difference from a protocol like Wormhole, where one fixed committee signs every message for every application. On LayerZero, two tokens on the same two chains can trust entirely different verifiers.
What is an OFT, and what does an OFT adapter do?
The Omnichain Fungible Token standard lets a token "be transferred across multiple blockchains without asset wrapping or middlechains" (LayerZero V2 README). A token deployed as an OFT from the start burns on the source chain and mints on the destination, so its total supply across chains stays constant.
A token that already exists cannot be redeployed. For that case LayerZero ships the OFT adapter (OFTAdapter.sol), which "adapts an ERC-20 token to the OFT functionality". On send it locks the token in the adapter; on a verified inbound message it unlocks it. The contract carries two warnings: only one adapter should exist per token's network of chains, and the default version "assumes LOSSLESS transfers", so a token that takes a fee on transfer needs a balance check.
Amounts travel in shared decimals. The OFT core converts a local amount to a wire amount by dividing by 10^(local decimals − shared decimals), so a fraction finer than the shared unit cannot be represented on the other side and is left out of the send as dust. The default shared precision is 6. A token with fewer local decimals than that cannot be deployed with the default; the constructor reverts.
How does the BT365 token cross between Base and HyperEVM?
BT365 is an ERC-20 on Base with 5 decimals and a total supply of 100,000,000, read from the token contract. It reaches HyperEVM through an OFT pair recorded in BT365's contract registry and readable on-chain:
- On Base,
BT365OFTAdapter(0x91B7D527Ad45f73C4f5635073027722DaE73A7A3) locks canonical BT365 on send and releases it on a verified inbound message. Its source states it has "NO withdraw, rescue, sweep or upgrade path": the only way tokens leave is a verified LayerZero message from the configured peer. - On HyperEVM,
BT365xOFTAdaptermints and burns BT365x, a separate token contract with the symbol BT365 and 5 decimals. BT365x lists that adapter as its only authorized bridge. - Backing. BT365 locked on Base is never less than the BT365x supply on HyperEVM. With no message in flight the two are equal, unless someone has sent BT365 straight to the adapter, which only adds to the locked side; while a transfer is being delivered, the locked balance is briefly higher.
What a read of the Base adapter returned at Base block 65,718,842:
- Peer: the HyperEVM adapter. Messages from any other contract revert.
- Libraries: send and receive libraries set explicitly, not left on the endpoint's defaults.
- Verifiers: two required DVNs,
0x9e05…ac25and0xcd37…36f6, which the deployment record names as LayerZero Labs and Nethermind. No optional DVNs, and 20 confirmations, identical for sending and receiving. - Shared decimals: 5, set to match BT365's own 5 decimals. The conversion rate is
10^(5−5) = 1, so no dust is ever removed. With the default of 6, deployment would have reverted. - Owner and endpoint delegate: both the same Safe multisig,
0x34D5…5c5F, threshold 2 of 3 signers.
In the web app, the bridge panel quotes the LayerZero fee with quoteSend, asks you to approve exactly the amount you are sending, never an unlimited allowance, and sends from your own wallet with a minimum received equal to the full amount. If the LayerZero fee or the BT365 fee has gone up between the quote and the confirmation, it stops and asks you to review the new fee.
How does a bridge rate limit work?
Each BT365 adapter runs LayerZero's RateLimiter (LayerZero devtools) once per direction. A bucket has a limit, a window, and an amount in flight that decays linearly. The rule is: decay = limit × seconds since the last send ÷ window. A send that would push the amount in flight above the limit reverts with RateLimitExceeded.
The live values on both directions of the Base adapter are a limit of 10,000,000,000 raw units, which is 100,000 BT365 at 5 decimals, over a window of 3,600 seconds. Capacity therefore comes back at 100,000 ÷ 3,600 = 27.78 BT365 per second.
A worked example
Start with an empty outbound bucket on Base.
- A sends 70,000 BT365. The amount in flight becomes 70,000, leaving 30,000 of headroom.
- B immediately tries 40,000. 70,000 + 40,000 = 110,000, above the limit. On-chain this would revert; the web panel compares the amount with the headroom and refuses before asking for a signature.
- Ten minutes later, 600 seconds have passed. Decay is 100,000 × 600 ÷ 3,600 = 16,666.67. The amount in flight is 70,000 − 16,666.67 = 53,333.33, and the headroom is 46,666.67. B's 40,000 now fits.
- Had nobody sent anything more, the bucket would have been empty again after 70,000 × 3,600 ÷ 100,000 = 2,520 seconds, which is 42 minutes.
Two details matter. A single send larger than 100,000 can never pass, however long you wait, because the bucket never holds more than its limit. And the inbound side has its own bucket: a message that arrives when the destination's inbound budget is spent reverts at delivery but, per the adapter's source, "stays retryable at the endpoint; nothing is lost and nothing is dropped". The panel uses the tighter of the two budgets.
What are the risks of a LayerZero OFT bridge?
The verifier set is the security. On the BT365 pair, the two required DVNs agreeing is what makes a message valid. Most OFT tokens publish their configuration the same way, so read it before you trust one: the required DVNs, the optional threshold and the confirmations.
The owner can move what is locked. BT365's own adapter source puts it plainly: "THE OWNER IS CUSTODY OF THE VAULT, NOT A BOUNDED OPERATOR." The owner can re-point the peer, install different verifiers through the endpoint delegate, and raise the rate limit with no cap or delay in the contract, so a raise plus one message could move everything the adapter holds. The rate limiter "bounds a compromised messaging layer, never the owner".
On the BT365 pair, two signatures are enough. The owner is a 2-of-3 Safe. A read on Base at block 65,719,047 showed no modules and no transaction guard installed, so no on-chain delay stands between two signatures and a change. Ownership cannot be renounced, and handing it to an address without code is refused.
A representation is not the original. BT365x on HyperEVM is backed by BT365 locked on Base. It is worth exactly what the Base adapter can release, so the contract address, not the symbol, tells you which token you hold.
The honest answer is sometimes "wait". If the panel shows "Up to … right now" below your amount, the bucket refills on a fixed schedule. Splitting a large amount into smaller sends does not get around the limit.
Related
- What is HyperEVM, and how is it different from HyperCore?
- Why does withdrawing from a prediction market take minutes, not seconds?
BT365 is not available in every jurisdiction, and nothing on this page is investment advice. Trading perpetual futures and prediction markets carries risk of loss.