platform

Deep Dive: Wormhole Native Token Transfers (NTT)

Aug 01, 2024

·

8 min read

https://images.ctfassets.net/n8aw1cra6v98/1RUzaslqmsYnkf46fqqUDT/cd81c983004a60908b20a44675e68c43/deep-dive-ntt.png

Wormhole’s Native Token Transfers (NTT) framework is a flexible and composable, fully open-source solution for transferring tokens across blockchains. This innovative open framework gives integrators full control over their tokens' behavior on each chain, including the token standard, metadata, ownership, upgradeability, and custom features, all while maintaining a unified supply.

Make sure to check the NTT documentation.

Key Features of NTT

Before diving into the details, here's a quick summary of what makes the Wormhole NTT framework stand out:

Unified User Experience

The NTT framework ensures that tokens retain their properties on each chain, remaining completely fungible and providing a consistent user experience across all blockchains.

No Liquidity Pools Required

With NTT, tokens can be transferred without the need for liquidity pools, avoiding associated fees, slippage, and MEV risks.

Integrator Flexibility

The NTT framework allows integrators to retain ownership, upgrade authority, and have complete customizability over token contracts, providing a high degree of flexibility.

Advanced Rate Limiting

NTT offers configurable rate limits for inbound and outbound transfers on a per-chain basis and over arbitrary time periods. This feature helps prevent abuse, manage network congestion, and allows for controlled deployments to new chains.

Global Accountant

The Global Accountant feature ensures accounting integrity across chains by verifying that the number of tokens burned and transferred out of a chain never exceeds the number of tokens minted. This mechanism is essential for maintaining the overall token supply balance.

Access Control

Protocols can assign certain administrative functions, such as the pauser role, to a separate address from the owner to prevent unauthorized calls. This feature enhances security by allowing a quick response to potential risks without a prolonged governance process.

Maximum Composability

The open-source and extensible nature of NTT promotes widespread adoption and integration with other protocols, enabling a high level of composability.

Industry-leading Security

Built on top of Wormhole’s battle-tested interoperability infrastructure, NTT is ultimately secured by the Guardian Network, which consists of 19 highly reputable validator companies that verify the validity of cross-chain messages.

Custom Attestations

NTT allows for the addition of external verifiers and configuration of custom message attestation thresholds, further enhancing security and flexibility.

NTT vs. Bridges

Token Bridging vs. Native Token Transfers

Wormhole is a comprehensive interoperability platform that features a cross-chain messaging protocol. This protocol enables the creation of bridging applications that allow assets to flow across the chains connected to the Wormhole ecosystem and powers multichain token frameworks like NTT.

NTT represents a significant evolution in multichain token functionality, offering distinct advantages over token bridge integrations.

Token Bridge

  • Mechanism: Utilizes a lock and mint model.
  • Security: Preconfigured rate limiting and integrated Global Accountant.
  • Contract Ownership: Contracts are upgradeable via Wormhole Governance.
  • Integration: Straightforward and permissionless method for deploying on multiple chains.

Native Token Transfers

  • Mechanism: Can utilize a burn and mint mechanism or a hub and spoke model.
  • Security: Fully configurable rate limiting, pausing, access control, and threshold attestations.
  • Contract Ownership: Integrators retain ownership and upgrade authority of token contracts on each chain.
  • Integration: Streamlined, customizable framework for sophisticated and bespoke deployments.

NTT's enhanced flexibility and integrator control make it an optimal choice for protocols seeking sophisticated, customizable multichain deployments.

Core Components of NTT

There are two basic components to the NTT framework:

Managers

Managers handle rate limiting, message attestation, and handle the token and transceivers. Each NttManager corresponds to a single token but can control multiple transceivers. Key functions include:

  • transfer: Initiates the token transfer process.
  • quoteDeliveryPrice: Quotes the fee for delivering a message to a specific target chain.
  • registerPeer: Establishes trust between NTT manager contracts across chains.
Transceivers

Transceivers are responsible for facilitating NTT transfers, encoding, sending, receiving, and decoding messages across chains. They can be defined independently of the Wormhole core and support any verification mechanism on the backend. Key functions include:

  • sendMessage: Sends messages to a specified recipient chain.
  • quoteDeliveryPrice: Provides an estimation of the cost associated with delivering a message to a target chain.

ntt-diagram

