Complete "Lesson 1: Crypto Markets and the Professional Trader Mindset" first to unlock this lesson.Go to previous lesson

Exchange Architecture and Custody

A centralized exchange, or CEX, holds customer assets in exchange-controlled wallets and matches orders through an internal order book. Users deposit funds, trade balances recorded in the exchange ledger, and request withdrawals to external addresses. Execution can be fast and inexpensive because most balance changes occur off-chain. The trade-off is counterparty and custody risk: access depends on the exchange remaining solvent, secure, operational, and willing to process withdrawals.

A decentralized exchange, or DEX, allows users to trade through smart contracts while approving transactions from self-custodied wallets. Some DEXs use on-chain order books, while many use automated market maker pools. Self-custody removes the need to deposit assets with a centralized operator, but it does not eliminate risk. Traders remain exposed to smart-contract vulnerabilities, malicious tokens, wallet compromise, transaction fees, price impact, and failed or adversarially ordered transactions.

Custody should be treated as an operational decision rather than a philosophical label. Exchange balances are convenient for active trading, while self-custodied wallets provide direct control through private keys or recovery phrases. Losing those credentials can make funds permanently inaccessible. A practical structure may separate trading capital from long-term holdings, use withdrawal address controls where available, and verify the network and token contract before transferring funds. Sending an asset through an unsupported network can result in delayed recovery or permanent loss.

Orders and Execution Instructions

A market order prioritizes immediate execution but does not guarantee a specific price. It consumes available liquidity from the opposite side of the book. A limit order specifies the worst acceptable price: a limit buy executes only at that price or lower, while a limit sell executes only at that price or higher. A limit order controls price but may remain unfilled if the market moves away.

A stop order becomes active after a trigger price is reached. A stop-market order generally offers higher execution certainty after activation, but the fill can be worse than the trigger during a fast move. A stop-limit order activates a limit order, which controls the acceptable price but may not fill at all. This distinction is critical for risk exits: avoiding slippage is not useful if an unfilled stop-limit leaves the trader exposed to a continuing loss.

Venues may also offer post-only, immediate-or-cancel, and fill-or-kill instructions. Post-only prevents an order from immediately taking liquidity, although the exchange may cancel or adjust an order that would cross the spread. Immediate-or-cancel fills available quantity immediately and cancels the remainder. Fill-or-kill requires the entire requested quantity to execute immediately or not execute at all. Exact behavior and availability vary by venue, so traders must confirm the exchange specification rather than assume identical mechanics.

Order Books, Spread, and Liquidity

An order book contains bids from buyers and asks from sellers. The highest bid and lowest ask are the best quoted prices. If the best bid is 39,990 USDT and the best ask is 40,000 USDT, the spread is 10 USDT. Relative to the midpoint of 39,995 USDT, the spread is 10 divided by 39,995, or approximately 0.025%, equal to 2.5 basis points. A narrow spread usually indicates lower immediate execution cost, but displayed depth also matters.

Suppose the ask book offers 0.40 BTC at 40,000 USDT, 0.60 BTC at 40,020 USDT, and 1.00 BTC at 40,050 USDT. A market purchase of 1.20 BTC consumes all of the first two levels and 0.20 BTC from the third. Total cost is 16,000 plus 24,012 plus 8,010, equaling 48,022 USDT. The volume-weighted average fill price is 48,022 divided by 1.20, or 40,018.33 USDT. Compared with the initial best ask, execution slippage is 18.33 USDT per BTC, approximately 0.0458%, or 4.58 basis points.

Displayed liquidity is not guaranteed to remain available. Orders can be canceled, hidden quantity may exist, and depth can disappear during volatility. On an automated market maker, liquidity is distributed according to a pool formula rather than a conventional ladder of resting orders. A larger trade changes the pool ratio more substantially, creating greater price impact. Therefore, traders should evaluate liquidity for the intended order size, not merely use headline daily volume.

Two-panel market mechanics diagram. Left panel shows a BTC/USDT order book with bids below 39,990 and ask levels at 40,000 for 0.40 BTC, 40,020 for 0.60 BTC, and 40,050 for 1.00 BTC; highlight how a 1.20 BTC market buy consumes three levels. Right panel shows a downward-sloping AMM execution curve with trade size on the x-axis and average execution price on the y-axis, emphasizing increasing price impact.

Slippage and Total Trading Cost

Slippage is the difference between a reference price and the actual average execution price. It can result from consuming multiple price levels, latency, volatility, or limited pool liquidity. For a buy, positive execution cost occurs when the average fill is above the reference ask. For a sell, it occurs when the average fill is below the reference bid. Slippage should be measured against a clearly defined reference, such as the best quote immediately before order submission.

