LiquidationPool will likely not work normally. This is because a lot of functions inside LiquidationPool loop through all position holders, which will revert with oog eventually.
When use stakes in the LiquidationPool, then he is added to the holders
array. And when distributeAssets
is called(for example), then it loops through all holders. Same situation is in the distributeFees
function, which does it even 2 times.
Functions that calculate total TST and stake also use such approach.
The problem is that eventually, when big amount of holders will come to the pool, then those functions will revert wih out of gas error and pool will not work normally and liquidations will fail.
Liquidations will not be possible
VsCode
Think about another approach without looping ot you need to have limit of holders.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.