The Problems That Are Solved Using The AAVE V2 Protocol and The Covalent API

The blockchain has been a blessing to us since the introduction of bitcoin in 2008, and has evolved greatly in diverse ways, opening new doors in its wake. It has then been applied in different fields; from medicine to finance, governance, gaming, lending, identify security and so on. All these were made possible by the DeFi explosion on the ethereum blockchain and other emerging blockchains alike.

Due to high usage and adoption, the data on the blockchain has become enormous and rarely follow any standard; these data when harnessed and streamlined, can be used in various cases to better the DeFi ecosystem and the general public as well. In this article, I’ll be discussing the problems that can be solved using the AAVE V2 Protocol and the Covalent API

The Aave V2 Protocol

The Problem Aave V2 Solves.

In the initial V1 release, the protocol loops through all the active assets to identify the user deposits and loans. This would result in high gas consumption and reduced scalability - as the cost of withdrawing/borrowing/repaying/liquidating assets would increase as more assets are listed on the protocol. This was solved in the v2 protocol by creating a bitmask with pairs of bits; where one pair indicates if an asset is used as collateral, while the second whether an asset is borrowed by the user.

2) Lending and Borrowing Made Easy

Lenders provide liquidity by depositing cryptocurrencies in a pool contract. Simultaneously, in the same contract, the pooled funds can be borrowed by placing a collateral. Loans do not need to be individually matched, instead they rely on the pooled funds, as well as the amounts borrowed and their collateral. This enables instant loans with characteristics based on the state of the pool. The V2 allows users to swap all assets deposited to the protocol even when they are used as collateral. Say I deposited UNI and ETH, which I’ve used as collateral for the loan I borrowed, I can trade them for DAI or USDC anytime in the protocol; this reduces liquidation of positions on the protocol. Also, users can now pay their debts with any asset they’re holding on the protocol. How smooth and simple can it get? Anyone in any part of the globe can borrow assets instantly without intermediaries or barriers due to location. New start-ups are being empowered with capital for their projects. Lenders on the other hand earn huge returns from the pool by providing liquidity through the automated yield farming.

3) Transparency
When it comes to lending and borrowing in centralised finance (CeFi) in the real world, trust, transparency and reliability has always been a major issue both for the financial institution and the borrower. The V2 protocol allows users to interact with a smart contract where the rules have been predefined an immutable. For example: The interest rate for both borrowers and lenders on V2 is decided algorithmically; that is —

• For borrowers, it depends on the cost of money - the amount of funds available in the pool at a specific time.

As funds are borrowed from the pool, the amount of funds available decreases which raises the interest rate.

• For lenders, this interest rate corresponds to the earn rate, with the algorithm safeguarding a liquidity reserve

to guarantee withdrawals at any time.

This rule will remain unchanged as long a s the blockchain runs, no matter the amount of loans a user takes. This is not possible in centralised finance where the terms of the loans are subject to review.

4) Tokenisation of Depts
Borrowers' debts are represented by tokens (aTokens) in V2 instead of internal accounting within. Once a deposit is made to the protocol, the corresponding aToken starts minting and accumulates interests on the deposit. These aTokens give credit to the depositor to borrow; this credit can be transferred to another wallet different from the on the contract, this can be a cold wallet or a hot wallet. For example, Mr A made can make a deposit and transfer the credit to borrow to the wallet of Mr B. This is only possible with DeFi, Aave V2 to be specific. Also, these tokens can also be used for delegation for approval of undercollaterised loans. Users can take undercollateralised loans as long as they receive delegation from other users that provide collateral. Awesome, right? Aave V2 has taken a huge step in solving liquidity problems in start up and the likes.

5) Providing Uncollaterised Loans
This is made possible through flash loans. Flash loans are the first uncollateralized loan option in DeFi, made available only by the Aave protocol! Designed for developers, enable you to borrow instantly and easily, no collateral needed provided that the liquidity is returned to the pool within one transaction block. It allows users to borrow assets in the protocol use the loan and payback with the interest in a single network transaction. This provides users with a variety of tools such as refinance, collateral swap, arbitrage(price differences on different platforms) and liquidate.

COVALENT API

The Problems that The Covalent API Solves

2) Speed
Covalent API has a refresh rate of 30 seconds. Any call made on the API produces returns almost immediately. Covalent can be seen as a network of its own with all its data available on a single click. Data which would normally take a developer more than one week to acquire will only take few seconds (sometimes Milli seconds) to obtain with the unified Covalent API. Say you want to get token balances for a wallet address, this will display almost immediately as an output also with this amazing speed, the API produces accurate results.

3) No-Code Solution

Covalent philosophy is "no-code solution" which is the future. Developers don’t have to be code masters to use the Covalent API. the APIs are simple, easy to run and user friendly so that anyone will be able to use it, thus increasing the target audience. The Covalent team spent years copying the entire blockchain— every block, every transaction, every log event, every bounce update to a database; then users only need to create a pivot table on top of the base layer database to access this robust data. So all you need to do is build you dApps and integrate the API.

4) Blockchain Integration
Covalent innitally was indexing only data on the ethereum blockchain but has lately expanded their broadband to other networks. As more dApps and users partner with Covalent or use the API, more data is being stored on the covalent API, making it more rich. Recently, they partnered with Matic and now a user can switch from ethereum blockchain to Matic and BSC using the "ChainId" Command. Also there are other networks that’s been integrated into the Covalent API, there will be an official announcement for this. As more developers are going multichain, the Covalent API is the best tool for indexing and connecting with the network you need.

5) NFTs End chain
The data in the NFT space is a mess and a bit complex, it’s unlike anything else on the blockchain. The data is quite difficult to streamline. Ethereum don’t have a storage layer for NFTs, so all the NFT metadata is stored off-chain in all kinds of random places making it inconsistent. Covalent had to get all these data and index them in one place; now a user can get NFT balances and all the transactions and historical data for a wallet address from genesis in wasp speed. There’s a lot more that can be done with the Covalent NFT endpoint! Also, the NFT and the DeFi merging which bring liquidity to NFT basket is another solution that the Covalent API can produce.

6) Transparency

With all the data on ethereum and other networks indexed onto a unified API, all transactions, historical records of a wallet or exchanges (DEX or CEX) can be seen by just a single call on the API. Developers and users can keep track of assets (tokens or NTFs), wallets and other dApps. Every single DeFi transaction is a taxable event, Covalent calculates liabilities for the biggest funds in the crypto-space. The rich data structures of Crypto networks which are currently inaccessible without a tool like Covalent can now be accessed.

Conclusion
These protocol and API discussed herein are awesome and powerful tools for both developers and end users inside and outside the DeFi ecosystem they've paved way for greater development in the DeFi ecosystem most especially. A lot more problems than the ones mentioned in this article can be solved with them, expect more.

Crypto enthusisat