Skip to content

Audit Fix 2: More direct safety check in gross settlement #267

@ZenGround0

Description

@ZenGround0

From audit:

In _settleSegmentGross (

require(
payer.lockupCurrent >= grossSettledAmount,
Errors.InsufficientLockupForSettlement(rail.token, rail.from, payer.lockupCurrent, grossSettledAmount)
);
) you check require( payer.lockupCurrent >= grossSettledAmount while it should be require( payer.lockupCurrent >= requiredLockup because requiredLockup is subtracted from lockupCurrent

Because grossSettledAmount is always >= requiredLockup the existing check should be safe. But the suggested modification is clearer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Status

    🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions