On-Chain Basics

What Is On-Chain Trading, and When Does Binance Use the Blockchain?

A spot trade on Binance is an entry in the exchange records, so it never shows up on a block explorer. On-chain trading means each swap is a blockchain transaction you sign from your own wallet, paying gas and leaving a permanent public record.

What Is On-Chain Trading, and When Does Binance Use the Blockchain?

Say you buy some bitcoin on Binance's spot market, open your order history and go looking for proof on a block explorer, the public websites that show everything recorded on a blockchain. You won't find it. The trade happened, your balance changed, but no blockchain transaction was created. On-chain trading is the opposite case: the trade itself is a blockchain transaction, usually a token swap on a decentralized exchange (DEX) that you sign from a wallet you control, pay a network fee for, and can look up publicly forever.

Why a Binance spot trade never shows up on the blockchain

When you deposit crypto into Binance, the coins move into wallets the exchange controls, and Binance holds the private keys to those wallets. What you see as your balance is an entry in Binance's own records. When you trade with another user, nothing needs to move on a blockchain: the exchange updates two entries in its database, yours and theirs. The Binance Academy guide to DEXs describes trading on a centralized exchange as an internal database update, not an on-chain transaction.

This is why trades on Binance are fast and carry only the exchange's trading fee. Your coins sit with the exchange, and you rely on it to let you withdraw them. Coins only go back onto a blockchain when you move them out.

What makes a transaction on-chain

On-chain describes anything recorded directly on a blockchain. Once a block containing your transaction is confirmed, the record is public and, in practice, can't be changed or reversed.

Every on-chain transaction gets a transaction ID, or TxID: a long, unique string of letters and numbers. Paste it into the search box of a block explorer for that network and you'll see the sending and receiving addresses, the amount, the fee and how many confirmations it has. On Binance, the TxID appears in the details of a deposit or withdrawal in your transaction history. If a transfer seems to be missing, looking up its TxID tells you whether it was sent at all and how far along its confirmations are.

How a swap on a decentralized exchange works

A DEX is a marketplace run by a smart contract, a program stored on the blockchain that executes automatically when its conditions are met. There's no company holding your funds. You connect your own wallet, choose the two tokens you want to swap, and the contract does the rest.

On the most common type of DEX, an automated market maker, prices come from a liquidity pool: a pot of two tokens that other users have deposited, priced by a formula. As people buy one token from the pool, its quantity drops and its price rises. Before you confirm, you set a slippage tolerance, the largest gap you'll accept between the quoted price and the price you actually get. If the price moves further than that before your transaction is processed, the swap fails instead of filling at a worse rate.

Before a contract can take a token from your wallet, you have to approve it to do so, and your wallet shows that approval as its own request. Then you confirm the swap itself and pay the network fee. In a single transaction the contract checks your balance, works out the rate, takes your tokens and sends the new ones to your wallet. Either all of it happens or none of it does.

What gas pays for and where it goes

On Ethereum and similar networks, the network fee is called gas, and you pay it in the network's own coin: ETH on Ethereum, BNB on BNB Smart Chain. If your wallet holds tokens but none of that coin, you can't swap.

On Ethereum the fee has two parts, as ethereum.org explains. The base fee is set by the network and burned, meaning it's removed from circulation and paid to no one. The priority fee is a tip you add on top, and that goes to the validator who includes your transaction in a block. Fees climb when the network is busy, and complex transactions such as swaps use more gas than a simple transfer.

Gas isn't the only cost of a DEX trade. Liquidity providers, the users who deposit tokens into a pool, earn a share of the trading fees from swaps, so each swap also carries a fee that goes to the pool.

On-chain trading vs trading on Binance

On-chain trade (DEX) Spot trade on Binance
Where your funds sit In your own wallet; only you hold the keys In wallets Binance controls; your balance is an entry in its records
How the trade settles A blockchain transaction run by a smart contract An update to Binance's internal database
What you pay Gas in the network's coin, plus the pool's swap fee Binance's trading fee
Public record Yes, searchable by TxID No blockchain transaction per trade
If something goes wrong No one can reverse a confirmed transaction You can contact Binance support, though a completed withdrawal can't be reversed either
Account needed No sign-up or identity check A verified Binance account

Self-custody means no exchange can fail, freeze withdrawals or get hacked with your money in it. It also means no one can reverse your mistakes, and you need to understand gas, approvals and slippage before you start.

Which Binance actions do go on-chain

Deposits and withdrawals are the main ones. When you deposit crypto from another wallet or exchange, the sender makes a blockchain transaction to your Binance deposit address, and the network you pick must match on both sides (checking the network and memo before you send). A withdrawal to an outside address is also on-chain and carries a network fee. On the withdrawal page you choose whether that fee is added on top or deducted from the amount you send, and a wrong address or network means your assets "will be permanently lost."

Sending crypto to another Binance user is different. If the receiving address belongs to a Binance account, Binance detects it and treats the withdrawal as an internal transfer: it's free, it arrives immediately, and "no TxID will be created." The record shows [Internal] in that column, with an internal transfer ID. You can switch the same withdrawal to go via the blockchain, and then it's an ordinary on-chain withdrawal with a network fee, just like sending to any address outside Binance.

Tokenized stocks bought through Binance Alpha sit in between. The tokens themselves exist on a blockchain, but when you buy them in Alpha you pay from your Binance balance and the tokens are held in your Alpha account inside Binance, per the Ondo tokenized securities FAQ. Your money doesn't leave the exchange and you don't sign anything from a wallet of your own.

To check any item in your history: a TxID you can paste into a block explorer means it went on-chain; [Internal] means it stayed inside Binance.

Risks you take on when you trade on-chain

  • No undo. A confirmed transaction stays confirmed. Swap into the wrong token or send to the wrong address and there's no support desk to reverse it.
  • Smart contract bugs. A flaw in the code that runs a DEX can put the funds in it at risk.
  • Malicious approvals. Approving a contract lets it move your tokens. Approve a malicious one and it can take them.
  • Front-running. Pending transactions are visible to everyone, and automated traders can place their own ahead of yours to profit from the price move. A loose slippage setting makes this easier.
  • Gas at busy times. When the network is congested, getting a transaction confirmed quickly costs more, and a failed swap can still use up gas.