Blockchain technology, born in 2008 in the wake of the global economic crisis triggered by sub-prime mortgages, enabled a revolutionary new form of peer-to-peer exchange of monetary value: bitcoin. The philosophy of blockchain – disintermediating third parties from value chains by moving from a scenario where a central entity places users in an ambience of manufactured trust (think: banks) to a ‘trustless’ scenario where the network is governed algorithmically – is not a standalone, monolithic technology but rather an ensemble of technologies and concepts such as cryptography, digital cash, peer-to-peer network, smart contract, distributed ledger, consensus mechanisms, economic network and game theory      . However, the now-famous cryptocurrency – bitcoin – which started it all is not the be-all and end-all of the underlying blockchain technology but merely an application.
Cryptocurrencies were the first application of blockchain technology. 2015 saw the advent of pre-conditioned transactions governed by smart contracts, a capability introduced by the blockchain network called Ethereum. Then came the wave of blockchain-based applications or dApps (decentralized applications) and interoperability between the various blockchain networks. Today, the technology is going through another evolution-spurt, effectively cementing the evolution of the Internet from being one of information to one of value: DeFi or Decentralized Finance  .
Fig I – Evolution of Blockchain
The goal of this article is to provide an overview of Decentralized Finance.
What ia DeFi?
Staying true to the philosophy behind the conception of blockchain technology, DeFi (Decentralized Finance) disintermediates traditional, centralized financial models, enabling anyone with an active internet connection to participate. Typically built upon public blockchains, DeFi systems effectively cut out intermediaries such as banks, brokerages or other middlemen who may introduce inefficiencies. On the contrary, DeFi Blockchain algorithmically govern interactions between peers, permitting them to buy, sell, lend and borrow more efficiently and economically.
DeFi applications typically have three macro layers: i) The application layer: this is where the user interface to the application resides, permitting peers to buy, sell, lend or borrow while abstracting the complexities of the underlying layers; ii) The protocol layer: this layer contains the set of agreed-upon rules and standards that govern the transactions in a particular industry, in this case, financial services; iii) The settlement layer: This is the layer where all transactions are settled. In the case of DeFi, this layer is typically a public blockchain layer. The ‘currency’ used to settle these trades/transactions is typically the cryptocurrency native to the blockchain network in question. For instance, ETH is used in Ethereum. In addition, certain blockchain networks also enable the tokenization of real-world assets (ex: a piece of real-estate property) and the creation of alternative currencies (altcoins) that could be used as the medium of settlement. Today, the DeFi applications also deal with digital representations of fiat currencies – stable coins – to counteract the volatility of the cryptocurrencies’ value stemming from their rampant speculation  .
Smart contracts (pieces of code that encapsulate and execute the terms and activities necessary for the functioning of these decentralized financial services) play multiple roles in the DeFi context: custodians, escrow agents, and central counterparty clearing (CCP). In real-world finance, the transaction between banks will be settled with the CCP; instead, in DeFi, the CCP is disintermediated, and the transaction will be settled atomically, ensuring that value is either exchanged between the two parties simultaneously and instantaneously or the transaction results in an error (ex: a token that represents a piece of real estate property is sent to the buyer and the tokenized cash to close the purchase is sent to the seller simultaneously). This atomic swap reduces the mistrust, time and effort in the value chain that is typically capitalized on by third parties and governing institutions .
DeFi is also inherently transparent as all transaction are auditable via blockchain browsers (blockchain technologies render immutable the data written in them). This could potentially allow the mitigation of unwelcome events before they arise.
From another perspective, DeFi can be considered a further step of the evolution of the financial system that started with the inclusion of the Internet.
Fig II – Evolution of Finance 
A NOTE ON CeFI: Centralized Finance (CeFi) is a sub-branch of the financial industry. In CeFi, people earn interest by using Cryptocurrency as a form of collateral. Corporations, like Binance or Coinbase, act as lenders and have custody of the assets or funds while giving them to the lenders. Nevertheless, since 2020, decentralized finance (DeFi) applications and services like Uniswap took a foothold. They promoted a new way to trade crypto and financial assets by creating a new financial services stack due to their capabilities. Moreover, the same CeFi initiatives are now proposing alternatives or direct investments with DeFi products   .
DeFi services and applications permit replication of existing offerings on a new technology rail (blockchains) and the creation of customized, innovative services. They propose themselves as a substitute of the current, old-finance world by creating its counterpart in the Crypto world with services such as exchange, fund management, insurance, payments, derivates, payments, asset management, etc. as shown in the figure below:
Fig III – Traditional Finance vs Crypto Finance
Although it is still in its early stages, thanks to the Blockchain technology, the level of new product spawning and investment in DeFi is growing exponentially. As of 23rd March 2021, 41.61 billion USD have been locked into over 83 projects .
DeFi: The New Opportunities
DeFi has become one of the more discussed topics inside and outside the Blockchain communities due to the:
- i) continuous release of new projects,
- ii) the amount of crypto locked into the various projects, and the various benefits the phenomenon has to offer, such as A) a much leaner and efficient financial system, B) financial inclusion by being permissionless, C) attractive interest rates for investors, D) control over one’s own finances as all wealth in DeFi is held in the user’s wallet, and E) heightened transparency where anyone can view any transactions conducted by the accounts made visible in a pseudo-anonymous fashion; the fact that the governing smart contracts reside on the blockchain ensures that anyone interested and with the right programming knowledge can analyze the governing logic .
To appreciate the exponential growth of the DeFi phenomenon, this article highlights some interesting projects and initiatives, divided into eight categories for a more structured approach.
Rampant financial speculation by few has rendered the value of most cryptocurrencies highly volatile. An answer to this problem has arisen in the form of stable coins. Their value is rendered ‘stable’ (relatively much less volatile) by linking them to price-stable assets, like Gold or the U.S. dollar, or crypto asset. There are two types of stable coins custodial stable and algorithmic or decentralized. The first is usually pegged to a real-world asset such as the U.S. dollar; the latter is pegged to a crypto asset.
- Custodial stable coins store reserves of fiat counterpart to guarantee the peg. For example, Tether (USDT) is backed 1:1 with a dollar from the issuer bank account. Their economic principle is similar to the fiat counterpart that is based on the trust that the USD reserves are really fully collateralized and existing.
- Algorithmic or decentralized stable coins differ by using as a collateral asset such as a relatively stable cryptocurrency or a basket of them. In those cases where the underlying cryptocurrency itself suffers from volatility, the stable coin is over-collateralized. For example, DAI stable coin is backed by Ethereum and basic attention token (bat) and is used as economic incentives for arbitrageurs to maintain its peg.
Binance USD is a custodial stable coin proposed from the centralized crypto-exchange Binance. The stable coin is pegged 1:1 to the U.S. dollar. This varies from decentralized stable coins such as SAI and DAI in that these custodial stable coins are artificially pegged.
Maker, one of the first launchers of decentralized stable coins, is a smart contract platform constructed on Ethereum and launched in 2017. It has three types of stable coins and a governance token:
1. SAI stands for Single Collateral Dai and is backed only by Ether (ETH) as collateral.
2. DAI stands for Multi-Collateral Dai and is currently backed by Ether (ETH) and Basic Attention Token (BAT)
3. Maker is Maker’s governance token and is used for governance purposes.
Lending is a key aspect of the traditional financial system and is strictly regulated by governments and banks. The current lending system is exclusionary and has evolved in such a fashion that it is unable to cater to a large segment of the world’s population.
Decentralized lending allows any user to collateralize their digital asset and use them to obtain loans. (NOTE: it is thanks to this decentralization that neither the one who borrows nor the one who lends need to identify themselves, and everyone can access the crypto). There are various types of lending:
Launched in 2017, Compound uses the innovative pool-based lending system, where users that deposit an amount in any of the supported cryptocurrencies are given a number of cTokens (these are synthetic tokens that are used to emulate the deposit) on top of which they can accumulate interest. These cTokens also work as collateral to determine the maximum amount a user can borrow at a specific moment. The users earn an annual percentage yield (APY). Compound derives the interest rates for different assets through algorithms that account for the asset’s supply and demand .
Aave was launched in 2020. It is an open-source non-custodial protocol for borrowing and lending. User can borrow tokens that are minted with compliant ERC20 tokens on a ratio of 1:1 of the supplied asset, creating aTokens (these are synthetic tokens that are used to emulate the deposit). Therefore, a user can lock into the smart contract an amount of ERC20 token and gain interest from the number of aTokens lent. The interest gain depends on asset demand and supplies. A user can opt-in or off anytime, as the protocol has a reserve to ensure withdrawal. Aave is one of the first platforms that offer flash loans. Flash loans are trustless and uncollateralized loans where the payback need to be done in the same transaction.
A NOTE ON Flash Loans: In regular loans, lenders advance out money to a borrower to be eventually paid back in full. The lender receives a pay-out from the borrower for temporarily parting with its money. Flash loans differ by :
- Smart contracts: flash loans are built on smart contracts to regulate the money flow of flash loans. If the borrower cannot pay back the loan before the end of the transaction, the smart contract will reverse the transaction, so the loan is called off.
- Unsecured loan: flash loan lacks collateral and does not assure that the borrower will give back the borrowed amount. The borrower needs to pay immediately.
- Instant: obtain a loan is a long process; instead, flash loans assure an instantaneous amount but need to be repaid within a transaction. This means that the borrower must execute other smart contracts to perform instant trade with the loaned capital before the end of the transaction in few seconds.
Flash loans can be used for:
- Arbitrage: traders use flash loans to make money by the price discrepancy between different exchanges.
For example, suppose pastacoin is 1$ at exchange A and 4$ at exchange B. In that case, the user can call a flash loan to buy 100 pasta token from A and sell it to B and repay the loan by the difference made by the selling.
- Collateral swaps: by instant swapping the collateral backed by the user loan for another type of collateral.
Decentralized derivatives are similar to classical financial products except that they are tokens that derive their intrinsic value from other crypto assets instead of other real-world assets.
1. Asset-Based Derivative Tokens: Asset-based derivative tokens are similar to stablecoins, but instead of being pegged to fiat currencies, they are pegged to synthetic tokens or price movements of multiple assets.
2. Event-Based Derivative Tokens: Event-based derivative tokens are usually linked to any possible event outcome with a specific timeframe and resolution. When the market resolves based on the outcome of the event in a particular time frame, the smart contract, where the tokens are locked, will split the “winning” among the users who locked the token for that specific outcome. These tokens greatly depend on the resolution source’s trustworthiness, aka the oracle, as they create external dependencies.
It is a protocol that tracks real-world assets via tokens. It is implemented in a way that all participants’ total debt pool can increase or decrease the aggregate price of the unique synthetic assets. Thus, the token can remain fungible, so the redemption does not depend on the issuer but on the stacked pool, as the user itself assumes the risk when acquiring a token linked to a specific asset. An example of a Synthetic Asset is Synthetic Gold (sXAU) that tracks the price performance of Gold by utilizing the services of Chainlink, a smart contract oracle that obtains price feed from several trusted third-party sources to prevent tampering .
Hegic differs from Synthetix as it offers options with any strike price and staking for a defined period utilizing its liquidity pools. Users can opt-in and opt-out immediately as the liquidity of every user is covered. This works the same as in the real financial world, and they differ only by the fact that the tokens are locked into a smart contract .
Insurance against losses or other types of financial protection is nothing new to the financial world. In DeFi, a smart contract is used to guarantee the insurance pay-out. All pertinent funds are locked in the smart contract.
Nexus Mutual is a decentralized insurance protocol built on Ethereum that offers insurance for DeFi products. The system works similar to the insurance system with fiat. The user needs to choose a Cover Period and the Cover Amount. The Cover Amount is how much the user would like to cover by purchasing the insurance. The user will be automatically refunded upon a specific condition if a Claim Assessment is done and evaluated by a Claim Assessor; once approved, the funds will be paid .
Armor is the first derivative DeFi insurance product. Armor is an insurance aggregator like Nexus Mutual, as it offers the same type of insuring but differ as it also insures ylnsure products from Yearn Finance . The products are:
– arNXM or Wrapped NXM (wNXM) is a token that allows an investor to have exposure to NXM, the token of nexus mutual, without KYC. It has also been used for internal functions such as staking, claim assessments, and governance.
– arNFT is used to buy insurance cover on Nexus Mutual.
– arCore is the pay as you go insurance, where Armor protocol keeps track of user’s funds amount and moves them across various protocols using streamed payment system.
Decentralized payments can be already made via ETH or other tokens, but they are not cheap, as the price of ETH is rising. Thus, DeFI offers faster and cheaper solutions using Layer 2 solutions (NOTE: Layer 2 solutions are projects that allow conducting timed or conditional transfers).
Tornado Cash is one of the first sidechains that implement zk-Snarks to achieve privacy. This helps to improve transaction privacy by breaking the on-chain link between the recipient and the receiver addresses. Thus, a user can withdraw from a previously deposited amount of ETH or other supported ERC-20 tokens if he or she can prove to possess the secret corresponding to one of the smart contracts. Zk-snarks allow the user to be verified without the need to reveal the exact deposit and transfer the funds to a specified address, and to the external observer, it becomes impossible to determine which account this withdrawal is related to.
Launched in 2018, together with Austin Griffith’s Burner Wallet, xDAI provides a way to conduct easily and quickly small to medium payment transactions. This sidechain can conduct five transactions per seconds with a low gas price paid via the xDAI. The xDai has a 1:1 representation with the Dai stable coin.
DeFi: Current Drawbacks
Despite its unquestioned and explosive growth, the DeFi phenomenon needs to address a few setbacks; well-established protocols can reduce these risks significantly.
- Infrastructural mishaps and hacks: A lot of scams have already been perpetrated in the rapidly evolving DeFi infrastructure. Hackers have managed to drain a protocol of funds, and investors are left unable to trade. Funds however were recovered.
- Regulations: Ironically, the open and distributed nature of the DeFi ecosystem also face problems when it comes to existing financial regulation. Current laws were crafted based on the idea of separate financial jurisdictions, each with its own set of laws and rules. DeFi’s borderless transaction span presents important questions for this type of regulation. For example, who is culpable in a financial crime that occurs across borders, with DeFi protocols and apps?
- Smart Contracts: Smart Contracts are the backbone of a DeFi protocol. They are transparent and open-source such that users who participate in the protocol can make an informed decision. Typically, developers who build protocols ensure that their smart contracts go through multiple audit rounds by security firms. However, it is not without precedent that human auditors miss flaws that could be potentially exploited in the future. (NOTE: DeFi, at the end of the day, are software systems and can suffer malfunction stemming from various factors).
- The oracle problem: Blockchains inherently do not have access to off-chain data. This is ‘oracles’ or data-feeds come into the picture. These oracles feed the blockchain (specifically the smart contract residing on the blockchain) with external information, serving as a bridge to the outside world. Such a solution tends to create a central point of trust in otherwise trustless, decentralized setups. If an oracle broadcasts the wrong information, the consequences could be dire.
- Liquidity Risks: Another non-technical risk is when protocols could run out of liquidity.
- Rising costs: Most DeFi protocols today operate on the Ethereum blockchain. However, this has led to a congestion of the network and consequently caused the costs of transactions to rise exponentially. However, this is only a systemic risk, and many protocols are planning an exodus to other public blockchains such as Algorand that are faster, more scalable, and much less expensive. Nevertheless, with Layer 2 solutions, DeFi projects are becoming more scalable.
- Governance risk: Most DeFi projects can be impacted by their governance structure, as it can negatively impact the platform. Applications that do not have a proper open governance structure and place into the admin the centralized meaning of governance will put at risk the platform protocol, liquidity and trustability. An example can be with Sushi swap and the admin, Sushi chief, with its scam exit, where he withdraws all the funds. Nevertheless, after the pressure of the community and the inability to profit from the scam, due to the immutability of the Ethereum blockchain, the admin rewires the found to the exchange
DeFi is a phenomenon built on the tenets of financial inclusion, disintermediation, and accessibility. Most DeFi protocols are accessible by anyone anywhere – all they need is internet connectivity. As mentioned before, DeFi is like Lego pieces. They can be used to build complex or simple products that are integrated . The essence of DeFi is to build for interoperability. Hence, like Legos, you have a large bin of piece that can be combined together and eventually snowballing a new creation. For example, we are building on Dai, and we decide to create a Smart Contract for MakerDao. The first is the stable coin; the latter is the DAO that manages the DAI community. Our smart contract accepts ETH as collateral for DAI. On that, we add a new piece, a Custom Compound Smart Contract. The Compound uses our MakerDao smart contract for borrowing capabilities as infrastructure for its lending markets. This will allow any user to collateralize the loan with any cryptocurrency supported by Compound. Lenders will supply the lending pool for borrowers with funds and earn interest for their contributions until their funds are withdrawn.
There is no doubt that blockchain technology and DeFi are empowering financial services to be more trustworthy, interoperable, borderless, and transparent . But before we see mass adoption of DeFi protocols from mainstream finance, there will be a medium-long transition period. The actual future of DeFi will mostly depend on whether it manages to keep its promise and create value for its users.
Giorgio Alessandro Motta: Currently xTech Specialist Grade 2, Giorgio developed his passion for Blockchain technology during his journalistic years in China due to the high corruptibility of the nation’s food supply chain. Thereafter, he enrolled at Wageningen University, Netherlands, to further his interests studying a mix of software development and business IT to understand the entire Blockchain ecosystem. Afterwards, he continued his research at Wageningen Economic Research Centre in the Netherlands. At Bip xTech, he has developed various Blockchain projects involving both Private and Public Blockchain to track and trace assets and develop new business models in High Fashion, Agriculture, FMCG, Finance, and Energy sectors.
PraveenKumar Radhakrishnan: Currently Bip xTech Tech Consulting Lead, Praveen co-founded the blockchain practice in Bip. Over the past few years, he has designed, developed, and delivered various blockchain projects ranging from supply-chain track & trace applications to launching tokenized financial instruments on decentralized platforms. His interest in blockchain spans public, private and consortium blockchains.
In Bip xTech we are able to conceive, design, implement, audit and operate DeFi Blochchains, building from scratch or integrating existing components to create the entire solution, adding where needed the strong Bip Competence Centre capabilities on OpenFinance and Cybersecurity.
In order to receive more information, to deep dive your ideas or needs, or to simply know more about Bip xTech offering on Blockchain and DeFI, you may directly contact the authors at the following email addresses: email@example.com and firstname.lastname@example.org
 A. M. Antonopoulos, Mastering Bitcoin: Programming the Open Blockchain, O’Reilly Media, Inc., 2018.
 N. Szabo, “The idea of smart contracts,” Nick Szabo’s Papers and Concices Tutorials, 6, 1997
