Inspiration
Even if you own a rare and valuable NFT token, it is very hard to use it as collateral for a loan with currently available protocols. The main problem is that the value of an NFT is hard to be determined and predict over time. What is the current value of this NFT? What could the value be at the end of the loan?
What it does
We designed a simple protocol in which a user can request a loan by sending an NFT to a smart contract specifying all the lending conditions. On the other hand, users can see a list of "loan requests" and evaluate by themselves both the value of the NFT locked in as collateral and the goodness of the lending conditions. In case the loan is fully repaid on time including the interest fee, the applicant can get back his NFT, otherwise, the liquidity provider can redeem the NFT that was put as collateral.
How we built it
The project has been built using Hardhat. Smart contracts have been developed in Solidity. The web application has been built in React using Chakra UI as a design system.
Challenges we ran into
Finding a way to calculate interests has been challenging. We found a library that helped a lot. Smart contract optimizations for reducing gas fees have been challenging as well. We used some techniques to efficiently work with arrays. Another challenge is related to loan repayment. In particular, since the interests are computed live, they are subjected to increments during the transaction delay. To avoid that, we had to force the user to send a transaction with an extra amount. The difference between the amount to be paid that is calculated in the exact moment in which the transaction is mined and the amount that has been effectively sent, is sent back to the user.
Accomplishments that we're proud of
The protocol looks solid because it doesn't require any oracle for NFT evaluation and it is fully managed by the users.
What we learned
Giving control of the whole flow to the user's hands make the UX a little bit more complex, but it can create a prediction market and help the community to better evaluate NFTs.
What's next for LoaNFT
The first step is to extend the protocol by supporting payments in ERC20 and add a platform fee. After that, it is possible to create a mechanism that is similar to liquidity pools in which more people can invest their money in a loan they consider profitable and have a share of the interest rates. To proceed with this implementation a mechanism to split the ownership of an NFT across all the participants in case of the loan is not being repaid must be designed. A possible solution could be a DAO with a voting mechanism that allows placing NFTs on sale at the price the majority of the holders voted on. Another interesting idea for the future is to create auctions in which the liquidity providers that offer the lowest interest rate win and can start the loan flow.
Log in or sign up for Devpost to join the conversation.