VIP-209 Add forced liquidations for individual accounts into the Core pool

LINK

Summary

If passed, this VIP will upgrade the implementation of the Comptroller contract of the Core pool, including the feature “forced liquidations for individual accounts”, as an extension of the feature included in VIP-172.

Description

This VIP upgrades the implementation of the Comptroller contract in the core pool, including the feature “forced liquidations for individual accounts”, that will be initially disabled for every market and account.

If “forced liquidations for individual accounts” are enabled for an account in a market, borrow positions of the specific user can be liquidated in that market even when the health rate of the user is greater than 1 (i.e. when the account is collateralized). Additionally, the close factor check is ignored, allowing the liquidation of 100% of the debt in one transaction.

This feature is based on the implementation done by Compound V2 here. Compound V2 allows “forced liquidations” on markets as soon as the Collateral factor is zero, the Reserve factor is 100% and the borrows are paused. Venus defines a feature flag to enable/disable “forced liquidations for individual accounts”, configurable directly via VIP, not based on other parameters. This feature is an extension of the feature suggested by Chaos Labs, and deployed in VIP-172.

To check if “forced liquidations for individual accounts” are enabled for an account in one market, the function “Comptroller.isForcedLiquidationEnabledForUser(account address, vToken address)” can be called on the Comptroller contract of the pool, providing the address of the account and market to check.

Finally, this VIP will authorize NormalFast-track and Critical timelocks to enable and disable the forced liquidations for individual accounts on any market of the Core pool.

Security and additional considerations

We applied the following security procedures for this upgrade:

  • Behavior post upgrade: in a simulation environment, validating “forced liquidations for individual accounts” work as expected after the upgrade
  • Deployment on testnet: the same implementation has been deployed to testnet, and used in the Venus Protocol testnet deployment

Deployed contracts

References

Voting options

  • For – Execute this proposal
  • Against – Do not execute this proposal
  • Abstain – Indifferent to execution

Operation

LegacyPoolComptroller._setPendingImplementation(“0xD93bFED40466c9A9c3E7381ab335a08807318a1b”)

0xD93bFED40466c9A9c3E7381ab335a08807318a1b._become(“0xfD36E2c2a6789Db23113685031d7F16329158384”)

LegacyPoolComptroller.diamondCut([[“0xa7fE89d9A7F9dc097fb71F13e2E025165CBf431f”, 1, [“0xead1a8a0”, “0xda3d454c”, “0x5c778605”, “0x5ec88c79”, “0x4e79238f”, “0x5fc7e71e”, “0x47ef3b3b”, “0x4ef4c3e1”, “0x41c728b9”, “0xeabe7d91”, “0x51dff989”, “0x24008a62”, “0x1ededc91”, “0xd02f7351”, “0x6d35bf91”, “0xbdcdc258”, “0x6a56947e”]], [“0xF2b7D75557B75a878E997934014E95Dd089B5f24”, 1, [“0xf519fc30”, “0x2b5d790c”, “0x317b0b77”, “0xe4028eee”, “0x9bf34cbb”, “0x522c656b”, “0x4fd42e17”, “0xbb857450”, “0x607ef6c1”, “0x51a485e4”, “0x5f5af1aa”, “0x55ee1fe1”, “0x9460c8b5”, “0x2a6a6065”, “0xd24febad”, “0x9cfdd9e6”, “0x2ec04124”, “0x4e0853db”, “0x6662c7c9”, “0xfd51a3ad”]], [“0xF2b7D75557B75a878E997934014E95Dd089B5f24”, 0, [“0x17db2163”]]])

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0xfD36E2c2a6789Db23113685031d7F16329158384”, “_setForcedLiquidationForUser(address,address,bool)”, “0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396”)

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0xfD36E2c2a6789Db23113685031d7F16329158384”, “_setForcedLiquidationForUser(address,address,bool)”, “0x555ba73dB1b006F3f2C7dB7126d6e4343aDBce02”)

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0xfD36E2c2a6789Db23113685031d7F16329158384”, “_setForcedLiquidationForUser(address,address,bool)”, “0x213c446ec11e45b15a6E29C1C1b402B8897f606d”)


Related Tags: