Both contracts hardcode and initialize a router address upon deployment, and then safeApprove
that initial router for type(uint256).max
. However, there is a function setRouter
Both contracts hardcode and initialize a router address upon deployment, and then safeApprove
that initial router for type(uint256).max
. However, there is a function setRouter
that allows management to change the router
address, thus the strategy will use the new router for any swaps. In addition, the newly set router
is given approval of type(uint256).max
.
The old router, which is not used by the strategy anymore, will still have approval for type(uint256).max
of the strategies underlying
token. The approval for the old strategy is never set to 0 when it is changed, so there will be a router out there that will have full rights to spend ALL of the strategies underlying
token.
The old router which still has approval for type(uint256).max
will be able to spend ALL of the strategies tokens, leaving the protocol at risk of losing funds.
Manual Review
In the setRouter
function for both contracts, rescind the approval from the old router, and approve the old router for 0, before adding the new router and approving the new router for type(uint256).max
.
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.