project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Pawn

NFT-Collaterized Lending & Borrowing Platform based on Aave Protocol

Pawn

Created At

LFGHO

Project Description

PAWN provides a peer-to-peer platform to lend and borrow loans in GHO using NFTs as collateral. Borrowers request for desired loans against their NFTs and lenders bid with the minimum interest rates.

Interest rates in PAWN comprise of the GHO interest rate charged by Aave Facilitator and the Premium interest rate which is charged by the lenders. The lenders bid with the minimum Premium they charge.

In PAWN, lenders don't bid for lending the loan, but to be a part of the liquidity pool that lends the loan. In this way, they need not alone provide for the entire loan amount. They bid with the amount they want to cover. PAWN protocol takes all the bids and forms the combined liquidity pool of the desired size and minimum interest rate. In this way, lenders benefit from risk adjustment and borrowers benefit from increased liquidity.

In case of repayments or liquidations (in which case the collateral is auctioned in PAWN), the protocol handles the individual shares of each bid, while the borrower just needs to pay the pool's interest rate. All this is done in the smart contract in a gas efficient manner using multiple techniques.

How it's Made

We used Aave Credit Delegation to delegate and borrow GHO on-behalf of the lenders. During bidding, the protocol borrows GHO and places it in an escrow. Once the bidding phase is over, if not included in the final liquidity pool, lenders can claim these tokens back.

We heavily worked on studying Aave smart contracts and their way of calculating interest rates and decimal precision (WADs and RAYs). We incorporated these techniques in our smart contracts.

For the pool formation logic, we used the bucketing technique used in Uniswap for ticks. We instead did it for premium interest rates. Each bucket would have it's own liquidity and every bid would adjust the pool. We also used bitmasking to iterate over the sparse array of buckets while incurring minimum gas costs.

background image mobile

Join the mailing list

Get the latest news and updates