Liquidation process is inefficient and malicious users can force it to use a lot more gas in order to process the liquidations, since it always relies on sequential order and does not allow passing certain trading account ids to be liquidated.
Since liquidation keeper can’t process liquidation for given set of accounts it is forced to use sequential order and iterate over all the passed ids, potentially leading to higher gas consumptions. Imagine the situation that current trading account id is 100000, and more activity is expected from accounts with greater ids. Trader with account id = 1, constantly opens risky trades with small amount that become liquidateable in a short period of time. In this situation keeper will be forced to perform liquidation at least twice, for the account id = 1 and the rest, but if there are more accounts between 1 and 10000, due to the calculations performed in the checkLiquidatableAccounts
keeper will run out of gas, as the checkUpkeep
is allowed to consume up to 5 million. - https://docs.chain.link/chainlink-automation/overview/supported-networks#arbitrum-mainnet
Keeper will be forced to perform multiple liquidations for small number of accounts, since it does not allow passing set of accounts:
Manual Review
Allow checkUpkeep
to receive set of account ids.
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.