In the buyBackNFT
function, state variables are updated after external calls, which creates a reentrancy vulnerability. This could allow an attacker to re-enter the function multiple times before the state updates, leading to potential fund loss.
The function makes multiple external calls (transfer()
) before updating contract state.
A malicious contract could use a fallback function to re-enter buyBackNFT
executes, allowing them to **trigger multiple transfer **and drain the contract.
Manual review
To fix the issue you can use the nonReentrant
modifier and state updates before external calls.
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.