The Lava Loans Protocol (v2) is a plan designed by Lava, constructing on Discreet Log Contracts (DLCs) to facilitate a dependable, collateralized Bitcoin lending system. The huge implosion out there’s final cycle, brought on by centralized platforms facilitating Bitcoin-backed lending, confirmed that such services, if left unchecked, may pose an enormous systemic threat to the whole market within the ecosystem.
Lava goals to serve the identical customers of such centralized platforms in a decentralized and atomic method, utilizing DLCs.
DLCs are, for these unfamiliar with the idea, a wise contract designed to settle in a sure manner relying on the result of an occasion outdoors of the Bitcoin protocol, i.e. the worth of Bitcoin, the result of a sporting occasion, and so forth. That is completed by relying on an oracle, or a collection of a number of oracles, to signal a message confirming the precise end result of the occasion in the true world. These signed messages are used as the idea for adapter signatures that unlock particular pre-signed transactions that deal with the contract in a sure manner.
The benefit of DLCs is that they are often completed privately. So long as the oracle(s) publish the keys they may use to signal outcomes for particular occasions at particular occasions, any consumer can use that data and assemble pre-signed transactions to settle appropriately based mostly on the vary of doable outcomes with out the oracle ever figuring out {that a} contract exists. The oracle merely broadcasts the signed message publicly on the acceptable time, giving each customers all the data essential to correctly full the contract.
Lava is designed to leverage a customized variant of DLCs, along with stablecoins on different networks, to allow a bitcoin-backed mortgage that may be entered into atomically and with out belief (i.e. guaranteeing that the lender has no management over can get bitcoin with out releasing the bitcoin). management of the stablecoin to the borrower).
Instantiation
Financing the DLC is a two-step course of within the Lava Protocol, given the requirement that the stablecoins given in trade for the collateral captured within the contract should be atomic. Within the first part, the borrower creates a script that enables them to reclaim their coin after a time slot, or permits the lender to finish the financing with a hash preimage and signature of the borrower. They then signal a transaction that strikes the cash from this assortment deal with to the DLC. The lender then exchanges a hashlock to be used later within the protocol with the borrower.
From this level on, the lender should fund an identical atomic trade contract with the borrower on the chain internet hosting the stablecoin. This contract permits the borrower to say the stablecoins with the identical preimage used to finish the DLC on Bitcoin, or the lender can reclaim the stablecoins after a timeout. The contract on the alt-chain can also be backed by further stablecoins that stay within the contract and may solely be recovered by the lender after the contract is accomplished. This will probably be defined later.
After the setup part, the borrower releases the preimage to the hashlock, claims the stablecoins and permits the lender to maneuver the bitcoin from the staging deal with to a remaining DLC. The contract is at present lively.
Execution
Through the time period of the contract, there are 3 ways during which the mortgage could be settled: at maturity or throughout its time period. First, the lender can execute the DLC with the borrower’s adapter signature and attestation of the present worth from the oracle(s). Secondly, the borrower can execute the task with the signature of the borrower and a certificates from the oracle(s). Lastly, the borrower can repay the mortgage on the alt-chain, permitting them to reclaim bitcoin collateral when the lender claims their compensation and stablecoin collateral. All of those execution paths distribute the suitable quantity of Bitcoin to each events based mostly in the marketplace worth confirmed by the oracle(s).
The payback path makes use of the second hash preimage that the lender generated throughout setup. The DLC script has been modified to permit the borrower to reclaim the collateral at any time in the course of the lifetime of the contract, so long as she or he has the preview generated by the lender. On the alt-chain, the stablecoin contract can also be designed to require the lender to make that instance public as a way to recuperate its refund and collateral.
This compensation construction is added to deal with the inducement created when a compensation is made, however the lender doesn’t full the compensation as a result of the curiosity fee on the excellent mortgage is larger than the curiosity that could possibly be earned by offering a brand new mortgage. That is additionally why the lender is required to collateralize the alt-chain contract with further stablecoins, creating an incentive for them to make a compensation. If they do not do that, they can not reclaim the collateral, giving them an incentive to honor the refund and launch the bitcoin collateral, even when there’s a monetary incentive not to take action because of the curiosity funds.
As soon as the lender releases the preimage to recuperate the refund and stablecoin collateral, the borrower can unilaterally concern the DLC output utilizing the launched preimage. This ensures that the borrower is ready to unilaterally reclaim his bitcoin collateral after the lender takes possession of the compensation of his mortgage.
Liquidation and safety
Like DLC Markets’ proposal, Lava helps a liquidation process. Within the occasion that the oracle confirms a worth under a predetermined liquidation degree, pre-signed transactions comparable to the liquidation occasion can be utilized by the lender to say the whole collateral. That is to make sure that in the course of the occasion of an enormous worth swing that reduces the worth of the collateral above the worth of the mortgage, the lender is ready to liquidate it when essential to recuperate the stablecoin worth claimed by the borrower. cowl. In any other case, they may face the danger of getting to attend for the contract to run out and being caught with bitcoin that’s much less precious than what they lent, leading to a monetary loss for the lender.
Along with the liquidation process, there’s additionally a catastrophe restoration choice lengthy after the contract has expired. Throughout setup, signatures for pre-signed transactions are exchanged lengthy after the contract expires. These are used within the occasion that the oracle(s) fail to supply signatures on worth certificates, or within the occasion that the borrower now not cooperates with the lender, or vice versa.
The lender can use considered one of these to say the whole bitcoin collateral within the occasion that the oracle(s) don’t affirm the worth, or the borrower doesn’t cooperate in that case. That is to make sure that the bitcoin within the DLC is rarely susceptible to being burned. For comparable causes, a transaction could take a very long time after it’s accessible from the lender. This finally permits the borrower to reclaim his collateral if the oracle(s) and lender turn into unresponsive.
Conclusion
By barely modifying the DLC protocol with a fundamental hashlock and introducing a liquidation mechanism just like DLC Markets, the Lava Protocol has created a variant of DLCs that’s completely suited to bitcoin collateralized lending. Whereas the reliance on oracles nonetheless exists, as with all DLC protocol or software, mortgage entry and exit is totally atomic and trustless between the borrower and the lender.
This proves to be of immense worth in subtly adapting current Bitcoin contract constructions to satisfy particular use circumstances, offering a path to assembly a high-demand want within the ecosystem that doesn’t pose the systemic threat of instability that created centralized equivalents previously.