-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feat: charging broker fee per chunk and in USDC #5161
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5161 +/- ##
======================================
- Coverage 70% 70% -0%
======================================
Files 481 481
Lines 85760 85829 +69
Branches 85760 85829 +69
======================================
- Hits 60207 60106 -101
- Misses 22286 22452 +166
- Partials 3267 3271 +4 ☔ View full report in Codecov by Sentry. |
c5649e3
to
86aa05a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but i will let Dan approve.
76f7343
to
2e7b827
Compare
f5d07b7
to
927c8ae
Compare
…ovide-shared-data * origin/main: feature: Added benchmark for delete vote (#5189) Feat: charging broker fee per chunk and in USDC (#5161) Feat: solana deployments (#5188) chore: bouncer add check for solana nonces (#5185) # Conflicts: # state-chain/pallets/cf-elections/src/benchmarking.rs # state-chain/pallets/cf-elections/src/weights.rs
Pull Request
Closes: PRO-1540 and PRO-1483
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
The PR is indended to be reviewed by individual commits
broker_fee
field fromSwapRequested
toSwapExecuted
(FYI @zoheb391 and @acdibble). Don't think there are any other implications for the product, other than brokers noticing that only their USDC balance is changing.swap_broker_fee_subtracted_from_swap_amount
was mostly a duplicate so I merged it withexpect_earned_fees_to_be_recorded
.Ccm
andRegular
variants from SwapRequestState intoUserSwap
. Didn't really result in code deduplication, but at least we no longer repeat swap parameters (like the newly added broker_fees).Edit: Updated broker fee tests in bouncer. Because all fees are charged in USDC I ended up leaving only a test for one asset (as opposed to all assets). Keeping all assets seems no longer necessary, and wouldn't be trivial (would likely require running the tests sequentially or with multiple broker account).