After sucessful liqudation LiquidationFinalized event is emited, which should notify in the last parameter about the liquidated collateral value.
but this will always return 0, since user was already liquidated and doesn't have any collateral.
During the liqudation, all users NFTs are transfered to stabilityPool, and the user.nftTokenIds is deleted.
However, in the definition of the getUserCollateralValue function, we see that it uses the same array to calculate the total collateral of the user. (And this array is already empty at that point)
LiquidationFinalized always emits 0 as total collateral liqudated. Which provide wrong information, since some value was actually liquidated.
Manual Review
That value should be calculated at the start of liquidation, assigned to variable, and this variable should be emitted at the end
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.