sechub
HomeServicesAssetsJobsFindingsTicketsGovCheck
Guest Mode. Click here to sign in and access all features

    Spin fee allocation percentages less then 100% block user funds

    Blast the balloon SC Audit

    Severity
    Low
    Status
    Fixed
    Location(s)

    BTB.sol#L200

    Description

    When a users buys a spin via the buySpin function, the provided native ETH is split into 4 distinct payment destinations (with default values):

    • protocol treasury gain: 1%
    • major jackpot for next round: 3%
    • current major jackpot portion: 71%
    • current minor jackpot portion: 25%

    These 4 percentages however can be changed via the updatePrizePortion function. The updatePrizePortion function incorrectly allows the sum of the 4 allocations to be less then 100% require(total <= PERCENTAGE_DENOMINATOR, BlastTheBalloonErrors.INVALID_PERCENTAGE);

    Because of the way buySpin function is implemented, if the allocations do not equal 100%, the difference is left stuck in the contract, unused. At this point the protocol team needs to call emergencyWithdraw to get the funds out.

    Recommendation

    In the updatePrizePortion function of the BTB contract, enforce that the sum of the 4 prize allocations is exactly 100%.

    Comments
    No comments yet

    Spin fee allocation percentages less then 100% block user funds

    Blast the balloon SC Audit

    Severity
    Low
    Status
    Fixed