The checkLiquidatableAccounts
takes a two-parameter lowerBound
and upperBound
representing a range in globalConfiguration.accountsIdsWithActivePositions
and checks if the accounts in that range are liquidatable, and if they are return tradingAccountId
in an array named liquidatableAccountsIds
The issue comes in how the implementation for initializing value is done for liquidatableAccountsIds
array.
The value of i
defined by
Hence liquidatableAccountsIds[i]
should be liquidatableAccountsIds[i - lowerbound]
otherwise, the initialization will throw the array out-of-bounds anytime the lowerBound != 0
checkLiquidatableAccounts
is a critical function since it's going to be called by the keepers who are going to liquidate positions, and it reverting means there will be no liquidation happening.
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.