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

JIT orders surplus support for cow amm #2682

Merged
merged 7 commits into from
May 13, 2024

Conversation

m-lord-renkse
Copy link
Contributor

@m-lord-renkse m-lord-renkse commented May 1, 2024

Description

JIT orders surplus support for cow amm

Changes

  • Support only surplus fee for cow amm addresses
  • Calculate score for ALL the JIT orders !!

How to test

Tests are in another PR: #2699

Fixes #2635

@m-lord-renkse m-lord-renkse requested a review from a team as a code owner May 1, 2024 08:41
@m-lord-renkse m-lord-renkse marked this pull request as draft May 1, 2024 08:41
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch 7 times, most recently from f390c90 to c3dccc5 Compare May 2, 2024 13:31
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch 2 times, most recently from b961373 to 20b575a Compare May 7, 2024 12:55
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch 3 times, most recently from 6f3225f to da53807 Compare May 7, 2024 13:45
@m-lord-renkse
Copy link
Contributor Author

The tests can be found in another PR: #2699

@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch from da53807 to a7097a9 Compare May 7, 2024 13:53
@m-lord-renkse m-lord-renkse marked this pull request as ready for review May 7, 2024 14:18
@m-lord-renkse m-lord-renkse requested a review from MartinquaXD May 7, 2024 14:18
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Not really sure where the miscommunication happened but it was pointed out multiple times (slack, GH issues) that the change should be about counting the order surplus towards the solution score and NOT about applying protocol fees to JIT orders.

crates/driver/src/boundary/settlement.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/order/mod.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/solution/fee.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/solution/mod.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/solution/mod.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/solution/trade.rs Outdated Show resolved Hide resolved
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch from a7097a9 to fb91bfd Compare May 8, 2024 07:59
@m-lord-renkse m-lord-renkse requested a review from MartinquaXD May 8, 2024 08:03
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch 2 times, most recently from 7d62114 to 4d53879 Compare May 8, 2024 09:05
crates/driver/src/boundary/settlement.rs Outdated Show resolved Hide resolved
crates/driver/src/infra/config/file/mod.rs Outdated Show resolved Hide resolved
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch 2 times, most recently from da424a1 to 0d67d6c Compare May 8, 2024 10:42
@m-lord-renkse m-lord-renkse requested a review from fleupold May 8, 2024 10:58
crates/driver/src/domain/competition/solution/mod.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/solution/mod.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/solution/mod.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/solution/mod.rs Outdated Show resolved Hide resolved
crates/driver/src/infra/solver/dto/solution.rs Outdated Show resolved Hide resolved
crates/driver/src/infra/solver/dto/solution.rs Outdated Show resolved Hide resolved
crates/driver/src/infra/solver/dto/solution.rs Outdated Show resolved Hide resolved
crates/driver/src/infra/solver/mod.rs Outdated Show resolved Hide resolved
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch 2 times, most recently from ef56f59 to 0bbb938 Compare May 8, 2024 13:14
@m-lord-renkse m-lord-renkse requested a review from MartinquaXD May 8, 2024 13:14
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch 3 times, most recently from 20df656 to cc2d7e6 Compare May 9, 2024 07:56
@m-lord-renkse m-lord-renkse requested a review from MartinquaXD May 9, 2024 09:02
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Code looks good IMO. Just a few nits remaining.

crates/driver/src/infra/api/routes/solve/dto/auction.rs Outdated Show resolved Hide resolved
crates/driver/src/domain/competition/auction.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@sunce86 sunce86 left a comment

Choose a reason for hiding this comment

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

I don't see anything suspicious.

I'll capture the work needed to achieve the same with full colocated drivers (I don't think it should be part of this PR).

crates/driver/src/domain/competition/solution/mod.rs Outdated Show resolved Hide resolved
@m-lord-renkse m-lord-renkse force-pushed the 2635/jit-order-surplus-for-cow-amm branch from cc2d7e6 to b39093c Compare May 13, 2024 10:00
@m-lord-renkse m-lord-renkse merged commit e8dd50f into main May 13, 2024
10 checks passed
@m-lord-renkse m-lord-renkse deleted the 2635/jit-order-surplus-for-cow-amm branch May 13, 2024 10:46
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: JIT orders surplus support
4 participants