Today we are going to talk about decentralized finance, also called DeFi, and explain what is it, how can you benefit from it and everything in detail.
What is DeFi?
The term DeFi is an abbreviation for decentralized finance. It is a new concept used to refer to a movement originating from within the Ethereum community, which aims, through the use of blockchain technology, to transform traditional financial products into transparent, censorship-resistant, globally accessible, and intermediary-free protocols.
We can imagine the DeFi movement as an open financial ecosystem, allowing anyone to create their own instruments and services in a decentralized manner. Being open-source applications programmed on a public blockchain, they can be combined, adapted, and integrated according to specific needs, in an agile and simple way.
The main components of the DeFi ecosystem are:
- Digital assets: protocol-native tokens, tokens representing a stake in a liquidity pool, non-fungible tokens representing real-world assets – e.g. shares in a real estate property.
- Smart contracts: autonomous computer programs that automatically execute the clauses of a contract, between one or more parties, in the event of the occurrence of a set of conditions established in advance.
- Decentralized protocols and applications (Dapps): we can imagine it as a set of pieces of financial software, programmed using the smart contracts of a blockchain -mainly Ethereum, although not exclusively-, which can be combined with each other to create more complex products and applications.
History of decentralized finance
Over the past centuries, the monetary and financial structures on which our societies rest have evolved into models in which blind trust in third parties is increasingly prominent. Citizens trust that their government will not print more banknotes than necessary and unleash an inflationary crisis -reducing the value of their savings-, they trust the responsibility of banks in the custody of their funds -often accumulated after a lifetime of hard work-, and they also trust, in the case of deciding to grow them, in the judgment of professional financial advisors.
As we can see, at all times we are handing over control of our money to third parties who are dedicated to managing the existing circulating supply, who takes custody of it, or who invest it on our behalf in order to generate a return for us.
Unfortunately, we have seen how often the trust that societies place in these financial institutions is betrayed: just look at what happened in 2008 with the subprime crisis and the crazy monetary issuance that followed – the now famous Quantitative Easing. The result is that only a fraction of the returns generated by the risks taken by the major players in the international financial system is returned as profit to the ordinary citizen – while often, as happened during the Great Recession of 2008, the losses from the collapse of the markets are socialized in an unfairly equitable way.
Bitcoin and the other cryptocurrencies of this first batch – with a scarce and limited monetary mass – would offer users the possibility of having a kind of “bank account” totally controlled by them, as well as a peer-to-peer value transfer system, resistant to censorship, “trustless” – it does not require trusting intermediaries – and global in scope. Cryptocurrencies would represent the decentralization of the issuance and custody of the money. The analogy of the “bank account” without central authority should be understood in the sense that users will have absolute control over their own assets.
The idea of replicating traditional financial instruments through the use of blockchain technology would be the next step in this process of transformation -decentralization- of the international financial system. Its great revulsive would be the launch of Ethereum -the first smart contracts platform- in July 2015.
Ethereum would maximize the potential of blockchain for the financial industry. The enormous flexibility -from a programmability point of view- of smart contract platforms would be key to the launch of projects -protocols- that would constitute the germ of a decentralized financial ecosystem. Ethereum’s architecture would not only facilitate the programming of such protocols, but also the raising of funds for their development, through the famous ICOs.
Thus, the DeFi ecosystem is but one more step on the road to building a new parallel financial system, open to everyone, and which aims to minimize the intervention of intermediaries or reliance on central authorities – hence the concept of “trustless” that we have previously introduced. DeFi-type protocols allow users to access, without any kind of restriction, open credit applications, investment platforms, and token issuance -ICOs-, predictive markets, decentralized exchanges and stablecoins, tokens that anchor their value to that of some real-world currency.
Obviously, this first generation of DeFi applications would present some limitations: above all, complexities from a UX point of view for the user, as well as the need to rely on collateral requirements as a safeguard. This means that the user, on the one hand, will need to have some knowledge of how the Ethereum network works – for example, the need to pay Gas in ETH for each transaction; and on the other hand that crypto will need to be available beforehand in order to meet the collateral requirements that some DeFi apps pose – for example, to take out a loan on Compound.
These obstacles would not, however, prevent the DeFi ecosystem from becoming one of the fastest-growing crypto sectors – one of the ways to calculate such growth is through the amount of ETH locked on deposit in one of its applications. At the moment, the value of cryptocurrencies deposited in smart contracts of this type is estimated to be around $800 million.
To achieve decentralized systems of infracolateralized borrowing and lending – that is, more akin to those of traditional industry in terms of capital requirements – self-sovereign identity mechanisms must first be implemented, which preserve one’s privacy, but allow users to demonstrate their creditworthiness – for example, through new credit scoring formulas.
As of today, we have wallets like Argent wallet that are taking the UX-type problems that current DeFi apps present for users with zero knowledge of Ethereum very seriously. If the first generation of Dapps were created by blockchain enthusiasts for blockchain enthusiasts, Argent, Outlet Finance, Fortmatic, Authereum, and Torus – among other projects – are prioritizing ease of use to make the DeFi movement popular.
It is likely that in the future, wallets will become widespread as a gateway to this new Internet of Value – in the same way as browsers have been for Web 2.0. And each user will use a control panel that not only shows the assets he or she owns, but also the positions opened with them – deposits in lending protocols, liquidity pools, and insurance policy-type contracts.
We are already seeing how numerous DEX or stablecoin-type intermediate protocols -such as Kyber Network or MakerDAO-, which started with centralized working structures, similar to those of traditional companies, have begun processes of gradual decentralization of their governance and decision-making. It should be noted that many of these DeFi projects have “master keys” that allow developers to stop the service or disable Dapps. Despite advocating total decentralization of financial systems, they are still highly experimental projects, which until they have been extensively tested may present bugs that put users’ funds at risk.
We can imagine the “master keys” as an emergency button that, in the future, once the stability of the code and the ability of the protocol to cope with high-stress situations have been confirmed, will be destroyed – which will mean that no one will have the ability to intervene in the processes, and they will be truly autonomous and uncensorable financial ingenuities.
One of the mechanisms being explored by DeFi-like communities to decentralize governance processes, allowing native token “holders” to participate in the votes where any protocol-related issue is decided, are DAOs – Decentralized Autonomous Organizations.
In short, this is an exciting, foundational period. Cryptocurrencies represent the emergence of the concept of digital scarcity and of monetary forms native to the Internet. Never before have human beings been faced with the possibility of using such efficient, democratic and global economic coordination mechanisms. The programmability of money opens up a horizon of unsuspected possibilities.
Features of DeFi
Most DeFi protocols are hosted on the Ethereum blockchain, because it is the most popular platform for smart contracts.
Ethereum is a distributed network, based on blockchain technology, which serves as an accounting ledger for recording balances and transactions of digital value. Network operators – nodes – receive an economic incentive for their work in the form of a native token – Ethereum or ETH – the issuance of which is not controlled by any central authority.
The interesting thing about Ethereum as a smart contract platform is its enormous expressiveness. By functioning as a complete Turing machine, Ethereum allows the writing of programs that support operations of completely arbitrary logical complexity. Thanks to this, developers can create tokens with different types of embedded properties, as well as protocols and Dapps subject to autonomous contracts or agreements, whose clauses are automatically executed when a series of conditions established in advance by the participants are met. All this without the need for intermediaries or a central authority to coordinate or arbitrate disputes – responsible for this in Ethereum is a consensus mechanism tolerant of Byzantine faults.
Decentralized Finance has the opportunity to transform the traditional financial system’s stiff structures, making it much more friendly, transparent, accessible, and, at the same time, resilient – thanks to less opacity and the fact that it can be auditable in real-time.
Anyone with an Internet connection, from any corner of the world, can be “banked” quickly and for free via an Ethereum account. And one of the advantages of DeFi protocols and applications is that they are based on open source and interoperable smart contracts – so the system is not only advantageous from the user’s point of view, but also for entrepreneurs who want to start new projects in the field of finance, with very few resources. The fact that the code and repositories of these DeFi projects are auditable on-chain in real-time, allows the community to identify which services are legitimate and which may pose a threat – so these are win-win scenarios for all involved.
Differences between DeFi protocols/applications and traditional finance
In the traditional financial world, services and products are generally designed and offered by companies, and managed by their employees. In the case of the DeFi ecosystem, on the other hand, we find autonomous protocols programmed by code-smart contracts. Once the smart contract is deployed on a blockchain, the financial operations that the application executes require no – or very little – human intervention – we mentioned earlier that developers often maintain certain firewalls to be able to solve problems related to bugs, or simply to update the application until it reaches a certain degree of maturity.
The operations of many financial institutions are opaque because that is precisely where their business lies – in the fact that they do not share their strategies or know-how. In the DeFi ecosystem, we find protocols and applications whose code is transparent – meaning that it can be audited at any time. This generates a new type of trust with the user community, who can also participate in the economic success of the product by acquiring tokens that represent “shares” in it.
Everyone has the opportunity to analyze the functionality of the smart contracts, search for bugs, study the transactional activity – without affecting anyone’s privacy, given the pseudonymous nature of the Ethereum network – as well as become “pseudo-shareholders” – entitled to receive a proportional part of the commissions generated by the application according to the number of tokens owned, and, sometimes, to participate in the decision-making processes by voting.
While the traditional financial system is eminently national in nature – the most attractive markets are constrained by regulations that often limit access to foreigners, or even discriminate against nationals based on their income, under the argument that this protects them – the DeFi protocols have been designed to have a global reach from the day they are launched. It doesn’t matter whether you live in Germany or Bangladesh, and there is no “accredited investor” category. Everyone will be able to access the same services – this doesn’t mean that these are illegal applications, technically local regulations can affect the “front end” of a protocol – as we saw happen with Uniswap – but in general, the operation will be accessible in one way or another by anyone with an Internet connection.
The previous point ties in with the non-permission nature of public blockchain networks – by primarily using Ethereum as a foundation, DeFi applications benefit from this attribute. There are no regulators telling you what you can and cannot create, no cumbersome bureaucratic processes to access services as a user. The latter will simply have to download a wallet, deposit a little ETH, and they will be able to start interacting – directly, without intermediaries – with a whole ecosystem of decentralized financial applications.
An ecosystem that benefits greatly from its interoperability – meaning that applications can be assembled in a modular way, adding protocols designed for specific functions, as if they were lego pieces. This property of DeFi smart contracts is referred to as “composability”.
In addition to this, there is enormous flexibility from a UX point of view. If you don’t like the graphical interface of a particular dapp – but you do like its functionality – you are likely to find alternatives that use the same base protocols and therefore offer exactly the same services. If not, you will always have the option of creating your own front-end quickly and easily – and in the end, the smart contracts in charge of the operational logic of the DeFi ecosystem are something like APIs that allow anyone to create their own application.
The decentralization spectrum
When talking about DeFi, the concept of “decentralization” tends to be abused, without taking into account that this is not an absolute category – it is part of a spectrum. DeFi protocols have varying degrees of decentralization because not all components of an application can or should be completely decentralized.
Take, for example, the case of stablecoins – stable currencies linked to the exchange rate of a traditional currency – one of the most popular products in the DeFi universe. There are many types of stablecoins, and not all of them are as decentralized as DAI – the stablecoin collateralized by ETH and other currencies, issued by the MakerDAO protocol -, nor do they need to be. Each stablecoin presents a unique value proposition, which will depend on a series of decisions at the technical and economic design level – decisions that will involve optimizing certain aspects, at the expense of others. $USDC, for example, is a popular stablecoin issued by Circle, which is backed by fiat money deposits – this means that for every unit of $USDC, there will be a dollar deposited in a bank account somewhere. Obviously, $USDC will not be as censorship-resistant a stablecoin as DAI – the bank deposits backing it can eventually be confiscated, unlike ETH – but by contrast, its design is vastly more scalable – it is easier to deposit dollars into an account to issue a stablecoin than it is to open collateralized debt positions with 150% ETH.
But the tokenization capability of the DeFi ecosystem is not limited to stablecoins tied to the dollar exchange rate; any real-world asset is amenable to being digitally represented on the Ethereum blockchain. The problem with these non-fungible tokens is that while they can be stored, transferred, or traded, they do not eliminate the need to manage the asset physically or legally in the real world. Someone could tokenize the rent for an apartment, deposit the tokens representing it on a decentralized exchange like Uniswap, and allow investors to purchase them. But without a proper legal framework – a lease, an account that receives payments from the tenant each month, and a registry that links the rights to that rent to the tokens – it will be a sterile investment, and buyers will not be able to go to any court of law to claim their rights in the event of a dispute.
So while the premise of the DeFi ecosystem is to provide financial empowerment tools for the ordinary citizen, wherever they live and whatever their economic status, we must understand that the movement has not arisen in a vacuum – there is a legal framework and situations where it will need to be incorporated in one way or another, especially as the tokenization of real-world assets accelerates.
The DeFi ecosystem is made up of many types of protocols and applications, some of which share features with traditional finance instruments, but eliminate the need for intermediaries, centralized asset custody, and geographic restrictions.
DEX: Decentralized exchanges
A DEX is a cryptocurrency exchange, which instead of using an order matching engine hosted on a central server, is programmed using smart contracts – which are responsible for executing and settling trades, using the blockchain as an accounting ledger. Unlike what happens in a centralized exchange such as Coinbase or Kraken, in a DEX there is no operator, no registration and identity verification processes are required -unless security tokens are involved-, nor is there a custody service -the user has permanent control of his funds through the private key.
DEX protocols are divided into two types: those based on order books -and often process part of the orders off-chain- and those that use a model called Constant Product Automatic Market Maker -instead of using order books, there are liquidity pools that determine the price algorithmically with a constant equation. This second type of DEXs has become very popular, as it is very convenient for executing simple token swaps, allows anyone to become a liquidity provider and put their capital to work, and because all trading occurs on-chain – which is a must for other protocols that need a source of liquidity that respects the atomicity of trades.
Among the most prominent exchanges of this type – although each with its own specificities – are Kyber Network, Uniswap, and Bancor. The Automated Market Making mechanism consists of two smart contracts and allows trades to be automatically settled very close to the market price – obviously, depending on the size of the order and the liquidity pool.
Among the DEX-type protocols that use order books -and perform part of the off-chain trading- we can highlight 0x and Loopring -the latter allows anyone to set up their own DEX by using zk-snarks, a layer 2 technology that allows scaling the number of transactions processed per second in a very remarkable way.
Stablecoins are a fundamental piece of the DeFi ecosystem, due to the enormous volatility to which Ethereum’s native currency is subjected.
A stablecoin, by definition, is a currency designed to stably hold a certain value – generally, they are pegged to the price of traditional currencies, such as the dollar or the euro. There are different types of stablecoins: some are backed by fiat money deposited in a bank account, others use algorithms to automatically expand or reduce the money supply to control the anchor, and finally, we have stablecoins collateralized by cryptocurrencies.
MakerDAO, one of the oldest projects in the DeFi ecosystem, has adopted this third approach. Its goal is to issue a stable coin called DAI, anchored to the dollar price and collateralized by ETH and other cryptocurrencies – as of today BAT and USDC, although new additions are expected soon.
The process of creating the currency involves opening a CDP – a collateralized debt position. It consists of depositing ETH -or BAT or USDC-, to mint and withdraw a maximum amount of DAI -which will be determined by the collateralization percentage required for each asset, in the case of ETH, it is 150%. When a user wants to close his CDP to recover his collateral, he will have to return the issued DAI -which will be destroyed- and pay a small interest fee -Stability Fee.
The advantage of these types of stablecoins is that, because they have no bank deposits to back up their value, they are highly resistant to censorship – a judicial authority can freeze the funds in a bank account, but not the ETH deposited in a MakerDAO CDP.
Lending -the granting and taking of cryptocurrency loans- is probably the sector of the DeFi ecosystem that is growing at the fastest pace. Like bank savings accounts, a user can deposit their crypto and generate a return, from the interest paid by those who borrow.
But unlike traditional finance, lending protocols do not require a central authority to act as an operator, but rather smart contracts to execute the transaction. Early lending protocols used peer-to-peer models – such as ETHlend, where smart contracts matched the lender and borrower. Today, a model similar to Uniswap’s – with liquidity pools and no order books – but adapted to the specificities of lending has taken hold. An algorithm dynamically adjusts interest rates based on the supply and demand of each asset. Compound and Aave – an evolution of ETHlend – are the most prominent protocols of this type.
Protocols such as dYdX, which are a hybrid – they implement lending options but are specifically focused on margin trading and perpetual swaps – deserve special mention.
DeFi protocols and applications have reached such a level of sophistication that they even allow the issuance of synthetic derivatives. A derivative is a contract that derives its value from the price behavior of an asset called the underlying – which can be an index, a commodity or anything else. Whereas a synthetic is a financial instrument that simulates the return/risk profile of any financial instrument – through one or more derivative contracts.
Synthetic cryptoassets that emulate the price of commodities such as gold, traditional currencies such as the dollar or indices such as the SP500, use other cryptocurrencies as collateral. The most prominent platforms or protocols of this type are Synthetix and UMA.
Predictive markets are markets that speculate on the outcome of any event that can be objectively verifiable a posteriori. In the end, they would be something like a set of people creating a market and placing bets on presidential elections, sporting events, commodity prices, or anything else you can think of.
In essence, predictive markets are like an event derivatives contract, the price of which will tend to reflect fairly accurately the likelihood of it working out in one direction or another – so, as the name implies, they are sometimes used as a predictive tool.
Thus, the possible outcomes of a predictive market will always trade between 0 and 1 – with 1 representing the absolute certainty that the event will resolve in that direction, and 0 the absolute certainty that it will resolve in the opposite direction. The most prominent protocols of this type are Augur and Sight – from Gnosis.
New emerging categories
Every day new categories of protocols and applications emerge in the DeFi ecosystem, some completely unheard of.
One of the ones that have generated the most traction lately is PoolTogether, a lottery in which participants have a chance to win, but never lose. The operation is very simple: users deposit MakerDAO’s DAI stablecoin into a common pot, which is placed to generate interest in the Compound lending protocol. At the end of each period -two weeks- a draw is held and a winner is chosen, who gets back the DAI deposited plus the interest generated by the common pot in Compound. The rest of the participants will simply recover their DAI -that is, the only cost they will face is the opportunity cost of leaving their capital paralyzed in PoolTogether, instead of generating interest elsewhere.
Another field that is in full swing in the DeFi ecosystem is that of risk “hedging” – be it in relation to price fluctuation, or of a technical nature. Hedging means paying a premium so that, in the event that our position is affected by a sudden price change – as a result of an increase in market volatility – or is the victim of a hack – due to a failure of the application where the deposit is made – we do not suffer any loss of funds.
There are basically two approaches to this phenomenon:
- Mutuals: these are protocols that follow the model of mutualized insurance cooperatives, but adapted to the new times thanks to blockchain technology. They mainly act as hedges for cases of hacks that are due to technical failures -bugs in smart contracts- in protocols and applications. The most prominent example of this type of proposal is Nexus Mutual, a mutual that only sells coverage for losses arising from bugs in smart contracts. Nexus Mutual uses a system similar to that of Uniswap, with liquidity providers that get back the surpluses generated from the sale of hedges.
- Options: the other model works like traditional options. If you believe that your portfolio may be affected by high volatility and a fall in price, you can buy a put option -paying a premium- that guarantees you a strike price regardless of the spot market price at the time of expiration of the contract. The most prominent example of this second hedge variant are Opyn and Hegic.
The interesting thing about all these applications that are currently flourishing in the DeFi ecosystem is that they do not operate as silos. They are not watertight protocols, but similar to the blockchain they are hosted on Ethereum.
This means that you will be able to put together several of these protocols -as if they were pieces of Lego- and build with them complex applications that will involve different types of operations. Imagine, for example, a transaction involving a swap, followed by a deposit in a lending protocol that earns interest on the principal – these are two separate transactions, of course, but the “composable” nature of the DeFi ecosystem will make the end-user perceive them as if they were one.
cDAI, the token that DAI depositors in the Compound lending protocol get as collateral for their deposit, is a perfect example of a “Money Lego” in action:
On the one hand, DAI – which is the stable coin generated by the MakerDAO protocol through debt positions collateralized via ETH – will intervene. DAI tokens will be deposited in Compound through the interface of that protocol or any DeFi wallet or aggregator that integrates it. The compound will issue an amount of cDAI tokens – stable as DAI, but interest-bearing – proportional to the principal deposited, and automatically, these can start to be traded or used as collateral in other protocols or applications.
This property of the DeFi ecosystem – composability – bodes well for its future. Not only does it facilitate and speed up the protocol design/deployment process for developers, but, more importantly, it also makes it possible to abstract all complexity at the user experience level, allowing sophisticated financial products to become retailer-friendly applications.