Liquity Live: B.Protocol V2 Discussion
Primer: Join Kolton Bergeron and Robert Lauko, the Head of Growth and Founder of Liquity respectively, as they interviewed Yaron Velner - CEO/Founder - and Eitan Katchak - Head of Ecosystem Development at B.Protocol. B.Protocol seeks to democratize the liquidation systems in DeFi to unlock better capital efficiency, through a Backstop liquidity protocol. Find out how Liquity, B.Protocol and Pickle Finance are stacked together to form a neat money Lego stack.
Introduction
Liquity
Kolton Bergeron
Previously the Manager at the Stellar Development Foundation
Now the Head of Growth at Liquity
Robert Lauko
Founder/CEO of Liquity
Based in Switzerland
Previously a researcher at DFINITY
B.Protocol
Eitan Katchka
Head of Ecosystem Development at B.Protocol
Previously involved in Bitcoin 2.0 since 2014
Met Yaron a few years ago while working on a project with Toyota Research Institute in the US
Yaron Velner
CEO/Founder of B.Protocol
Former CTO at Kyber network
Before that was doing academic research as a PhD student in 2016
Origins of B.Protocol and Liquity
How did B.Protocol get started?
When Yaron was the CTO at Kyber network, he did a lot of on-chain market making
This was before the AMM (like Uniswap) era started
B.Protocol is a spin-off project by Kyber Network
Started working on liquidation there and at other venues
Also worked with CEX like Bitmex and they have a dedicated backstop
Realised that the liquidation process is very inefficient
If something bad happens, it'll be disastrous
Wondered if MakerDAO has a contingency plan for such events
When Black Thursday happened in Mar 2020, he realised that MakerDAO has no actual contingency plan, so liquidations failed
That is the main reason why they started B.Protocol
Backstop as a DeFi primitive is sorely missing
Kolten mentioned that this is exactly the same way in which Robert felt so he started Liquity
How did Liquity get started?
When Robert was designing Liquity, they were looking at their main competitor like MakerDAO
Liquidation can be done in two ways:
Discount mechanism - selling the collateral put up for the borrowings at a discount compared to the oracle price. Suffers from gas war among liquidators
Auction mechanism - selling the collateral off in an auction. This is inefficient because it can be time-consuming and the price can drop in the meantime
Liquity set out to create a stability pool that will liquidate positions immediately, which is as fast as the oracle is updated and as fast as an ETH transaction can be sent to trigger the liquidation
People can deposit LUSD the stablecoin to the stability pool and become backers or guarantors of the borrowers
When the system needs to liquidate the borrower, the amount of debt that needs to be liquidated can be taken out from the LUSD of the stability pool
The tokens are burnt, the collateral is taken from the liquidated borrower to the stability pool depositors pro-rata to their deposits
Everyone loses some portion of their deposited LUSD but get some ETH from the liquidated position in return, which should result in a net gain
Stability pool depositors can also get a continuous allocation of LQTY like yield farming
Integration of Liquity & B.Protocol
Reason for the integration
Initially, after Yaron saw the difference between DeFi and CeFi liquidations, wanted to incentivise professional liquidators to join DeFi e.g. Algo traders to run bots
However, they decided to pivot into more user-based liquidations i.e. liquidations with user capital
Liquity is exactly what B.Protocol is looking for
A lot of MakerDAO users are also moving towards Liquity, so it's a natural step for them to integrate
Eitan mentioned that it is also around the same time that they had started on v2 and Liquity had just launched, so everything fell into place
Kolten said they had such a good fit with Liquity since doing so will remove some of the overheads of B.Protocol in setting up a stabilizer pool themselves
Drawbacks for Liquity stability pools
Users have to do it themselves and manage their positions, thus spending more on gas for transactions
For users with smaller positions, it might not even be worth the transaction costs
For big liquidation events, this might be a problem because the system still relies on the users to do it manually
Users also need to deposit back the LUSD in order to do more liquidations
This causes inefficiency in Liquity's stability pool
Advantage of this integration
B.Protocol will automatically convert the ETH gained from liquidations back to LUSD and redeposit that into the stability pool. Pool depositors continue to earn $LQTY token proportionate to their deposits
The benefit is that users do not have to do this manually if they use Liquity through B.Protocol interface
Without B.Protocol, users have to manage the position themselves
If ETH collateral is received, users have to liquidate it timely to guarantee a profit from the liquidation because the price of ETH could always drop
Doing this automatically saves gas and locks in profits effectively, and ultimately serves as a backstop
The Problem
What problem is B.Protocol trying to solve?
The problem with DeFi lending platforms is that they have low capital efficiency and MEV
There is a poor liquidation efficiency
There are 2 ways to liquidate. The collateral of the loan can either be discounted from the marketplace and sold or it can be auctioned off
The auction mechanism for liquidation is too time-consuming
The discount mechanism for liquidation suffers from MEV from gas war bidding
Thus the platform offers poor leverage ratios of x3 to x5 compared to CEXes like Bitmex, which offers up to x100
Not everyone wants to use x100, but a low leverage ratio will trigger liquidations in small fluctuations in the market prices
E.g. even if you have 200% collateral, a 20% drop in market price will get you liquidated
This is still okay in 2018 era where DEX liquidity is not big, but DeFi liquidity is huge right now
For constant product market markers like Sushiswap or Uniswap, it's not possible to liquidate 5 million dollars even if there are tens of millions of dollars of liquidity because 5% slippage will be reached quickly
Even v2 concentrated liquidity is not a solution because, in big market price movements, liquidity gets depleted
Can't rely on those, especially during liquidity crisis when liquidations are needed
Initially, the team wanted to incentivise professional liquidators but they don't want to become DeFi liquidators because of MEV and gas wars in a winner-takes-all scenario
Despite nice liquidation premiums in DeFi, these premiums will go to the miners
The Solution
The v2 solution: User-based Backstop AMM (B.AMM)
Supports fixed slippage even for liquidations of large positions
There is automatic position rebalancing using Curve Finance's stable swap invariant, combined with the oracle price feed from ChainLink to price token pairs in real-time
After that, the system will add a discount of around 1% to 4%, based on the price impact of the position
How does a user interact with Liquity via B.Protocol?
Users deposit to Liquity's stability pool by B.Protocol's interface under the same exact conditions
Stability pool depositors earn LQTY as a yield token
When there is a liquidation, Liquity protocol execute the liquidation and the pool will have LUSD and also ETH
The ETH will be sold for LUSD and automatically deposited back into the stability pool
No need to rely on users and it can be done without any human touch
How to make sure that liquidations will take place when needed?
In order to make sure that there are takers for the ETH that is sold to the market, B.Protocol is aggregated by DEX aggregators like Kyber Network and Paraswap
Whenever B.Protocol have ETH for sale, it will be seen by the entire DeFi community
Also using Keepers like Gelato and ChainLink in case B.Protocol's imbalance keeps rising despite giving the best prices in aggregators protocols
When arbitrage prices are hit, Gelato keepers and ChainLink keepers will execute arbitrage transactions
Will take the ETH from B.Protocol and give them LUSD while the keepers sell the ETH on Uniswap to complete the arbitrage
This means that even though they can offer a discount of 4% below the market price for the ETH, they will not get anything below 2 to 3% below the actual Uniswap price because they will get arbitraged by the bots
Better to let the decentralised community handle the liquidations. Keepers are meant as a last resort
Automatic rebalancing
How does the rebalance work?
People will usually sell their ETH on Uniswap but they are taking a different approach in order to automate with a smart contract
The price of ETH to LUSD depends on the market price provided by ChainLink's price oracle and according to the imbalance they have, using Curve Finance stable swap AMM
Curve Finance AMM is using the stable swap invariant to price assets
The swap curve has a target portfolio which is a fixed ratio between 2 assets e.g. DAI and USDC
Provides different slippage according to the distance from the target portfolio: the further the target is, the bigger the slippage
They are already using a price oracle so the portfolio assets are normalised to their USD values in real-time and plugged into the stable swap invariant without additional security risk
Better results with simulations
Simulate liquidations during some of the 20 most volatile days in Binance Futures exchange for the ETH-USD pair
The simulation scenario is $700 M liquidation in 20 days, or $1B liquidations in a month, spread non-uniformly
Results show that B.AMM can handle $200m liquidations of ETH-USD with only $10m inventory, much better than a constant product market maker such as Uniswap or Sushiswap
Integration with Pickle Finance
Money Legos
Pickle Finance is integrated with Liquity and also B.Protocol
This tie-up came about because Pickle Finance already had tie-ups with Liquity for the LQTY jar
Both B.Protocol and Pickle Finance are part of the Open DeFi network so it is easy to coordinate
With the help of B.Protocol's B.AMM, LUSD stability providers will not need to manage their ETH liquidation at their own time and expense, and they can earn LQTY rewards
B.AMM only gives the users LQTY rewards intact upon withdrawal, but the pickled version of B.AMM (called PBAMM) will give users additional incentives and higher APYs
Robert said that when they started the concept of Money Legos did not even exist
So this kind of integration exceeds even his expectations
How does it work?
The Jar accept user's deposits in LUSD
LUSD is deposited into B.Protocol's PBAMM contract, which is deposited to the stability pool at Liquity. A token is given to the user
When liquidated, a portion of the user's LUSD is swapped for ETH in the stability pool
B.Protocol will automatically sell the ETH back for LUSD and deposit it back to the pool
LQTY will be given to depositors and automatically deposited in Pickle's pLQTY jar which will earn LUSD and ETH fees
These will be sold and compounded for more LQTY automatically
pLQTY rewards from PBAMM can also be staked at Pickle Finance's farms to receive additional PICKLE on top of the jar yield
Looking forward
What's in store for B.Protocol in the future?
Glad that the first integration with Liquity is easy because they already had a stability pool to tap on
In the future with other protocols, they would have to form their own stability pool
They hope B.Protocol will become a backstop primitive for all DeFi because it democratises the liquidation process
A stability pool allows anyone to take part in the process as it is impossible to get a backstop seat at Binance or FTX
All information presented above is for educational purposes only and should not be taken as investment advice. Summaries are prepared by The Reading Ape. While reasonable efforts are made to provide accurate content, any errors in interpreting and summarizing the source material are ours alone. We disclaim any liability associated with the use of our content.