This article is for informational and educational purposes only. It does not constitute investment, legal, or financial advice, nor a recommendation or solicitation to buy, sell, or hold any digital asset, token, or financial instrument. Named protocols, blockchains, and tokens are referenced for technical illustration; the publisher holds no positions in and has received no compensation from any project, platform, or token issuer named herein, including the Solana ecosystem. Providing liquidity, trading, and arbitrage on DeFi protocols involve substantial risk, including impermanent loss, smart-contract vulnerabilities, and total loss of capital. Conduct your own research and consult a licensed advisor before making any decisions.

The DeFi Glossary — Learning the Language

Dropped Into a Foreign Country

I decided to build an arbitrage bot. Great. Then I started reading about how DeFi actually works and immediately hit a wall. DEX, AMM, LP, TVL, slippage — every other sentence has an acronym I don't recognize. It feels like showing up in a country where I don't speak the language.

Before writing a single line of code, I need to learn the vocabulary. Here's what I've figured out so far, explained in the simplest way I can manage.

DeFi — Banking Without the Bank

DeFi stands for Decentralized Finance. Strip away the jargon and it's straightforward: financial services — lending, trading, savings — powered by code instead of banks.

Traditional finance is like going through the DMV to move your own money. Forms, IDs, business hours, approvals. DeFi is more like Venmo on steroids — instant, permissionless, running 24/7 — except there's no company behind it, just code.

Code can have bugs, though. If a smart contract has a vulnerability, funds can vanish. But at least it's a different kind of risk than "your bank made bad bets with your deposits and went under." Pick your poison.

DEX — The Exchange Without a Middleman

DEX stands for Decentralized Exchange. It's the counterpart to centralized exchanges (CEXes) like Binance or Coinbase.

A CEX is like a brokerage — think Fidelity or Charles Schwab, but for crypto. They hold your assets, match buyers and sellers, and take a cut. Convenient, but if the exchange goes down — as FTX demonstrated — your money goes with it.

A DEX works differently. Your assets stay in your own wallet. When you trade, a smart contract handles the exchange directly. No middleman, no permission needed. If you have tokens, you can trade.

But this raises an obvious question: if there's no middleman matching buyers and sellers, who's on the other side of my trade?

Liquidity Pools — The Money That Makes Trading Possible

A liquidity pool is a digital vault holding a pair of tokens. It's the thing you trade against on a DEX.

Think of it like a communal potluck fund at a co-op. Members chip in two types of assets, and anyone in the community can come trade one for the other. The more money in the pot, the bigger the trades it can handle without anyone feeling the pinch.

Traditional exchanges match buyers with sellers in real time. DEXes don't have that matching engine, so pools of pre-deposited funds act as the counterparty instead.

Which raises the next obvious question: who's putting money into these pools, and why?

LP — The People Who Fill the Pool

LP stands for Liquidity Provider — someone who deposits their tokens into a pool.

Why would anyone lock up their money so strangers can trade? Compensation. Every time someone swaps tokens through the pool, a fee is charged. LPs receive a pro-rata share of those swap fees as compensation for the liquidity they provide.

There's a catch, though. It's called impermanent loss. If token prices shift significantly, an LP can end up worse off than if they'd just held their tokens and done nothing. "Providing liquidity = free money" is a dangerous assumption.

AMM — The Math That Sets Prices

AMM stands for Automated Market Maker. It's the engine inside a DEX that determines prices.

Traditional exchanges use order books — lists of buy and sell orders that meet at a price. AMMs replace the order book with a mathematical formula.

The most famous one is x × y = k, the constant product formula.

Here's the intuition. Imagine a pool with apples (Token A) and oranges (Token B). The rule: number of apples × number of oranges must always equal the same constant (k).

  • Pool has 100 apples and 10,000 oranges. k = 1,000,000.
  • Take out 1 apple (99 left). To keep k = 1,000,000, the pool now needs 1,000,000 ÷ 99 ≈ 10,101 oranges. That's 101 more than before — so you paid 101 oranges for 1 apple.
  • Take out 10 apples at once? The price per apple shoots up dramatically.

The key insight: the more you take from the pool, the scarcer what's left becomes, and the price rises. This is also the mechanism behind slippage.

No human judgment involved. Pure math. When the AMM price drifts from the market price, arbitrageurs step in to close the gap. That's exactly the role I'm trying to build a bot for.

Slippage — When the Price Moves Against You

Slippage is the difference between the price you expected and the price you actually got.

It's like Uber surge pricing. One ride during normal hours costs $15. But when everyone's trying to get home after a concert, that same ride is $35. The price moved because demand spiked relative to supply. In an AMM, your trade is the demand spike — the bigger your trade relative to the pool, the more you move the price against yourself.

In an AMM, this effect is mathematically guaranteed. The x × y = k curve gets steeper the more you withdraw. The bigger your trade relative to the pool size, the worse your price.

I tested this on-chain and the theory checked out perfectly. Same token pair, different pools — the pool with more liquidity had less slippage. The pool with less liquidity got slammed. Theory meeting reality is a satisfying moment.

Swap — Exchanging One Token for Another

A swap is the act of exchanging one token for another on a DEX.

It sounds like a trade between two people, but on a DEX, you're trading against the pool. You put Token A in, the pool gives you Token B. It's less like a negotiation and more like using a self-checkout machine — scan your item, pay the calculated price, walk out.

Every swap triggers the AMM formula, generates slippage, and sends fees to the LPs. All the concepts above converge in a single swap.

Gas Fees — The Cost of Using the Network

Every transaction on a blockchain requires a gas fee — a payment to the validators who process and verify it.

Think of it like a highway toll. Every time you want to use the road (blockchain), you pay a fee. When traffic is heavy (network congestion), tolls go up — dynamic pricing, just like the express lanes on I-405.

One of the reasons I chose Solana is gas fees. On Ethereum mainnet, a single swap can cost tens of dollars during congestion. Solana's fees are typically much lower, though they can spike during periods of network congestion as well. (Ethereum L2s such as Arbitrum, Base, and Optimism also offer substantially lower fees than mainnet and are not discussed in this post.) For arbitrage, where margins are razor-thin, this fee difference can be make-or-break. This reflects the author's independent technical assessment for a personal project; the publisher has no material relationship with the Solana Foundation or any chain mentioned.

One thing worth noting: gas fees are just the network cost. When you swap on a DEX, there's a separate protocol fee (the LP fee) on top. Total cost = gas + protocol fee + slippage. All three matter.

Token vs. Coin — Similar but Different

A coin is the native currency of its own blockchain. Bitcoin (BTC), Ethereum (ETH), Solana (SOL). Think of it as the US dollar — the base currency of the system.

A token is a digital asset created on top of an existing blockchain. Examples include stablecoins like USDC, governance tokens like UNI, and various Solana-ecosystem tokens such as BONK (named for illustration only; not an endorsement, and meme tokens in particular carry high volatility and thin liquidity). Think of it as a Starbucks gift card or Dave & Buster's arcade tokens — they have value, but they run on top of someone else's system.

People use the terms interchangeably in casual conversation, but technically they're different. Creating a coin means building an entire blockchain. Creating a token means deploying a single smart contract. That's why there are hundreds of thousands of tokens out there.

Wallets — Your Keys, Your Crypto

The word wallet is misleading. A blockchain wallet is closer to your car keys than a wallet.

Your tokens aren't "inside" the wallet. They're recorded on the blockchain — a giant public ledger. The wallet holds the private keys that let you access them. Lose the keys, lose access. It's that simple.

"Not your keys, not your crypto" is the mantra. Leaving your assets on an exchange is convenient — until the exchange implodes. Holding your own keys means full responsibility, but also full control.

The real nightmare isn't losing your wallet app — you can reinstall that. It's losing your seed phrase, the 12-to-24-word master key that recovers everything. Lose that, and it's gone forever.

Smart Contracts — Code That Runs Itself

A smart contract is a program deployed on the blockchain that executes automatically when certain conditions are met. Every DeFi service — swaps, lending, staking — runs on smart contracts.

The name is misleading. "Smart" doesn't mean intelligent like AI. It just means "self-executing." Think of a self-checkout kiosk at Walmart — scan the item, pay the price, it processes automatically. No cashier needed, no judgment involved.

On Solana, smart contracts are called "programs." There's a structural reason: Ethereum bundles code and data together in one contract, while Solana separates them — the program (code) lives apart from the accounts (data). Because programs themselves hold no state, Solana can determine which transactions touch which data upfront and run non-conflicting transactions simultaneously. That's a key reason Solana is fast.

How It All Connects

Here's the picture.

DeFi is the world. Inside it are DEXes. Inside each DEX are liquidity pools, funded by LPs. When someone makes a swap, the AMM formula calculates the price, and slippage occurs based on trade size. The entire process is handled by smart contracts (called programs on Solana), recorded on the blockchain for a gas fee. Assets are managed through wallets, and the things being traded are tokens.

Every single swap contains all of these concepts, working together. Learn them separately and you have a dictionary. Understand how they connect and you start to see the world.

Language acquired. Time to actually build something.

Disclaimer

This article is for informational and educational purposes only and does not constitute financial, investment, legal, or professional advice. Content is produced independently and supported by advertising revenue. While we strive for accuracy, this article may contain unintentional errors or outdated information. Readers should independently verify all facts and data before making decisions. Company names and trademarks are referenced for analysis purposes under fair use principles. Always consult qualified professionals before making financial or legal decisions.