• LISA
    LISA
    • Public Scans
    • My Scans
    1. Scan
    2. ...
    2025-06-22 12:19:58
    Public
    Full Disclosure

    BankrollNetwork Security Inci'den't

    high1
    Created By:
    Credit Usage:

    Incorrect payout adjustment in sell function leads to dividend miscalculations

    HIGH

    Description

    The sell function incorrectly adjusts the payoutsTo_ by subtracting profitPerShare_ * _amountOfTokens + (_taxedeth * magnitude), which should only subtract profitPerShare_ * _amountOfTokens. This error causes users' dividend calculations to be incorrect, potentially leading to negative payouts or loss of owed dividends.

    Recommendation

    Modify the payout adjustment to only subtract profitPerShare_ * _amountOfTokens:

    int256 _updatedPayouts = (int256)(profitPerShare_ * _amountOfTokens);
    payoutsTo_[_customerAddress] -= _updatedPayouts;
    

    Affected Lines

    Line 1088 – 1090