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

Addressed a front-running vulnerability in the matching engine #1228

Conversation

jalextowle
Copy link
Contributor

Description

This PR allows traders to set a counterparty and fee recipient for their trade. This prevents front-running that could violate the trader's intentions. These parameters are optional and will be ignored if they are set to address(0).

@jalextowle jalextowle changed the base branch from main to jalextowle/fix/on-morpho-callback-caller December 16, 2024 21:48
@coveralls
Copy link
Collaborator

coveralls commented Dec 16, 2024

Pull Request Test Coverage Report for Build 12939610278

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 89.255%

Totals Coverage Status
Change from base Build 12938071562: 0.02%
Covered Lines: 2924
Relevant Lines: 3276

💛 - Coveralls

@Sean329
Copy link

Sean329 commented Dec 17, 2024

Talked to Alex offline for some questions wrt this change. The PR looks good

@jalextowle jalextowle merged commit 1a6e084 into jalextowle/fix/on-morpho-callback-caller Jan 23, 2025
11 checks passed
@jalextowle jalextowle deleted the jalextowle/fix/matching-engine-frontrunning branch January 23, 2025 22:56
github-merge-queue bot pushed a commit that referenced this pull request Jan 24, 2025
* Ensure that Morpho is the caller of `onMorphoFlashLoan`

* Updated coverage job

* Addressed a front-running vulnerability in the matching engine (#1228)

* Allow traders to specify the counterparty and fee recipient of their trades

* Added a non-reentrancy modifier to `cancelOrders` (#1229)
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.

4 participants