Re Entrancy attack
In the context of this contract, the line msg.sender.call{value: msg.value - fees}("")
is used to refund the excess payment to the sender after deducting the fees. The call
function is used to send an arbitrary message to msg.sender
(the address of the sender) and execute the fallback function of the contract. The {value: msg.value - fees}
part specifies the amount of Ether to be sent along with the call.
It is important to note that using call
can be dangerous if not used correctly, as it allows arbitrary calls to any contract and can result in reentrancy attacks or other security vulnerabilities.
VIsual inspection
Use re-entrancy guards
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.