Malicious actors can make the system inoperable by pushing too many entries into dynamic arrays.
There are several loops in the contract which can eventually grow so large as to make future operations of the contract cost too much gas to fit in a block. Additionally, using unbounded loops incurs a lot of avoidable gas costs for all token transactions.
Examples of such arrays that can grow unlimited are pendingStakes
and holders
:
Then contract has to iterate over these arrays, e.g. when calculating a total number of tokens:
Anyone can create new accounts and push entries until it becomes impossible to operate the contract.
Iterating through the arrays of unknown sizes might consume all the gas provided (run out of gas) if too many elements are pushed. This might be less relevant on Arbitrum where gas limits are lifted, but concerning if deployed on other chains, especially Mainnet.
Manual review.
Consider refactoring the codebase to avoid such iterations. Add upper limits (global, per address, etc), pagination, and other appropriate improvements.
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.