Skip to content

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

@ZenGround0

Description

@ZenGround0

Audit reference: [FIL-1132b525-L05]

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

Labels

No labels
No labels

Type

No type

Projects

Status

🎉 Done

Relationships

None yet

Development

No branches or pull requests

Issue actions