TON Payment Network (Layer 2)

TON Payment Network (Layer 2)

TON Core

What is it?

TON Payment Network is a decentralized network on top of the TON blockchain that enables lightning-fast payments between network participants.

Security is provided by TON blockchain smart contracts without creating transactions on the blockchain for individual payments. Thus, there is no need to worry about block confirmation times: payment speeds are measured in milliseconds to seconds.

By transacting and settling off-blockchain, the Payment Network allows for exceptionally low fees, which allows for emerging use cases such as instant micropayments.

In addition to transfers in the Payment Network, assets can be exchanged via the “Atomic Swaps” technology.

The project and description of TON Payment Network (or TON Payments for short) was formulated and published in the original TON Whitepaper.

The closest analog to the TON Payment Network is the Bitcoin Lightning Network.

The payment network does not support arbitrary smart contracts, it is designed only for transfers, payments or simple exchanges between participants. For Layer 2 solutions where arbitrary smart contracts need to be executed, there is another technology — TON/TVM Sidechains.

In this way, the Payment Network gets accelerated and cheapened by reducing network functionality, but retaining scalability and decentralization.

How does it work?

  • A user connects a wallet once to a node or multiple nodes in the Payment Network.
  • The user makes a deposit of their funds (Toncoin, Jettons, Extra-currencies) from the TON Blockchain to the Payment Network.
  • The user can then make as many instant transactions with microcommissions with Payment Network participants as they want.
  • The user can transfer assets to other users in the Payment Network, even if they are connected to other nodes.
  • The user can withdraw their funds or a portion of their funds back into the TON Blockchain at any time, or vice versa to replenish their balance in the Payment Network.
  • Traffic within the Payment Network is protected by garlic routing encryption.
  • Intermediate nodes in the Payment Network receive a small micro-commission for each transaction processed.

Application

  • Wallets could support the Payment Network in their UIs and allow funds to be transferred through the Payment Network along with blockchain transfers.
  • Services and centralized exchanges could also support a Payment Network to accept payments and deposits.
  • The technology behind TON Payments can be applied in a lot of different spheres:
    The TON Core team held a hackathon among the TON community on the best application of this technology, which gathered very fresh and interesting ideas: participants proposed to make payment for views and likes in a social networks, payments for video streaming, to apply the technology in games, to make micropayments for API requests and many other ideas.
  • Similar solutions have already proven successful on social networks (Twitter used Bitcoin Lightning Network for Tips) and even at the state level (El Salvador, where Bitcoin has been adopted as the national currency via Bitcoin Lightning Network).
  • TON Proxy technology can already use the Payment Network for micropayments for traffic. TON Proxy allows to protect both TON validators and TON Sites and their users.
  • TON Storage and TON Torrents technology also can already use the Payment Network for micropayments for downloaded traffic.

Technology

The basic component of the network is a Payment Channel - a smart contract and network channel established between two participants, allowing them to make as many fast payments with micro-commissions as they want. Only the creation or closing of a payment channel requires a transaction on the blockchain.

Payment channel was developed and presented by the TON Core team.

A payment network consists of interconnected payment channels.

Users connect (establish a payment channel) with one or more intermediate payment nodes. Users can then conduct payments among themselves through one or more intermediate nodes, without users having to establish channels with each other.

The payment network in beta was introduced by the TON Core team in 2024.

Please refer to the documentation for more technical details.

Plans

At the moment we have a beta version of the Payment Network technology, with fully working smart contracts, intermediate payment node, networking (including garlic routing) and functionality for transfers, deposits and withdrawals of Toncoin, Extra-currencies, Jettons.

TON Core plans to take the following steps to get the technology up and running:

  • Test, audit and finalize smart contracts.
  • Launch the first production intermediate nodes.
  • Provide documentation, examples and tools so that interested products in the TON ecosystem can integrate the Payment Network.
  • After testing, finalize the technology so that anyone can launch intermediate nodes.
  • Add assets exchange functionality to the Payment Network via Atomic Swaps.

We plan to do these steps in the first half of 2025, with the exception of Swaps requiring additional research.

References

Whitepaper — https://docs.ton.org/ton.pdf (5. TON Payments)

About Payment Channels — https://telegra.ph/TON-Payments-07-01

Payment Channgels usage hackaton results — https://t.me/toncontests/45

Payment Network Documentation — https://github.com/xssnick/ton-payment-network?tab=readme-ov-file#ton-payment-network

Payment Network Node code (Golang) — https://github.com/xssnick/ton-payment-network

Actual Smart Contracts (Beta) — https://github.com/xssnick/payment-channel-contract

Report Page