The addRoute
function allows the addition of an unlimited number of routes without imposing any restriction on the maximum number of routes that can be added.
This lack of limitation could lead to high gas costs and Denial of Service (DoS) risks during contract interactions, especially when managing large numbers of routes.
The addRoute
function increments the nRoutes
counter every time a new route is added, without checking if the number of routes has exceeded a reasonable limit:
There is no restriction on how many routes can be added to the routes array.
The lack of a limit increases storage requirements and gas costs during interactions with the routes array.
Excessive routes can lead to performance issues, making the contract unusable due to gas constraints.
Introduce a maximum limit on the number of routes that can be added, and enforce it in the addRoute
function.
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.