ETHLend Whitepaper - How it brings lending/borrowing to DeFi

ronmaaronmaa
4 min read

Power of DeFi

Decentralized cryptocurrencies has lot of power that normal currencies don't. We are able to transact globally and anonymously. We don't depend on a centralized authority and truly own our money. We can program our money to make interesting transactions. All these give the decentralized finance system an edge over the conventional system. What other powers would we like to have with our money? Lending and borrowing.

Need for Lending and Borrowing

Lending and borrowing is a very useful feature to have. Why so? I will list my reasons below:

  1. It allows lenders who have no better idea to make use of the money to lend and earn interest.
  2. It allows people who believe they will get a value higher than (borrowed amount + interest) if they borrow the amount to borrow the needed amount. I will explain the borrower's part a little bit more: Suppose Google's share price is 100Rs and I have 10 shares of Google.And that's all I have.I have no liquid cash with me. Suppose a need for 500rs arises. Now I have the option to make 500Rs liquid cash by selling 5 shares. But I strongly believe that Google's share price is going to explode and double by the end of the year. In such a case I could make the following contract with a person: " If you lend me 500Rs I will give back to you 600Rs by the end of the year. If I fail to do so,you could take 7 of my Google shares ". And if everything goes as I believed I would save 400Rs All the other types of loans I have seen also works on the same principle.

How ETHLend Works

ETHLend enables users of Ethereum network to lend/borrow Ether in a decentralized way. Let us look at how it is done. But before that we must understand that to setup a successful lend/borrow system we must offer the lender some security. It is very essential because who would lend money if the borrower could simply walk away with that money. So as the "7 Google shares" in our example above, the lender should have something to fall back on incase the borrower defaults. Ok,so now let us look at how ETHLend allows lending/borrowing. As in the Google example above borrowing is essentially a contract between the lender and borrower. So what ETHLend does is, for every loan request a new smart contract is created.The contract created has a variable that stores the current state of the contract.Initially the contract is set to the 'WaitingForData' state. What all data would the contract require?

1.The borrowers address 2.The amount of ether borrower wishes to borrow 3.The loan period 4.The interest he is willing to pay

Is this enough for the borrower's part? No babes. The lender needs security. So the borrower is supposed to provide some. ETHLend asks borrowers to provide ERC20 cryptocurrencies as the collateral. So the borrower is required to enter its details.

5.ERC20 token name 6.ERC20 token smart-contract address 7.Amount of the token to be kept as collateral

After all these data is acquired we need to take hold of these tokens. We can do this by asking the borrower to transfer his token to this contract. The contract thus changes its state from 'Waiting for data' to 'Waiting for tokens'. Once the tokens are transferred, the x number of tokens are now held by this contract . It is now ready to accept a lender and hence it changes its state to 'WaitingForLender' . If a lender is satisfied with the conditions, he can choose to lend the required ether. It works the following way.The lender sends the ether to the smart contract.The contract checks that the received amount matches the requested amount and stores the lender's address . It then sends the received ether to the borrower and stores the current day as the beginning of the loan period. The loan period has begun and now the contract is expecting payback from the borrower. Hence it updates its state to 'WaitingforPayback'. If the borrower is ready with the borrowed amount within the due date, he can make the payback by sending the contract the (borrowed amount + interest ) .If done so,the contract will sent the received ether to the lender's address and also transfer the captured ERC20 token back to the borrower. And the state is changes to 'Finished'. In case the borrower doesn't pay up within the time period.the lender can request the contract to sent him the captured ERC20 tokens. The contract verifies that the loan period is indeed over and transfer the ERC20 tokens to the lender. In this case the state is changed to 'Defaulted'.

Benefits of Decentralized Loans

In the centralized economic system there is a lack of global lending market which leads to wide differences in the interest rate among countries. Brazil had an interest rate of above 30% whereas Europe had it below 5%. A global market would break these geographical barriers. Apart from this,the loan is hassle free and is with wide participation from users would make loans instantly available.

0
Subscribe to my newsletter

Read articles from ronmaa directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

ronmaa
ronmaa