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

Fix issue 1780: Market fees of settle orders aren't shared to referral program #2132

Merged
merged 10 commits into from
Apr 10, 2020

Conversation

abitmore
Copy link
Member

@abitmore abitmore commented Apr 5, 2020

Follow-up PR for #1780.

Reviews were here: #1842.

Alexey Frolov and others added 3 commits July 8, 2019 17:31
@abitmore abitmore self-assigned this Apr 5, 2020
Resolved conflicts:
- libraries/chain/db_market.cpp
- tests/tests/settle_tests.cpp
@abitmore abitmore force-pushed the way-old-hardfork-for-issue-1780 branch from fd408f0 to 23008cd Compare April 9, 2020 13:41
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
@abitmore abitmore marked this pull request as ready for review April 9, 2020 17:10
@abitmore abitmore merged commit db5bb12 into hardfork Apr 10, 2020
@abitmore abitmore deleted the way-old-hardfork-for-issue-1780 branch April 10, 2020 14:44
// 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 );
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Contributor

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? :)

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants