The code is attempting to update an exchange rate for an asset token based on a fee. An attacker could potentially exploit this by calling this function multiple times in quick succession.
The reentrancy vulnerability in this code occurs because of the modification of the state (s_exchangeRate) before emitting the ExchangeRateUpdated event.
An attacker could potentially exploit this by calling this function multiple times in quick succession, and each time it's called, they could execute an external contract call, including other malicious code, before the event is emitted. This can result in unexpected and potentially harmful behavior.
Manual code analysis.
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.