I am trying to comprehend the following snippet of payment code:
if (collectedFees >= minFeePayout) {
if (!owner.send(collectedFees)) {
// Potentially sending money to a contract that
// has a fallback function. So instead, try
// tranferring the funds with the call api.
if (owner.call.gas(msg.gas).value(collectedFees)()) {
collectedFees = 0;
}
The code fragment is from this contract: https://etherscan.io/address/0x9f1d916a456b96146e9f0dbbd0e107a1f389a061#code.
So my question is:
why this contract uses one
sendand onecall?Is it safe? I am using some security tools to check this contract and somehow this part is flagged as "vulnerable". I just don't get it.