CFDs and forex are complex instruments and come with a high risk of losing money rapidly due to leverage. Risk disclosure

Decentralised finance (DeFi)

This page gives a short definition of DeFi, a worked example of a DeFi loan, the edge cases experienced readers ask about and links to related terms.

Extrade Pakistan editorial team ·

On this page
  1. What is DeFi?
  2. Worked example: a DeFi loan (hypothetical)
  3. Where you see the term
  4. Edge cases for experienced readers
  5. Related terms
  6. Frequent questions

What is DeFi?

Decentralised finance (DeFi) means financial services such as lending, borrowing, trading and payments that run as programs on a blockchain instead of through a bank or broker.

These programs are called smart contracts. They hold the funds and apply the rules automatically. Users connect a self-custody crypto wallet and sign each transaction. On many networks they also pay gas fees for each transaction.

Formal definition

A DeFi protocol is a set of smart contracts on a public blockchain with these properties:

Worked example: a DeFi loan (hypothetical)

Assume a lending protocol that accepts ether as collateral and lends a stablecoin, a token designed to track a fiat currency such as the US dollar.

  1. Ali deposits ether into the lending contract.
  2. The contract lets him borrow stablecoins worth less than his collateral. The protocol's rules set the maximum share of the collateral value he can borrow.
  3. A price feed, called an oracle, keeps reporting the market price of ether to the contract.
  4. If ether falls and the collateral value drops below the protocol's liquidation threshold, the contract allows other users to repay part of the loan and take some of Ali's ether at a discount. This is a liquidation.
  5. If ether holds its value, Ali repays the loan plus interest and withdraws his ether.

No loan officer approves or reviews any of these steps. The code applies them. If the code has a bug or the oracle reports a wrong price, losses can happen just as automatically.

Where you see the term

Crypto CFDs at a broker such as Exness are price contracts with the broker as counterparty. They are not DeFi. See Crypto CFDs for how those work.

Edge cases for experienced readers

DeFi tokens can lose value fast. Borrowing against volatile collateral adds liquidation risk on top of that. Rules on crypto assets in Pakistan are a separate question. Check the current position of Pakistani regulators before you use any service. Read more in Regulation and Safety and Risk management.

Blockchain · Altcoin · Crypto wallet · Gas fees · Collateral · Derivatives · Fiat money · CBDC · Trading glossary

Frequent questions

What does DeFi mean in crypto?

It means financial services run by smart contracts on a blockchain, used directly from a wallet without a bank or broker in the middle.

Is DeFi the same as a crypto exchange?

No. A centralised exchange holds your funds in custody. A decentralised exchange is a smart contract that you trade with from your own wallet.

Is DeFi safe?

It carries specific risks: code bugs, hacks, oracle failures, liquidations and no legal recourse. You can lose part or all of what you deposit.

Is DeFi halal?

Scholars differ, especially on interest-bearing lending. See Islamic finance for the principles involved.

Related pages