You can also find out more about the following: Lava Loans protocol (v2) Lava designed a scheme based on Discreet Log Contracts, which allows for a trusted Bitcoin-backed collateralized lending system. Last cycle, the massive implosion of the Bitcoin market was caused by central platforms that facilitated Bitcoin-backed loans.
Lava uses DLCs in order to offer the same functionality that such platforms provide, but on a decentralized basis.
For those who are unfamiliar, DLCs is a type of smart contract that allows a settlement to be determined by the result of an event not related to the Bitcoin protocol. The price of Bitcoin or the result of a sporting event, for example, are all examples of DLCs. The oracle is a group of several oracles that sign messages attesting real outcomes of events. The signed messages form the basis of adapter signatures which unlock pre-signed contracts that are settled in a specific way.
DLCs can be performed privately. If the oracles publish their keys to use for signing outcomes at certain times and specific events, then any user could take this information to construct pre-signed transaction to settle the contract correctly. The oracle would never know that the contract existed. Oracles simply broadcast the sign message to both parties at the correct time.
The Lava system is built to use a modified version of DLCs in conjunction with stablecoins from other networks to enable a bitcoin-collateralized loan to be made atomically, and without trust (i.e. This guarantees that the lender will not be able to gain control over bitcoin before releasing the control of stablecoins to the borrower.
Instantiation
In the Lava Protocol, funding the DLC requires two steps due to the fact that stablecoins exchanged for collateral must be atomic. In the first stage, the borrower writes a script to allow them to have their coin returned after the timelock or to let the lender complete funding by using a borrower’s hash preimage. Signing a transaction which moves coins from the staging address to the DLC is the next step. After this, the lender and borrower exchange a hashlock that will be later used in protocol.
The lender will then fund an atomic exchange with the borrower, on the same chain that hosts the stablecoin. The contract will allow the borrower the option to either claim stablecoins using the same preimage as the DLC for Bitcoin or to have the lender reclaim them after the timeout. A contract for the alt-chain also has extra stablecoins, which are collateralized. These can only be claimed by the lender after the contract’s completion. Later, we will explain this.
After the initial setup, the borrower will release the preimage, claim the stablecoins and allow the lender to transfer the bitcoins from the staging addresses into the finalized DLC. This is the point where the contract becomes active.
Execution
Three ways can be used to pay off the loan, whether it is at its expiration date or in the middle of its life. The lender may execute the DLC using the adaptor signature of the borrower and the attestation from oracles as to the current price. Second, the borrower will execute using the adaptor signature of the lender along with attestation(s) from oracles. The borrower has the option to repay the loan via the alt-chain. They can then claim their bitcoin collateral back once the lender requests repayment. The oracle will determine the amount of bitcoin that should be distributed to each party based upon the current market value.
The second preimage hash that was generated by the lender during setup is used to calculate the repayment path. DLC scripts are modified so that a borrower can claim the collateral any time within the life of the contract as long they possess the preimage generated by the lender. The stablecoin contracts are also created on the alt-chain to force the lender to disclose the preimage in order to receive their collateral and repayment.
It is meant to provide an incentive for lenders who make a loan repayment, but do not finish the payment because of the high interest rate on their outstanding loans. It is for this reason, too, that the lender must collateralize an alt-chain contract by adding extra stablecoins. This creates a financial incentive to repay a payment. They cannot get the collateral back if they don’t do this, so there’s an incentive to redeem the payment.
The lender can release the preimage for the borrower to use in order spend DLC collateral and claim repayment. It ensures that after the lender receives the repayment, the borrower will be able to claim the bitcoin collateral unilaterally.
Safety and Liquidation
Similar to DLC Markets proposal, Lava supports a liquidation procedure. If the oracle confirms a lower price than the predefined liquidation threshold, the lender can use pre-signed transaction corresponding to this liquidation to recover the entire collateral. In the event that a large price change lowers collateral values beyond what the borrower has borrowed, this will allow the lender to liquidate it to pay the claimed stablecoin amount. They could face the possibility of having to wait until the end date for their contract and be stuck with bitcoins that are less valuable. This would result in financial losses.
Aside from the liquidation option, an alternative emergency recovery procedure is available even after the expiry of the contract. Signatures are exchanged for transactions that have been pre-signed long after contract expiry. They are exchanged in case the oracles fail to sign price attestations or if the borrower or lender stops working together.
If the oracle or oracles fail to confirm the price or in this case the borrower refuses to cooperate, then the lender may be able to use these documents to collect the full bitcoin collateral. The DLC will never be at risk of burning the bitcoin. The same reason is why a transaction can be timelocked until the lender makes it available. The borrower can then claim their collateral back if oracles and lenders are unresponsive.
You can also read our conclusion.
The Lava protocol is a slightly modified version of DLCs that includes a hashlock and a liquidation system similar to DLC Markets. This variant of DLCs has been created to be perfect for bitcoin collateralized loans. The oracle dependency is still present, but the lender and borrower can enter and exit the loan without any trust.
It is clear that there’s a lot of value to be gained by subtly adapting the existing Bitcoin contracts to suit specific use-cases. This offers an alternative to centralized counterparts that created systemic instability.
“This article is not financial advice.”
“Always do your own research before making any type of investment.”
“ItsDailyCrypto is not responsible for any activities you perform outside ItsDailyCrypto.”
Source: bitcoinmagazine.com

