NFTuloan developed the first fully on-chain DeFi protocol that gives instant liquidity based on your NFT assets.
It will estimate the value of your NFTs to propose ready to be borrowed loans.
It will also generate interest income for participating lenders. Our service can be categorized as a Liquidity Pool-based lending platform.
Challenge
Bringing an instant loaning service for NFTs was not an easy task to complete. Because we haven’t had any existing draft to follow for our implementation. That’s why we made our own after a lot of brainstorming.
The Ethereum EVM compiler also forced us to optimize our source codes to incorporate the exact functions and features which were required to run the system accurately. Another challenge we faced was to reduce the gas consumption required to run everything.
So, to achieve our goals, it required a lot of code rewriting in the smart contract and on our servers.
Crypto movements
Borrowing an NFT for Ethers is a two-way process which works like this:
The borrower will select an NFT from his wallet, and will be given a value and how much he can get in ethers.
The first step of crypto movements will be the transfer of the NFT to our NFT Vault. For that, the platform will initiate a transfer that you will need to acknowledge if you are ready to borrow NFT for ethers
Communication
An important point to make the service run smoothly was to make fault-resilient communication between each entity in our protocol. From smart contract to platform, or from platform to backend service, we took time to create a robust inter-related communication protocol.
Each stage of a loan request is handled by multiple levels of checkups to avoid the loss of any assets and the closing of each loan. Therefore, communication acknowledgements were placed between each entity. These entities are the SmartContract, The Bi-level Web3 API we’ve created, The Front-end platform, the back-end services and the Database.
Staking phazes
Any person, who wants to generate interests from his ethers portfolio, is welcome to use our staking service. So when a user wants to register, as a lender, to this service, a 2-steps process will occur like this:
Funding We call our smart contract to allocate a space for this person. To do that any amount of ethers can be transferred inside the contract. That transfer will count as a registration confirmation for the person to become a lender. Then a set of balances is defined to track all ethers movement within the protocol for any particular lender.
Lenders selection for loan creation Our loaning algorithm was made to select a series of lenders from the pool of ready-to-loan lenders.. The selection is made through a prioritized First-registered, first-in for a loan. Which means we prioritize, at this very moment, the older lenders before the newest ones, to finance a loan. This selection method may change in the near future.
Balances
For the V1 protocol, we use multiple ether balances to manage all activities of lenders. For each one of them, we have created a set of balances. They are involved in loan creation; interests generated tracking; withdrawals handling and another one for idle ethers. This way we can control the flow of ethers more accurately and generate statistics on a lender basis.
Loan termination
There are 2 cases where a loan can be closed, which are:
1/ Loan Payback The borrower (the person who asks for a loan to have ethers) will have a delay to pay the ethers he received. This process is directly handled by our smart contract. If the person pays before the limit date, he will automatically receive his NFT back. And in the same transaction we manage to distribute the interest generated by involved lenders. And we also send back the ether funds they allow to be borrowed from their balances.
2/ Loan to Hotdeal For the V1 protocol, we have set a hotdeal to be a loan which was not paid back in time by the borrower. At that moment, the NFT he has sent to the smart contract will not be its possession anymore. So we will have to place that NFT in our marketplace . And the loan will be renamed a “Hotdeal”.
Lending participants in the loan will be still tagged to receive the ethers they have lent +a commission. When the hotdeal is active in our marketplace, any person can buy the NFT. The price for sale for this NFT will be at least 20% less than from market sites like opensea. So it can be an opportunity for NFT buyers to buy from our marketplace.
When the hotdeal is sold, as the process for loan payback, all lenders involved will be refunded their borrowed ethers, and will receive a commission. Note that this commission will be substantially higher than the commission generated though a loan payback.
Ethers Withdrawal
Any lender has the choice to get his ethers investment back to him. This can be done through a request to our services. However, the ethers won’t be immediately available to withdraw.
We have set a delay of 30 days, after the withdrawal request, to be allowed to get ether funds back.
All this mechanism is managed by our smart contract
NFT Collections estimation
We have set rules for collections selection. This is to avoid proposing fast decaying collections to our users. So we have created an algorithm to select a collection appropriately and to also know at what price we can propose an NFT to be lent.
The calculation is proprietary but what we can say is that we have 6 different criterias to tag the price of a collection.
The calculation is done multiple times a day to assure the right price for borrowers