D. Chaum, “Blind signatures for untraceable payments,” in Blind signatures for untraceable payments, Boston,MA, Springer, 1983, pp. 199-203
 D. M. P. R. N. &. S. K. Yaga, “Blockchain technology overview,” in Blockchain technology overview, National Institute of Standards and Technology , 2018, pp. 2-4
 Y. Yuan and F.-Y. Wang, “Blockchain: The state of the art and future,” Acta Automatica Sinica, pp. vol. 42, no. 4, pp. 481–494, 2016.
 Z. x. Zhang, “An Overview of blockchain technology: Architecture, consensus, and urue trands,” in IEEE internatonal Congress on big data(BigData C), 2017.
 M. Swan, Blockchain: Blueprint for a new economy, O’Reilly Media, Inc., 2015.
 Unibright.io, “Blockchain evolution: from 1.0 to 4.0,” 7 12 2017. [Online]. Available: https://medium.com/@UnibrightIO/blockchain-evolution-from-1-0-to-4-0-3fbdbccfc666.
 F. Schär, “Decentralized Finance: On Blockchain- and Smart Contract-based Financial Markets”.
 Y. Riady, “Decentralised Finance Explained,” [Online]. Available: https://yos.io/2019/12/08/decentralized-finance-explained. [Accessed 29 January 2021].
 A. Hay, “How Decentralized is “Decentralized Finance”?,” [Online]. Available: https://medium.com/coinmonks/how-decentralized-is-decentralizedfinance-89aea3070e8f. [Accessed 29 December 2020].
 IDEO CoLab’s Ian Lee, “We’re the Architects of a More Open, Free and Fair Financial System: IDEO CoLab’s Ian Lee,” [Online]. Available: https://thedefiant.substack.com/p/were-the-architects-of-a-more-open-cf2. [Accessed 8 March 2021].
 L. J. Xie, “A beginner’s guide to DeFi,” [Online]. Available: https://nakamoto.com/beginners-guide-to-defi/.
 Coinbase, “A Beginner’s Guide to Decentralized Finance (DeFi),” [Online]. Available: https://blog.coinbase.com/a-beginners-guide-to-decentralizedfinance-defi-574c68ff43c4. [Accessed 9 March 2021].
 Binance, “The Complete Beginner’s Guide to Decentralized Finance (DeFi),” [Online]. Available: https://www.binance.vision/blockchain/the-completebeginners-guide-to-decentralized-finance-defi. [Accessed 10 March 2021].
 Defipulse, “Defipulse,” [Online]. Available: https://defipulse.com/.
 A. K. S. J. M. A. J. Murray, “Contracting in the Smart Era: the Implications of Blockchain and Decentralized Autonomous Organizations for Contracting and Corporate Governance,” Academy of Management Perspectives., 2019.
 C. Yan and B. Cristiano, “Blockchain disruption and decentralized finance: The rise ofdecentralized business models,” Journal of Business Venturing Insights, 2020.
 CoinGecko, How to DeFi, CoinGecko, 2021.
 Sigma, “A review of the current state of decentralised finance as a subsector of the cryptocurrency market,” [Online]. Available: https://www.sigma.com.mt/news/a-review-of-the-current-state-of-decentralised-finance-as-a-subsector-of-the-cryptocurrency-market. [Accessed 10 January 2021].
 Aave, “Aave – Flash Loans,” Aave, [Online]. Available: https://aave.com/flash-loans/. [Accessed 2021 May 2021].
 S. J. A. S. M. a. W. K. Brooks, “Havven: a decentralised payment network and stablecoin,” [Online]. Available: https://www.synthetix.io/uploads/havven_whitepaper.pdf. [Accessed 1 April 2021].
 Hegic, “Hegic,” [Online]. Available: https://www.hegic.co/.
 Fitzner Blockchain, “Nexus Mutual,” [Online]. Available: https://tokentuesdays.substack.com/p/nexus-mutual . [Accessed 1 April 2021].
 Fitzner Blockchain, “The Potential for Bonding Curves and Nexus Mutual,” [Online]. Available: https://tokentuesdays.substack.com/p/the-potential-forbonding-curves. [Accessed 8 March 2021].
 Totle, “Building Money Legos,” 2019. [Online]. Available: https://medium.com/totle/buildingwith-money-legos-ab63a58ae764.
 Binance, “DeFi #3 – 2020: The Borderless State of DeFi,” [Online]. Available: https://research.binance.com/analysis/2020-borderless-state-of-defi. [Accessed 20 December 2020].