> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LayerZero (layerzero)

> Omnichain interoperability protocol enabling cross-chain messaging. Powers OFT tokens and arbitrary message passing.

Omnichain interoperability protocol enabling cross-chain messaging. Powers OFT tokens and arbitrary message passing.

| Fact | Value |
| - | - |
| Category | Cross-chain messaging |
| Family | none |
| Namespace | `Layerzero` on ethereum, optimism, bsc, polygon, zksync, arc, base, arbitrum, avalanche, linea, scroll |
| Chains | ethereum, optimism, bsc, polygon, zksync, arc, base, arbitrum, avalanche, linea, scroll |

## Notes

* This is a messaging protocol, not a direct token bridge. Token bridging is done via OFT (Omnichain Fungible Token) contracts built on top of LayerZero
* Uses endpoint IDs (dstEid) for chain identification, NOT EVM chain IDs
* The endpoint address is the same on most chains; zkSync's and Arc's differ
* Use `quote` to estimate fees before sending
* Finality: depends on DVN (Decentralized Verifier Network) configuration, typically 1-5 minutes
* Powers Stargate V2, OFT tokens, and many cross-chain dApps
* On Arc (5042, eid 30417) the messaging fee `msg.value` is native USDC at 18 decimals, from the same balance as the USDC ERC-20 `0x3600…0000`

## Its names in a program

On Ethereum, `Layerzero` is a namespace: its contracts need no import.

```ts theme={null}
function main() {
  // Ethereum's endpointV2, `0x1a44076050125825900e736c501f859c50fE728c`.
  require(Layerzero.EndpointV2 != 0);
}
```

## Deployments

| Chain | Contract | Address | In a program |
| - | - | - | - |
| [Ethereum](https://docs.eco.com/sauce-sdk/reference/chains/ethereum.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |
| [Optimism](https://docs.eco.com/sauce-sdk/reference/chains/optimism.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |
| [BNB Chain](https://docs.eco.com/sauce-sdk/reference/chains/bsc.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |
| [Polygon](https://docs.eco.com/sauce-sdk/reference/chains/polygon.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |
| [zkSync Era](https://docs.eco.com/sauce-sdk/reference/chains/zksync.md) | endpointV2 | `0xd07C30aF3Ff30D96BDc9c6044958230Eb797DDBF` | `Layerzero.EndpointV2` |
| [Arc](https://docs.eco.com/sauce-sdk/reference/chains/arc.md) | endpointV2 | `0x6F475642a6e85809B1c36Fa62763669b1b48DD5B` | `Layerzero.EndpointV2` |
| [Base](https://docs.eco.com/sauce-sdk/reference/chains/base.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |
| [Arbitrum One](https://docs.eco.com/sauce-sdk/reference/chains/arbitrum.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |
| [Avalanche C-Chain](https://docs.eco.com/sauce-sdk/reference/chains/avalanche.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |
| [Linea](https://docs.eco.com/sauce-sdk/reference/chains/linea.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |
| [Scroll](https://docs.eco.com/sauce-sdk/reference/chains/scroll.md) | endpointV2 | `0x1a44076050125825900e736c501f859c50fE728c` | `Layerzero.EndpointV2` |

## ABI

### `LayerZeroEndpointV2ABI`

`import LayerZeroEndpointV2ABI from "./protocols/layerzero/LayerZeroEndpointV2ABI.json";` Speaks for: endpointV2.

* `send((uint32 dstEid, bytes32 receiver, bytes message, bytes options, bool payInLzToken) _params, address _refundAddress) payable returns ((bytes32 guid, uint64 nonce, (uint256 nativeFee, uint256 lzTokenFee) fee) receipt)`
* `quote((uint32 dstEid, bytes32 receiver, bytes message, bytes options, bool payInLzToken) _params, address _sender) view returns ((uint256 nativeFee, uint256 lzTokenFee) fee)`

## Next steps

* [Protocols](https://docs.eco.com/sauce-sdk/reference/protocols.md): the other protocols, by what they do.
* [Protocols and tokens](https://docs.eco.com/sauce/names.md): calling a contract by its namespace, or through its ABI.
* [Glossary](https://docs.eco.com/sauce/glossary.md): the words these pages use, in plain terms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.