ship()
function of LibShipping breaks the cap
invariant.
There is a cap
amount set for every plan in ShipmentPlanner.sol. ship()
function of LibShipping has no access control thus anyone can call this function again and again with any amount of beansToShip
.
Though there is a cap check, it doesn't account the total number of beans shipped till date. Instead what it does it checks cap against amount calculated from the provided beansToShip
value.
Thus, any malicious user can call ship
function again and again with particularbeansToShip
amount which doesn't exceed cap for any plans and distribute beans to these plans.
Doing this will break the protocol invariant as more amount will be shipped than the cap. Also, more the shipped amount, more rewards depositors can get. For example: Silo depositors will get more assets if silo is shipped with exponential amount of tokens.
Manual Analysis
Implement proper access control in the ship()
function.
ship()
function shouldn't be allowed to be called again and again as the current implementation doesn't check the cap amount with total amount of beans shipped.
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.