Liquidations For Developers

How to perform liquidations on VMEX

What is VMEX based on?

VMEX is forked from AAVE v2 with two main distinctions. The first, is that the protocol is tranched, meaning that each basket of assets in a tranche is isolated from every other tranche. You can think of each tranche like it's own deployed version of AAVE. The second, is that VMEX allows for interest bearing tokens (IB tokens), like LP and vault tokens, to be deposited into the protocol and used as collateral. This is important to note for liquidations because if you liquidate a loan that has an IB token as collateral, you will need to take additional steps to unwrap it if necessary, for example, if you use a flashloan to liquidate the loan.

What other differences are there between liquidating here and liquidating on AAVE?

Mostly the tranches. Each user has a health factor specific to each tranche. They can have a healthy loan in Tranche 1, but be underwater in Tranche 2. It's imporant to pass in the right tranche to the lending pool when performing liquidations.

Where do I get data?

It is recommended that you use a web3 library to listen to the events emitted by LendingPool.sol, namely Borrow, Deposit, and Withdraw. However, VMEX also has a subgraph from which you can query information about the tranches from as well.For more information on how to execute a liquidation, as well as view our example bot, please see the next section.

Last updated