DEV Community

CP for The APIS

Posted on • Updated on

DeFi Basics: DeFi Rates API

Alt Text

What is DeFi?

Decentralized Finance, a.k.a. DeFi, refers to the financial products built on top of a blockchain.

How it works?

In traditional finance, there is a centralized authority approving transactions. There are two checks for each transaction: make sure it is not overspent, and make sure it is not double-spent.

Blockchain takes care of both checks programmatically, allowing transactions to go through without any centralized authority, a.k.a. the middleman.


In traditional finance, the middleman takes a fee for the transaction. In DeFi, the blockchain takes a transaction fee (a.k.a. gas fee) to pay for the cost of computing power used to handle the transaction.

Decentralized P2P Lending

(Disclaimer: NOT an investment or trading advice.)

A blockchain account is anonymous, therefore, there is no information to underwrite risk. The P2P lending on blockchain uses the secure-lending model--to borrow $100 assets requires > $100 in collateral. The more volatile the cryptocurrency, the more collaterals are required. Typically, to borrow $100 worth of Bitcoin, the lender will require the borrower to maintain $200+ in collaterals. If the value drops to a threshold, the borrower may have to add more collaterals or risk liquidation.

The over-collateralization reduces the use case and money efficiency. Mostly, the borrowers are traders who want to increase their exposure in positions.

In the traditional trading world, borrowing for margin trading costs about 8-9% and the rates are more volatile with the cryptocurrencies. But there are companies offering 6-8% for locking your cryptocurrencies as collaterals. That is a way higher than the yields offering by the traditional banks. (Note: higher rates usually reflect higher risks.)

What is TVL

All the collaterals that are "locked" in a lending or any DeFi protocol are considered as the "valued locked" in DeFi. TVL = Total Value Locked, which is at $22.65 billion USD for all tracked projects on defipulse.

DeFi rates

DeFi rates from the lending platforms fluctuates. It depends on the kind of cryptocurrency, the lending platform, and obviously the market volatility.

The APIS project allows you to retrieve the DeFi rates with one simple GET API call. You can just click on the link to view the rates with your web browser, too.

You can also view the rates published daily on Twitter.

To learn more about how you can build on top of any blockchain using the APIS project, please check out the developer site, or PM me on Twitter

Discussion (0)