Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
BSIP67: Dynamic Market Fees #133
base: master
Are you sure you want to change the base?
BSIP67: Dynamic Market Fees #133
Changes from 31 commits
2074c23
015c210
ad28bd4
38eecaa
7af44c0
0b09a84
2954b7c
ed77dfc
aa8daf3
a30b126
3e02f82
d25bb10
88eda95
3b3a39b
340db90
cedf2cf
9419c6c
1db21e0
9a3276c
e5592e8
8d2bed6
64eadd8
a88200f
2df002e
15f7d50
2b2766f
b64a867
e907ae6
abd61f0
d41c1ab
b93a916
857ad58
6ba1f10
a386f53
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Please elaborate. Since the given table is only meant as an example, how is that property to be set up and evaluated, and which degrees of freedom does this allow?
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 table is an example. UIA owner can edit this table, set up a percent and trading volume.
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.
That still doesnt define what the degrees of freedom are
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.
Is a switch here necessary?
All assets can support this market fee. The default is how it is now, and if the dynamic one is set, the dynamic one will be used.
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.
In the current implementation, the switch provides supplementary features for UIA owners.
We consider the switching to be the most convenient way for users as a table is restored in one click.
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.
Is this already implemented?
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.
I'd suggest to enhance this BSIP by allowing maker/taker differentiation also for normal market fee (default is only one value for market fee, which is then used for maker and 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.
It's a good point! We will update BSIP.
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.
What is the difference of "Average trading volume over the last 30 days" to "30-day volume".
avg(30-day-volume) vs. sum(30-day-volume) as the metric to calculate the discount?
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.
The difference is in the methods of updating statistics.
In the first case, statistics are updated every day on the principle of a sliding window: the trading volume of the previous day is subtracted from statistics.
In the second case, the average number of trades volume for the entire period is subtracted.
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.
Why not use an Exponentially Weighted Moving Average? This would seem the obvious win to me, as EWMAs are efficient to calculate (linear in the number of samples) and store (constant state size).
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.
You'll need a statistic for every base asset (think USD) that you have traded.
Also stats should be reset after x weeks (4)
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.
Of course, there will be many of such objects per user (for each asset).
trade_statistics_objects will be stored in trade_statistics_index ordered by statistics object owner (user), asset.
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.
This can clutter the up the current state database significantly. Please indicate how garbage collection will work
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.
We plan to collect garbage while maintenance interval once a day in order to remove old data from the index.
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.
We can't use
share_type
for this data due to the high possibility of overflow. I guess a 128-bit data type would be sufficient, and in the implementation still need to deal with overflows.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.
Please add a easy-to-understand Summary for the Shareholders
What are the additional leverages created for BTS holders, what are the benefits? Also, where are the risks?
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.
Dynamic market fee is an additional marketing tool to encourage traders. So, this BSIP helps to boost trading volume on BitShares and attract new traders to the ecosystem.