Lukas K
6 min readFeb 9, 2020

Bank rules defined in code. How decentralized technology is removing the middleman — bank.

Banks have been around for ages offering standard services such as savings accounts to the clients. The way their savings accounts work is pretty simple: banks take your money, lock it for several years and pay you on average 0.05% APR. Meanwhile, they lend these funds to a borrower(e.g. looking to buy a new apartment) with a 3% interest rate or more. Banks usually have huge head-counts, offices to pay for and of course, they pay dividends to shareholders. This is where the difference (2.95%) goes.

In recent years, peer to peer (P2P) lending evolved, as a way to skip the middleman (bank) and lend directly to the borrower. This approach comes with several drawbacks, the main being lack of security — you put your money into several peoples’ loans, without any collateral from the borrower. Some of them will most likely default resulting in delayed payments or loans not being repaid at all. On top of that, you have nothing else but to rely on a platform operator for their individual credit risk score evaluations and maintenance of the whole ecosystem (failing claims, etc.). As a result, we have an ecosystem that heavily relies on people, huge infrastructures and flawed processes. Sometimes, bad apples emerge exploiting these drawbacks. One of the most recent examplesis Envestio’s infamous case with the criminal element involved, where the company is believed to have held approximately €33m (£27.87m) of investors’ funds.

The rise of decentralized technology and true adoption

Blockchain has been around for more than 8 years. However, it only started to gain massive traction during the ICO fundraising rush. Unfortunately, during those times hardly anything sustainable was created and it is hard to feel any substantial progress in the blockchain adoption. However, during the last few years, a new ecosystem called DeFi (Decentralised Finance), which is built on top of the blockchain, began getting traction and market adoption. At the time of writing, DeFi already has over $1B locked the ecosystem. Specifically, DeFi lending projects have $183.3M outstanding debt with interest per year projected to be at $16.4M for the lenders. Everything is built and runs on a public decentralized blockchain, but how does this new ecosystem work?

Compound protocol — a great example

Compound is a set of smart contracts deployed on a blockchain. Basically, it is a list of rules coded and executed by a decentralized network of computers. Therefore, there is no single entity owning/running this set of rules. Compound rules, from a high-level point of view, are pretty simple. There is a pool of blockchain assets (e.g. USDC — a digital dollar on a blockchain) that are supplied by contributors, on the one side. On the other side, you have people who own certain high volatility assets and do not want to exchange it do fiat (standard currency, e.g. euro or dollar), but need to pay bills, salaries or wish to leverage trading and purchase more of a volatile asset. To satisfy those needs, they simply send and lock their high volatility asset, and in return borrow up to 75% worth of stable digital currency (USDC) from the entire pool. The interest rate for suppliers and borrowers is dynamic and is based on the supply and demand principle; if there are many people supplying assets to the pool, then the interest rate goes down and vice versa.

How can it ensure everything the bank ensures?

There a few key characteristics that make it secure:

Lending process. To borrow a certain amount of digital cash, the user has to lock his assets as collateral. The value of assets locked as collateral must be higher than the value he intends to borrow.

Liquidity pool and surplus. The pool operates in a way, that at any given time the people on both sides can leave the pool. This is ensured by a constant surplus of the money in the pool — a so-called pillow. This supply surplus means that the interest paid by the borrowers must be spread across a large pool of suppliers and that the borrowing rate always exceeds the supply rate. Therefore, people at any point in time are able to take the money from the pool without the need for someone on the other side to return their loan.

Liquidation process. If a collateral value is going down and outstanding debt for the borrower is higher than 75% of collateral value, the liquidation process starts: 5% of the collateral is being liquidated to maintain the healthy <75% collateral ratio.

Decentralized control. There is no central computer, server or operator that controls the asset transfers and the whole ecosystem. As the code and assets are on the blockchain, no one is “owning” the platform. So who maintains it? There is a Compound Foundation (recently raised $25 million in a round led by Andreessen Horowitz’s a16z), that maintains the smart contract code, and with the community’s approval sets certain parameters (e.g. maximum interest rate). What if a Compound foundation decides to add some extra fee that goes to them in the smart contract? As the code is public and open-source, if the community is not satisfied with Compound decisions, they could simply copy code, deploy the smart contract, and use it without the fee. Therefore, a Compound foundation must always maintain a healthy relationship with the community and keep their business interests fair.

Where is the catch? Sounds too good to be true?

Of course, there are certain risks involved in the whole process:

Bank run risk. There is a risk of all pool suppliers deciding to withdraw their contributions. In such a case, the surplus would be draught, and for a short period of time, some contributors would not be able to withdraw their funds. However, if such an instance arises, the lending interest rate would increase to the maximum (at the time of writing 20%) and the borrowing rate would increase a lot as well. Such development motivates borrowers to return their loans, and new contributors to come in. During whole Compound history, this (“pillow drain”) happened only once and was resolved in a few minutes

Smart contract risk. As DeFi smart contracts have been actively used only for the last several years, there is still a possibility that bugs are there to be found. However, most of those smart contracts have already been audited by renowned blockchain auditors, such as OpenZeppelin. On top of that extensive stress tests to evaluate Compound’s robustness had been performed by Gauntlet Network.

Your wallet provider risk. To interact with the smart contracts of DeFi, you need to own the Ethereum wallet. You can generate it on your own (your personal computer security, backups lost risk is introduced) or you can use a wallet provider. However, you run a risk of it being hacked, or your transactions being taken over.

How to enter DeFi ecosystem (Compound protocol in particular)

The current (raw) steps you need to take to enter the Compound protocol:

  1. Register within a cryptocurrency exchange.
  2. Make a EUR deposit with your bank account.
  3. Exchange EUR to USDC and to ETH (to cover Ethereum blockchain transaction costs)
  4. Generate Ethereum wallet, copy and store the recovery code.
  5. Withdraw ETH and USDC to your Ethereum wallet.
  6. Initiate USDC transaction to the Compound smart contract.
  7. Success! You are now in Compound. To withdraw EUR to your bank account, you need to go all the way back. Not to forget, you will need to pay on fees for deposit, exchange, withdrawal, and transfer to Compound

Feel free to connect with me on LinkedIn to get more technical insights on Blockchain and Smart Contracts or simply have a chat! https://www.linkedin.com/in/lkairys/

Enjoyed the article? Please let me know that by recommending it to others by clicking CLAP and FOLLOW below!