Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: low
Valid

Chainlink Keeper Cannot Process All Swap Logs in a Block

Summary

UsdTokenSwapKeeper::checkLog relies on Chainlink Keepers, which only handle 1 logs every 2 block on Arbitrum. StabilityBranch::initiateSwap emits an event (LogInitiateSwap) for each swap request. If multiple users request multiple swaps in the same block, some logs will be ignored, leading to unprocessed swaps.

Accroding to chainlink doc-Chainlink Automation nodes look back over a limited range of the latest blocks and process a limited number of logs per block per upkeep, using a minimum dequeue method to ensure that the latest logs are processed first. After this, the nodes may process additional remaining logs on a best effort basis, but this is not guaranteed [doc]

The doc suggest if all logs are needed to be processed, configure a manual trigger as backup. If swap requests are not processed or processed later than the deadline, users have to call refund to get back their token. But user will have to pay the base fee to get a refund which becomes unnecessarily costly for users


Impact

  • Users pay gas fees for swap requests that may never be processed. Users also have pay base fee to get a refund


Recommendation

Remove base fee when refunding if the protocol cannot 100% guarantee users that their swaps will be executed

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Chainlink keeper's per-block log limit can cause swaps to not execute, yet users must pay base fee for refund, unfairly charging them for system limitation

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!