Skip to content

Overflow bug: interest could be negative in FeeManager #245

@wisdant

Description

@wisdant

In the logic of consuming _cr.correction, it assumed new interest is going to larger than _cr.correction, thus the forced conversion to uint256 and setting _cr.correction to 0. If the borrower made huge principal payment in the middle cycle and accumulated big negative _cr.correction and left a tiny balance, the new interest will be very small positive number, not enough to offset the accumulated big negative number, this would lead to overflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions