Skip to content

Conversation

@nicholaspai
Copy link
Member

From Audit

In the SpokePool contract, the speedUpDeposit function performs the following check on
the updatedRelayerFeePct variable:
require(updatedRelayerFeePct < 0.5e18, "invalid relayer fee");
Unlike the equivalent check in the deposit function, in this case the SignedMath.abs
function is not used, which allows the updatedRelayerFeePct value to reach or go below
the lower limit of -0.5e18 . An attempt by the relayer to fill this request will be rejected by the
_fillRelay function's fee check.
Consider using the SignedMath.abs function to ensure the updatedRelayerFeePct
argument provided to speedUpDeposit is within the expected limits.

## From Audit

In the SpokePool contract, the speedUpDeposit function performs the following check on
the updatedRelayerFeePct variable:
require(updatedRelayerFeePct < 0.5e18, "invalid relayer fee");
Unlike the equivalent check in the deposit function, in this case the SignedMath.abs
function is not used, which allows the updatedRelayerFeePct value to reach or go below
the lower limit of -0.5e18 . An attempt by the relayer to fill this request will be rejected by the
_fillRelay function's fee check.
Consider using the SignedMath.abs function to ensure the updatedRelayerFeePct
argument provided to speedUpDeposit is within the expected limits.
@nicholaspai nicholaspai added the OZ Audit - March 2023 Resolves issue discovered in March 2023 OZ Audit label Mar 15, 2023
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nicholaspai nicholaspai merged commit 857e787 into master Mar 16, 2023
@nicholaspai nicholaspai deleted the audit/l04 branch March 16, 2023 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OZ Audit - March 2023 Resolves issue discovered in March 2023 OZ Audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants