57702 sc medium the long payment path is sensitive to the long inventory in escrow and insufficient inventory can easily lead to business unavailability dos of long payments
Submitted on Oct 28th 2025 at 10:03:44 UTC by @s8olidity for Audit Comp | Belong
Impacts: Smart contract unable to operate due to lack of token funds
Description
Brief / Intro
The payToVenue LONG payment branch first withdraws LONG from Escrow (distributeLONGDiscount), a "platform subsidy", then collects LONG from customers, and then proceeds with pledging, currency conversion, or transfers according to the rules. However, the LONG in Escrow comes solely from the convenienceFeeLong received from the venue's top-up, with no other stable replenishment. Even with a high volume of actual business, a shortfall in LONGs could occur, causing payToVenue to revert during the distributeLONGDiscount phase, resulting in a business interruption due to insufficient funds causing the contract to not function properly.
Vulnerability Details
Source Analysis:
convenienceFeeAmount (fixed at $5) is converted to a LONG value and injected into Escrow.longDeposits only within venueDeposit.
In the payToVenue LONG branch, subsidyMinusFees is first calculated as platformSubsidyPercentage(amount) - processingFeePercentage(amount) and then withdrawn via escrow.distributeLONGDiscount(venue, this, subsidyMinusFees).
If subsidyMinusFees > longDeposits[venue], the call reverts (NotEnoughLONGs), preventing subsequent customer transfers and pledge/currency swaps.
This is a shortcoming caused by "business parameters + fund flow design", not a permission or front-running issue. It is more likely to be triggered during peak or large-value payments.
Impact Details
The contract cannot accept LONG payment paths as expected → business interruption.
Scope definition matches: Medium (Smart contract unable to operate due to lack of token funds).
Associated Risks: Frequent rollbacks block customer payments, also blocking downstream actions such as promotions and referral points redemption (complete rollback).