EVM Message Lifecycle

In more detail, the EVM message lifecycle looks as follows:

  • Transfer: Initiate an NTT transfer specifying the amount, recipient chain, and recipient address.
  • Rate Limit: Transfers can be rate-limited on the source and destination chains.
  • Send: The NttManager forwards the message to the Transceiver.
  • Receive: The message is transmitted to the corresponding Transceiver on the recipient chain.
  • Mint or Unlock: Tokens are minted or unlocked on the destination chain.

The events emitted during the lifecycle are:

  • TransferSent: Emitted when a message is sent from the NttManager.
  • OutboundTransferQueued: Emitted when an outbound transfer is queued.
  • OutboundTransferRateLimited: Emitted when an outbound transfer is rate-limited.
  • InboundTransferQueued: Emitted when an inbound transfer is queued.
  • SendTransceiverMessage: Emitted when a message is sent from the Transceiver.
  • ReceivedRelayedMessage: Emitted when a relayed message is received.
  • ReceivedMessage: Emitted when a message is received.
  • MessageAlreadyExecuted: Emitted when a message has already been executed.
NTT Security

NTT offers full customization across its security stack. This flexibility extends to cross-chain supply management, where NTT supports both a burn-and-mint mechanism and a hub-and-spoke model.

Hub and Spoke

In the hub and spoke model, tokens are locked on a central hub chain and minted on destination spoke chains. This model maintains the total supply on the hub chain and is backward-compatible with any existing token deployment.

Burn and Mint

The burn and mint model involves burning tokens on the source chain and minting them on the destination chain. This model is suited for new token deployments or projects willing to upgrade existing contracts.

Aside from modifiable supply management mechanics, the NTT framework also allows configurable per-chain rate limits for sending and receiving token transfers. Integrators can manage these limits through their own governance processes. Transfers that exceed rate limits can be queued and released after the set rate limit duration has expired.

Sending and Receiving Queues
  • Sending: Outbound transfers that exceed rate limits can be queued.
  • Receiving: Inbound transfers that exceed rate limits are added to a queue.

To mitigate issues where frequent transfers could exhaust capacity, outbound transfers can cancel inbound rate limits on the source chain, and vice versa, refilling the respective limits.

Additionally, Wormhole’s NTT framework provides access control features and distinct roles:

  • Owner: Has full control over NTT contracts and can perform administrative functions, including un-pausing contracts.
  • Pauser: Can pause NTT contracts to halt token transfers temporarily but cannot un-pause them.

Separating the Owner and Pauser roles allows protocols to react swiftly to potential risks, bypassing time-consuming processes in emergencies.

Finally, the Global Accountant is a defense-in-depth security feature that performs integrity checks on every token transfer, ensuring that there cannot be more tokens burned and transferred out of a chain than were ever minted. It is enforced by the Wormhole Guardians who will not attest to a transfer if it violates checks.

Integrating with NTT

Wormhole's Native Token Transfers (NTT) framework offers a comprehensive and flexible solution for transferring tokens across blockchains. With features like advanced rate limiting, Global Accountant, and customizable transceivers, NTT provides integrators with the tools needed to ensure secure, efficient, and flexible token transfers.

Whether using the hub and spoke model or the burn and mint model, NTT supports a wide range of token deployment scenarios, making it a market-leading choice for multichain token management.

Integrators should implement governance mechanisms to manage the addition and removal of transceivers and to upgrade contracts using proxy patterns. Governance processes can be submitted directly to the corresponding contract on-chain to ensure security and adaptability.

NTT supports custom message verification in addition to Wormhole Guardian message verification. Custom verifiers can be protocol-specific or provided by other third-party attesters, allowing for enhanced security and transaction integrity.

Putting the pieces together, a customized NTT integration could look like this:

ntt-custom-diagram

For more details, make sure to check the newly released NTT documentation.


About Wormhole

Wormhole is the leading interoperability platform that powers multichain applications and bridges at scale. Wormhole provides developers access to liquidity and users on over 30 of the leading blockchain networks, enabling use cases that span DeFi, NFTs, governance, and more.

The wider Wormhole network is trusted and used by teams like Circle and Uniswap. To date, the platform has facilitated the transfer of over 40 billion dollars through over 1 billion cross-chain messages. To learn more about Wormhole, follow on Twitter, join the Discord, or read the blog.