The redeemCollateralForDsc function calls two external functions: _burnDsc and _redeemCollateral. These functions make external calls to other contracts using the transferFrom and transfer functions. If one of these external contracts were to call a function in the DSCEngine contract before the original call to _burnDsc or _redeemCollateral has completed, it could potentially lead to a reentrancy attack.
In function redeemCollateralForDsc , if a reentrancy attack were to occur, it could potentially affect the state of variables in the DSCEngine contract. For example, the _burnDsc function updates the s_DSCMinted mapping, and the _redeemCollateral function updates the s_collateralDeposited mapping. If a reentrancy attack were to occur, it could potentially result in these variables being updated in an unexpected or incorrect manner.
Slither and manual review.
Use a non-reentrant guard on the redeemCollateralForDsc 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.