The UnripeFacet
contract implements the ReentrancyGuard
as a shield against reentrancy. All its external/public
functions such as addMigratedUnderlying(), addUnripeToken(), pick() & chop() which involve state changes and at the same time interact with other functions from other contracts are protected by nonReentrant
modifier.
However, the switchUnderlyingToken()
function is missing this modifier when it just as all the other functions operate in a similar manner.
This function makes an external call to LibUnripe.switchUnderlyingToken():
which modifies the underlyingToken
attribute of the u
mapping entry associated with the unripeToken
provided as an argument.
By assigning newUnderlyingToken
to s.u[unripeToken].underlyingToken
, the function updates the underlying token
associated with the unripeToken
.
Since the switchUnderlyingToken(
) function modifies contract state and involves external calls without proper reentrancy protection, it may be susceptible to reentrancy
attacks.
Manual Review
It is in order for this function to have the nonReentrant
modifier as the other functions have it as well..
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.