Defi vs Cefi

This is where we want you to know why Defi is better than Cefi in everyway.

Cryptocurrency swap is the act of exchanging one type of cryptocurrency into another.

Much like how you can exchange real-world currencies — say, the US Dollar (USD) with the Chinese RMB (RMB) — at the bank, you can also swap cryptocurrencies — say, Bitcoin with DogeCoin — at what is called a cryptocurrency exchange.

Cryptocurrency exchanges record transactions differently from banks.

Banks keep their own records (‘ledger’) of their accounts’ amount. Due to the many layers of a bank’s operations, information takes a while to travel, and so their account ledgers may not always reflect the most updated balance as per the latest state of transactions.

For illustration purposes, take John, who wants to exchange his USD into RMB. He goes to the bank teller, who takes his USD, writes John a receipt for the transaction, and gives it to John along with some RMB. The teller keeps their own records of John’s and many others’ USD-RMB exchange amounts. At the end of the day, the teller informs the total USD-RMB exchange amounts of the day to the back office, who then subtracts RMB and adds USD to the bank’s ledger for the two currencies.

Meanwhile, cryptocurrency exchanges record all their transactions on a blockchain network. A blockchain network exists on the digital plane and is made up of blocks that are linked with each other. These blocks contain rows of transactions that have been confirmed by incredibly smart computers (‘miners’).

Transactions offering the highest fees for miners (‘gas’) will be prioritised to be put inside blocks before other pending transactions (‘mempool’). Hence, transactions on the blockchain can be recorded and actualised in a different order compared to the initial order of which they were made.

Imagine that John, Peter, and Mary all clicks a button to swap their DogeCoin for Ether, in that order but each with a split second difference. Their transactions end up in the mempool, and are found by Taylor the miner. Taylor decides to process John’s transaction before Mary’s and Peter’s, as John had offered the highest gas fees. Mary’s transaction was processed shortly afterwards, as she offered only slightly lower gas than John. Peter’s transaction, which offered half of Mary’s gas, was processed a while after Mary’s.

Two minutes later, we find a new block, Block #1999, added to the blockchain network. On that block, John’s transaction is recorded as Row 2, and Mary’s as Row 10. At the same time as the #1999 block was generated, John and Mary’s wallets are also updated as per their transactions. It’s not until another another couple of minutes that we can find Peter’s transaction recorded as Row 5 of Block #2000, and Peter’s wallet updated accordingly.

Some cryptocurrency exchanges do not take custody of the assets used in the exchange.

They are known as decentralised cryptocurrency exchanges (‘DEXs’).

Banks work as custodians — you give them possession over your money. Whatever they do with the money you entrust them with is none of your business. And of course, any profit made using your money becomes the rights of the bank.

When John exchanges his USD for RMB at Bank A, that RMB comes from Mary, who had deposited her RMB in an account at the bank. Mary may not even know that her RMB is being used to facilitate the exchange. For all she knows, the bank only owes her a certain amount of money plus a fixed percentage in interest.

DEXs like ACY Swap do not take custody of the swapped cryptocurrencies. Instead, they utilise self-executing programs (‘smart contracts’) to hold cryptocurrencies used in facilitating swap transactions on the DEX (‘liquidity’).

Liquidity is deposited (‘locked’) into such smart contracts (‘liquidity pools’) by their owners (‘liquidity providers’), for the purpose of earning a share of swap transaction fees charged by the DEX (‘liquidity mining’ or ‘yield farming’).

Liquidity pools directly connect liquidity providers with those looking to make swap transactions. At no point does the DEX ever become in possession over the involved assets.

John locks his Bitcoin and DogeCoin into a DEX’s BTC/DOGE liquidity pool. Not long after, Mary swaps her Bitcoin for some DogeCoin at that very same DEX. Mary’s Bitcoin goes into the BTC/DOGE liquidity pool, which the DogeCoin she receives also comes from. John receives a percentage of the fees the DEX earned from Mary’s swap transaction.

Last updated