Execution cost includes more than slippage. Using the 48,022 USDT purchase above, assume a taker fee of 0.06%. The fee is 48,022 multiplied by 0.0006, equaling 28.81 USDT. Slippage relative to buying 1.20 BTC entirely at 40,000 is 48,022 minus 48,000, equaling 22 USDT. The combined immediate cost is approximately 50.81 USDT, excluding later exit costs, funding, withdrawal fees, gas, and market movement during transmission.

A maker order may earn a lower fee, but maker status does not guarantee a better outcome. The market can move away before the order fills, partially fill the position, or fill only when short-term price pressure is unfavorable. This is called adverse selection. Traders should compare expected total cost and fill probability rather than automatically choosing the lowest advertised fee tier.

Spot, Derivatives, and Leverage

In spot trading, the trader exchanges one asset for another and normally owns the purchased asset balance. A derivatives position provides price exposure through a contract. Perpetual futures have no fixed expiry and commonly use periodic funding payments to help keep the contract price near spot. Funding may be paid by long positions to short positions or in the opposite direction, depending on the rate and venue rules.

Leverage magnifies exposure relative to posted margin. If a trader posts 2,000 USDT and opens a 10,000 USDT position, effective leverage is 10,000 divided by 2,000, or 5 times. A 2% favorable move changes position value by approximately 200 USDT before costs, producing a 10% return on the initial margin. A 2% adverse move creates the same 200 USDT loss, or 10% of margin. Leverage amplifies percentage gains and losses on equity; it does not improve the statistical quality of a trade.

Liquidation occurs when account equity falls below the exchange’s maintenance requirement. It is incorrect to assume that a 5-times position always liquidates exactly after a 20% adverse move. Actual liquidation depends on entry price, maintenance margin, fees, mark price, isolated versus cross margin, added collateral, and the venue’s formula. Cross margin can use additional account equity to support a position, potentially placing more capital at risk. Isolated margin limits allocated collateral but may reach liquidation sooner.

Risk-reward chart for a 5-times leveraged 10,000 USDT position backed by 2,000 USDT margin. Show underlying price changes from negative 4% to positive 4% on the x-axis and approximate profit or loss from negative 400 to positive 400 USDT on the y-axis; annotate that a 2% price move equals 200 USDT, or 10% of initial margin, before fees and funding.

Practical Execution and Risk Control

Before entering, define the instrument, direction, notional exposure, acceptable entry range, invalidation price, and maximum account loss. Suppose account equity is 20,000 USDT and maximum risk is 0.5%, or 100 USDT. If the planned entry is 40,000 and the stop is 39,600, price risk is 400 USDT per BTC. Allowing an additional 40 USDT per BTC for estimated slippage and fees creates an effective risk of 440 USDT per BTC. Position size is 100 divided by 440, or approximately 0.227 BTC. Ignoring execution costs would produce an oversized estimate of 0.25 BTC.

After entry, compare the expected fill with the actual volume-weighted average price, record fees, and verify whether the stop quantity matches the open position. For derivatives, also monitor mark price, liquidation distance, margin mode, and funding schedule. For DEX execution, verify token addresses, transaction settings, network fees, and expected price impact before signing. Small test transfers can reduce operational risk when using a new wallet, network, or destination.

Sustainable execution depends on separating signal quality from market mechanics. A correct directional forecast can still lose money if spread, slippage, fees, funding, or liquidation risk consume the expected edge. The core discipline is quantitative: measure notional exposure, depth, average fill, total cost, and maximum loss before treating an order as acceptable.

Lesson practice

Lesson Checkpoint

Review what you learned and get feedback on your work.

0/8
01What is the primary custody difference between a typical CEX and a self-custodied DEX workflow?
02Why might a stop-limit order fail to protect a position during a rapid market decline?
03Using the example ask book, what is the average fill price for a 1.20 BTC market buy costing 48,022 USDT?
04What is the taker fee on a 48,022 USDT trade if the fee rate is 0.06%?
05Why can a maker order be worse than an immediately executable order despite a lower fee?
06A trader posts 2,000 USDT of margin for a 10,000 USDT position. What is the effective leverage?
07Why is a 5-times leveraged position not guaranteed to liquidate at exactly a 20% adverse price move?
08With a 100 USDT maximum loss and estimated effective risk of 440 USDT per BTC, what position size is appropriate?
Answered · 0/8