Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unreachable code #242

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Conversation

jj1980a
Copy link
Contributor

@jj1980a jj1980a commented Jun 17, 2024

Related audit issue: https://github.com/spearbit-audits/review-fastlane/issues/117

Removing unreachable code in _assign(). amount can never be 0.

Copy link
Contributor

@ephess ephess left a comment

Choose a reason for hiding this comment

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

OK, so I'm missing a bit of AtlETH knowledge here, but from what I can see:

  • When we want to unbond AtlETH, it goes through an escrow period.
  • During this escrow period, any time we access the account and lastAccessedBlock is updated, the escrow period resets.

If that's the case, then this change essentially means that the intent of the code from before the change, was that any time a solvers bid was considered as part of an ex post bids transaction, we would reset the escrow period. But this was never possible due to where this function is called from, so this code never executes, meaning we're not losing any behaviour from removing the code.

Looks good to me.

@jj1980a jj1980a merged commit 5bd3968 into spearbit-audit-fixes Jun 20, 2024
3 checks passed
@jj1980a jj1980a deleted the fix-117-unreachable-code branch June 20, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants