Polkaswitch Learn

What is Defi?

Cryptocurrencies DeFi


Decentralized finance or defi is an ecosystem of various financial applications that use public blockchain-based smart contracts. Defi enables users to transfer value quickly and generate yields peer-to-peer, in contrast to the slow, expensive, and often inaccessible centralized intermediaries of traditional finance.

Defi provides a 24/7 global, open, and pseudonymous alternative to the existing financial system built for the internet age. It delivers control and transparency to users over their own money without having to trust a custodian. Though this higher degree of personal responsibility is not without risk, the incentives offer far greater returns than would be imaginable in legacy finance, where most of the value is extracted from users by central authorities.

Anyone can program and use defi applications permissionlessly, with products to facilitate lending, borrowing, crowdfunding, saving, investing, trading, insurance, and more. With defi applications being built on top of base layers of decentralized blockchains, run by nodes distributed all over the world and largely owned and managed by Decentralized Autonomous Organizations (DAOs) of their users, it’s also implausible for them to be censored, unlike their centralized counterparts.

The term defi originated from Ethereum developers and entrepreneurs in discussions regarding the new open and composable finance applications being built on the dominant smart contract network in 2018. But in many ways, defi started with Bitcoin and now encompasses a much wider ecosystem of programmable money across multiple blockchains with an increasing level of cross-chain interoperability, as harnessed by Polkaswitch by aggregating liquidity across the Polkadot and Ethereum blockchains.


How Does Defi Work?


Defi applications use digital assets and programmable smart contracts to provide financial services without intermediaries.

Digital assets allow their users to own and control value with the ability to send it anywhere in the world. Smart contracts work like an account that holds funds, sending and receiving transactions based on certain conditions. No one can alter the smart contract, it will simply run as programmed.

Rather than empowering financial institutions to act as guarantors of transactions, defi smart contracts replace them, executed transparently and immutably on a blockchain, public for anyone to inspect and audit, and paid for in gas fees to cover the resources used.

For example, a basic smart contract could be designed to send an allowance from account A to account B once per week and it will only ever do just that as long as it holds the required funds. No one else can change the contract or alter it to send funds elsewhere.

Total Value Locked (TVL) can be used to measure the health of particular defi protocols, referring to the combined deployment of funds into its smart contracts. The key difference compared to traditional systems is that these funds aren’t being deposited to a custodial account. Instead, they are locked or used within smart contracts for a particular purpose under set conditions, with assets still under the non-custodial control of their users.

Users will need to download a compatible web wallet like MetaMask to interact with defi, simply funding it and connecting to the application they’d like to use. Tokens can then be deployed into a protocol’s smart contracts by verifying the transaction and paying the appropriate gas fee. Whether that be to lend out assets to earn interest, stake them for yield farming or liquidity mining, swapping assets on decentralized exchanges, minting stablecoins, taking out insurance, or trading on defi derivative markets.


What Can You Do With Defi?


New use cases for defi protocols are constantly emerging as the ecosystem continues to disrupt every facet of the traditional finance market. Some of the most popular current applications, beyond the ability to send money around the globe, deliver decentralized stablecoins, lending and borrowing, and exchange platform solutions.

Minting Stablecoins


Platforms like MakerDAO allow users to mint the USD-pegged DAI stablecoin by locking overcollateralized assets like ETH and WBTC into smart contracts governed by a DAO of MKR token holders.

Users can then transfer and utilize stable value while retaining the underlying assets used for collateral, deploying those stablecoins into further defi yield generating opportunities and helping to deliver billions of dollars in stablecoin liquidity across the decentralized finance ecosystem.

Lending and Borrowing Crypto Assets


Defi platforms like Compound enable automated and permissionless lending and borrowing agreements between users. On the lending side, users can deploy liquidity to these protocols to earn interest rates that are multiples higher than in the legacy banking system. On the borrowing side, users can access stablecoin or crypto loans by locking up sufficient collateral in other tokens to borrow against without the credit checks of traditional finance.

Protocol smart contracts ensure that loan payments are made according to the agreement, paying out interest to lenders as a reward and liquidating the collateral put up by borrowers if they fail to keep to the agreement.

Decentralized Exchange Trading


Automated Market Maker DEX platforms like Uniswap, SushiSwap, and Polkaswap offer an alternative means of trading tokens without relying on centralized order books. AMMs incentivize users to supply liquidity to smart contract pools of token pairs such as ETH-DAI. By supplying an equal value of each token to a pool, liquidity providers create a market, yield farming a proportional share of the fees generated on the platform in return. Some platforms also enable liquidity mining, adding the incentive of native governance tokens as an additional reward.

AMM DEXs provide liquidity for traders to then swap tokens in a decentralized manner, with aggregators and cross-chain protocols able to combine liquidity across the ecosystem into single platforms.



Defi Risks


Non-custodial defi protocols open up a decentralized financial system that is permissionless, transparent, and censorship-resistant, in stark contrast to the closed traditional finance system that is custodial, slow, permissioned, restrictive, expensive, tied to identity, and inaccessible to billions of the world’s population.

However, users are taking personal responsibility in deploying funds into smart contracts and so the risks of bugs, hacks, failures, or exploits in the code need to be understood to avoid loss of funds. Due diligence into defi platforms is therefore required to confirm smart contract code audits have been independently carried out, and protocols with any form of admin key are avoided. Defi insurance protocols can also be utilized to help mitigate such risks.

The concept of impermanent loss on defi AMM DEX platforms should also be understood. Extreme periods of volatility can mean the total fiat value of the tokens provided can be at a loss from deploying to a liquidity pool compared to just holding the assets. Though, this is often offset by the pool rewards received in any case.


The Future of Decentralized Finance


New layer 1 smart contract blockchains, Polkadot parachains, the transition to Ethereum 2.0, and the expansion of layer 2 solutions will all help to deliver the scalability required for defi to continue its path toward mass adoption.

As scalability and interoperability improve, increased liquidity across a more established defi ecosystem will resolve many of the existing barriers to entry and accelerate the disruption of all aspects of traditional finance.