ebtc-protocol/ebtc

Sequence Liq Generation Test

Closed this issue · 1 comments

The batch liquidation sequence sorts the valid from invalid Cdps passed in and process them accordingly.

It is however not specified exactly what the sequenceLiqToBatchLiq should generate
So we can make the definition:

  • returns all Cdps, low to high ICR
  • returns only liquidatable Cdps, low to high ICR

See what it does currently and ensure that sequence liq generates the expected list for one of the two above.

Cdps in the following categories should be added to the list and confirmed working:

  • Cdps undercollateralized under minimum liq premium [<3% ICR]
  • Cdps undercollateralized [3% < ICR < 100%]
  • Cdps overcollateralized but liquidatable [100% <= ICR < 110%]
  • Cdps overcollateralized but liquidatable in recovery mode [110% <= ICR < 125%]
  • Cdps overcollateralized and unliquidatable [ICR >= 125%]

@dapp-whisperer the function sequenceLiqToBatchLiq() should return only liquidatable CDPs instead all active CDPs

PR for dedicated tests is here #598