A bank loan involves a credit check, a loan officer and a few days of waiting. On a decentralised lending protocol, the same thing takes one transaction and about twelve seconds, approved by nobody. That contrast is the heart of the question "what is DeFi?" – financial services rebuilt as public software that anyone can use and nobody can switch off. It is genuinely new, and it fails in genuinely new ways.
What is DeFi, in one paragraph
DeFi, short for decentralised finance, is a set of financial applications built from smart contracts – programs deployed on a blockchain such as Ethereum that hold funds and execute rules automatically. There is no account manager and usually no sign-up: you connect a self-custody wallet, approve a transaction and the contract does what its code says. The code is typically public, the transactions are public, and the protocols can be combined with each other, which is why people call DeFi "money legos".
The three building blocks most people meet first are lending protocols, decentralised exchanges and liquidity pools.
DeFi lending: over-collateralised by design
Without credit checks or legal recourse, a lending protocol has one way to protect lenders: make borrowers lock up more value than they borrow.
How it works, in a hypothetical example:
- Lenders deposit assets, say stablecoins, into a pool and earn interest.
- A borrower deposits $1,500 of ether as collateral.
- The protocol allows them to borrow up to a set share of that value, perhaps $1,000 of stablecoins.
- Interest rates float algorithmically: when a large share of the pool is borrowed, rates rise to attract lenders and discourage borrowers.
- If the collateral's value falls and the loan becomes too large relative to it, anyone can liquidate the position – repaying part of the debt and receiving the collateral at a discount.
Liquidators are usually automated bots competing for that discount. It is a clever system: solvency is enforced by open competition rather than a risk department. But it means borrowers can lose collateral very fast in a sharp market drop, and prices are only as good as the oracle feeding them to the contract.
Decentralised exchanges and automated market makers
A traditional exchange matches buyers and sellers in an order book. Most DeFi exchanges, called DEXs, use an automated market maker (AMM) instead. You do not trade with another person; you trade with a pool of two tokens, and a formula sets the price.
The classic formula, popularised by Uniswap, is x × y = k: the quantities of the two tokens in the pool, multiplied together, must stay constant. Buy token A from the pool and there is less A and more B, so A gets more expensive. Arbitrageurs then trade against the pool whenever its price drifts from prices elsewhere, which keeps it roughly in line with the wider market.
Things to know as a DEX user:
- Price impact grows with trade size relative to the pool. Small pools mean expensive large trades.
- Slippage tolerance is a setting that caps how far the price may move before your transaction fails. Set it too loose and you invite worse fills.
- MEV (maximal extractable value): because pending transactions are visible, bots can place trades just before and after yours – a "sandwich" – to profit from your price impact.
- Anyone can list a token, including fake copies of real ones. Always verify the contract address.
How liquidity pools work, and what impermanent loss is
Someone has to supply the tokens in those pools. These are liquidity providers (LPs): they deposit both tokens and receive a share of the trading fees.
The catch is impermanent loss. Because arbitrageurs rebalance the pool as prices move, an LP ends up holding more of whichever token fell and less of the one that rose. Compared with simply holding both tokens, the LP is worse off whenever prices diverge – and the bigger the divergence, the bigger the gap. It is "impermanent" only because it shrinks if prices return to where they started; if you withdraw after a big move, it is very permanent.
Whether providing liquidity pays depends on whether fees earned outweigh that loss. Pools of two stablecoins suffer little impermanent loss; pools pairing a stable asset with a volatile one can suffer a lot. Advertised yields often include extra token rewards, whose value can fall faster than they accumulate.
Smart-contract risk and the other DeFi risks
DeFi removes the middleman, and with it the middleman's safety nets. The main risks:
| Risk | What goes wrong |
|---|---|
| Smart-contract bugs | A flaw lets an attacker drain funds; there is often no way to reverse it |
| Oracle manipulation | A price feed is pushed off briefly, letting an attacker borrow or liquidate unfairly |
| Flash-loan attacks | Huge uncollateralised loans within one transaction amplify an exploit |
| Admin keys and governance | A small group, or a compromised key, can change the rules or upgrade the contract |
| Bridge risk | Assets moved between chains rely on bridges, historically a frequent target of large hacks |
| Composability risk | A failure in one protocol cascades into others built on top of it |
| Regulatory risk | Front-ends can be restricted in some jurisdictions even if the contracts keep running |
An audit reduces risk; it does not eliminate it. Several heavily exploited protocols had been audited. Time in production with significant funds at stake is one of the better – though still imperfect – signals.
Before you use a DeFi protocol: a checklist
- Verify the exact URL and contract addresses from more than one trusted source
- Read who controls upgrades and admin functions
- Check audits, bug bounty programmes and how long the protocol has run
- Understand where the yield comes from – fees, borrower interest or new token emissions
- Start with a small amount and test the withdrawal path
- Review and revoke token approvals you no longer need
- Never put in money you cannot afford to lose entirely
Open finance, open risks
So, what is DeFi? It is finance as open-source infrastructure: transparent, permissionless and programmable, with lending, trading and market-making handled by code instead of institutions. Teams like ours at Mraviko that build software for a living tend to admire the engineering – and respect how unforgiving it is, because on a blockchain a bug is not a ticket in a backlog, it is a loss. Use DeFi with the care you would give any system that has no customer support and no undo button.
This article is for education only and is not financial or investment advice.