Demo video: https://www.youtube.com/watch?v=19qQuqAtNQE
Jina dapp is an NFT collateralizing app on Algorand. Use any NFT you hold in Algorand as leverage for borrowing stable coin in Jina. Leveraged NFT remains locked in your (borrower) address until the full loan amount is repaid, which is a pure non-custodial transaction. Assets(NFT) that require KYC or special permissions might benefit from this pure non-custodial protocol.
With a 3% return for liquidity providers that supply liquidity to the protocol, Jina becomes the go-to site for delivering liquidity for NFTs. Liquidity providers will keep their liquidity asset in their account until a borrower uses it, at which point the protocol will reward them with an I-O-U stable-coin token plus 3% of the lent amount.
First step is to optin to the smartcontract.
Transfer your NFT's admin address to Jina. This will make your NFT leverageable for taking loan in Jina dapp.
- Set manager and freeze admin address to Jina smartcontract
- Set clawback to liquidator smartcontract
Optin to the I-O-U token of jina dapp JUSD, that has 1:1 value with USDCa.
Choose which NFTs can borrow from your account.
- Set maximum amount you are willing to lend.
- Set expiration date for aggrement.
Use your NFT as collateral, to borrow USDCa stablecoin.
- Set which NFT you want to collateralize
- Set amount of collateral
- Request loan You'll get requested loan amount in USDCa and your NFT will be locked.
Send USDCa to Jina contract. Your loan amount state will be decremented by sent repaid amount.
If you pay the full loan amount, your collateral assets will be unfrozen.
Send JUSD(I-O-U token of Jina contract) to Jina contract. You'll receive a 1:1 USDCa for the JUSD you send.
We plan on releasing this project on mainnet.
- Go to Jina frontend and deploy the web interface.
- Optin to Jina contract.
- NFTs used as collateral are frozen in account, only when account takes out loan.
- Frozen NFTs are unfrozen when full loan is paid back.
- There is no interest rate for borrowing USDCa.
- A 3% fee is paid to take out loan.
- Lenders sign a delegated logic signature to allow any account to withdraw USDCa that fullfill the following:
- Calls Jina contract
- Withdraws atmost staked amount
- Any account that holds JUSD can claim 1:1 USDCa by sending the JUSD to Jina contract.
- Borrower can borrow from upto 4 lenders
- Liquidation
How liquidation happens?
- Specify the addresss to liquidate
- Pay 95% of collateral's value to Jina contract
- Set an account that will receive the liquidated asset
- You'll be sent the collateral to the address you specified
There are two smartcontracts that power Jina dapp.
-
Jina Contract Jina contract holds the state machine and locks/unlocks NFT in account (freezes/unfreezes NFT) . State machine, tracks:
xids
tracks which NFT is used as collateralcamt
tracks how much collateral is used for loanlamt
tracks how much loan is borrowedaamt
tracks how much loan is available from lender address
-
Liquidator Contract Liquidator contract reads current price of NFT from oracle and if loan is more than 90% of collateral it liquidates the NFT locked.
- liquidator contract is the clawback address of leveragable NFTs on Jina.
- after liquidation completes the remainig asset is unfrozen. This is possible by AVM 1.1 (contract to contract call). Liquidator contract calls Jina contract to unfreeze the asset.
Discord @1egen#0803 Discord @3spear#9556