57435 sc high missing slippage protection enables direct theft via mev sandwich attacks
Submitted on Oct 26th 2025 at 08:37:19 UTC by @Carrot for Audit Comp | Belong
Report ID: #57435
Report Type: Smart Contract
Report severity: High
Target: https://github.com/immunefi-team/audit-comp-belong/blob/main/contracts/v2/platform/BelongCheckIn.sol
Impacts: Theft of unclaimed yield
Description
Brief / Intro
BelongCheckIn.sol is configured with slippageBps = 999999999999999999999999999 which causes amountOutMinimum to be 0 on all Uniswap V3 swaps. This allows MEV bots to sandwich attack every swap transaction, resulting in direct theft of funds in-motion.
Vulnerability Details
The protocol performs real token swaps through Uniswap V3 in multiple critical functions:
venueDeposit(): Swaps USDC convenience fees to LONGdistributePromoterPayments(): Swaps USDC to LONG for promoter payoutspayToVenue(): Auto-converts LONG payments to USDC_handleRevenue(): Swaps USDC to LONG for buyback mechanism
The slippage protection calculation in _swapExact() (lines referenced in the report):
With the deployed configuration:
BPS = 10^27slippageBps = 999999999999999999999999999(i.e., BPS - 1)amountOutMin = quote * (BPS - slippageBps) / BPS = quote * 1 / 10^27 = 0
This means the protocol accepts ANY amount >= 0 as valid output.
Impact Details
HIGH - Theft of unclaimed yield:
Promoter rewards (unclaimed yield) stolen during LONG distribution
Venue convenience fee rewards stolen during swap to LONG
Funds being swapped through Uniswap V3 are "in-motion" and can be stolen
MEV bots can extract nearly 100% value during swap execution
Financial estimates (as reported):
Venue deposits: $500/day stolen from convenience fees
Promoter payouts: $2,500/day stolen from rewards
Total: ~$90,000/month direct loss
Attack Scenario
References
BelongCheckIn.sol lines 664-665 (slippage calculation)
Helper.sol line 131-133 (amountOutMin function)
Recommendation
Set a reasonable slippage tolerance. Example from the report:
(Adjust the exact value to an appropriate tolerance consistent with the protocol's UX and risk profile.)
Current deployed value of slippageBps effectively nullifies slippage protection and allows trivial sandwich attacks. Prioritize fixing swaps that use the affected configuration.
Proof of Concept
Was this helpful?