57596 sc low reentrancy in distributepromoterpayments allows total theft of promoter and venue funds
Description
Brief/Intro
Vulnerability Details
function distributePromoterPayments(PromoterInfo memory promoterInfo) external {
if (promoterInfo.paymentInUSDC) {
_storage.contracts.escrow.distributeVenueDeposit(promoterInfo.venue, address(this), platformFees);
_handleRevenue(_storage.paymentsInfo.usdc, platformFees);
_storage.contracts.escrow.distributeVenueDeposit(promoterInfo.venue, promoterInfo.promoter, toPromoter);
} else {
_storage.contracts.escrow
.distributeVenueDeposit(promoterInfo.venue, address(this), promoterInfo.amountInUSD);
uint256 longFees = _swapUSDCtoLONG(address(this), platformFees);
_handleRevenue(_storage.paymentsInfo.long, longFees);
_swapUSDCtoLONG(promoterInfo.promoter, toPromoter);
}
// ❌ State change (burn) after external calls – vulnerable to reentrancy
_storage.contracts.promoterToken.burn(promoterInfo.promoter, venueId, promoterInfo.amountInUSD);
}Impact Details
References
Proof of Concept
1
2
3
4
5
6
Fix Recommendation
Previous57201 sc low missing collection expiry enforcementNext57848 sc medium permanent freezing of funds due to no minimum stake limit
Was this helpful?