The contract LoyaltyPointsMarketSafe use the .transfer to transfer native fund, but this only send only 2300 if the _to use more gas the transaction will revert
Use the .call to send native fund
Recommendation
@@ -31,7 +31,8 @@ contract LoyaltyPointsMarketSafe is Ownable {
//-----------------------------------------------------------------------------
function withdrawFunds(address payable _to) external onlyOwner {
- _to.transfer(address(this).balance);
+ (bool success,) = _to.call{value: address(this).balance}("");
+ require(success, "Failed to transfer to _to");
}
Github username: @Rotcivegaf Submission hash (on-chain): 0x5b8216d37457e2280fb9e132405fdb348aa4707553a5c214a3d8c5759e316bdf Severity: low
Description:
Description
The contract LoyaltyPointsMarketSafe use the
.transfer
to transfer native fund, but this only send only 2300 if the_to
use more gas the transaction will revertUse the
.call
to send native fundRecommendation