-
Notifications
You must be signed in to change notification settings - Fork 649
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
Fix issue 1780: Market fees of settle orders aren't shared to referral program #2132
Conversation
Fix: Market fees of settle orders aren't shared to referral program
Resolved conflicts: - libraries/chain/db_market.cpp - tests/tests/settle_tests.cpp
fd408f0
to
23008cd
Compare
Pay market fee and share it with the referral program when settling an amount of a globally settled asset after the core-1780 hard fork, for issue #1780
* Add new test cases for instant settlement market fee sharing * Update old test cases to test more data
// performance loss. Needs testing. | ||
if( d.head_block_time() >= HARDFORK_CORE_1780_TIME ) | ||
{ | ||
auto issuer_fees = d.pay_market_fees( fee_paying_account, settled_amount.asset_id(d), settled_amount ); |
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.
@abitmore This invocation of pay_market_fees
from the evaluator is difficult to resolve and merge with another PR from simple maker-taker fees from BSIP81 because the market fee will be dependent on whether the order is considered to be a maker or taker.
I am attempting to find a reasonable manner to merge these two PRs. Because this line of logic applies during a global settlement where the settlement pool is waiting, is it reasonable to consider this settlement order as a taker?
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.
Yes, the settlement order is always taker.
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.
Actually, the settlement order can be maker sometimes if we implemented bsip73.
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.
A side note, since there is no virtual fill_order_operation
generated for instant settlement, neither the price nor the volume would be in the HTLCV charts.
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.
If I merge this before the BSIP73 PR, can I ignore the problem? :)
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.
Sure. I believe 73 will be worked on only after this.
Follow-up PR for #1780.
Reviews were here: #1842.