V1.1 OFT vs V1.2 OFT - Which should I use?
This page explains the differences between the Endpoint V1 OFT V1.1, Endpoint V1 OFT V1.2, and Endpoint V2 OFT implementations and when to use each one.
OFTV1.2 is NOT the LayerZero V2 OFT Standard, but rather a second version of OFT built on Endpoint V1.
We recommend new developers use the LayerZero V2 OFT Standard over both the Endpoint V1 OFT V1.1 and Endpoint V1 OFT V1.2 implementations, as the protocol update comes with improved interfaces, gas optimizations, and greater composability.
When to use LayerZero V2 OFT
With the release of LayerZero V2, you should consider only using this V2 OFT Standard for your deployments. LayerZero V2 offers developers a smoother developer experience and optimizations to core protocol contracts.
Read the full LayerZero V2 Overview to learn more.
When to use LayerZero V1 OFT V1.2
What if you want to build an Omnichain Fungible Token that supports EVMs and non EVMs (eg. Aptos)? In this case you should use our Endpoint V1 OFT V2 which supports both. This version has fees, shared decimals, and composability built in. This Endpoint V1 version of OFT is currently being used in projects such as BTCb.
When to use LayerZero V1 OFT V1.1
The LayerZero V1 OFT V1 was our first implementation of the standard. This OFT was first used in projects such as Stargate's token. The standard was written to support EVM chains only. If you are looking to only support EVMs now and forever then OFT V1 is for you.
What are the differences between these versions?
The main difference between the LayerZero V1 OFT V1.1 and the LayerZero V1 OFT V1.2 comes from the limitations of the Non EVMs.
Non EVM chains such as Aptos/Solana use Uint64 to represent balance. To account for this, OFTV1.2 uses Shared Decimals for value transfers to normalize the data type difference.
It is recommended to use a smaller shared decimal point on all chains so that your token can have a larger balance.
For example, if the decimal point is 18, then you can not have more than approximately 18 * 10^18 tokens bounded by the uint64.max.
OFTV1.2 is intended to be used with no more than 10 shared decimals