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

Add property to verify that fee distributions are optimal. #26

Merged
merged 5 commits into from
Mar 25, 2020

Conversation

jonathanknowles
Copy link
Contributor

Related Issue

Preparation for #21.

Summary

This PR adds a simple property to verify that the fee distribution produced by distributeFee is optimal.

Since distributeFee is restricted to generating integer fee distributions, for any given distribution there will be some deviation from the ideal unrounded fee distribution, caused by the particular choice of rounding.

This property verifies that the absolute deviation from the ideal unrounded fee distribution is minimal across all possible ways to round.

Since the `distributeFee` function is restricted to generating integer
fee distributions, there will be some deviation from the ideal unrounded
fee distribution, caused by rounding.

This property verifies that the absolute deviation from the ideal
unrounded fee distribution is minimal across all possible ways to round.
@jonathanknowles jonathanknowles self-assigned this Mar 25, 2020
@jonathanknowles jonathanknowles changed the title Add property to verify that fee distribution is optimal. Add property to verify that fee distributions are optimal. Mar 25, 2020
Copy link
Contributor

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

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

looks fine

@jonathanknowles jonathanknowles merged commit 3070c95 into master Mar 25, 2020
@jonathanknowles jonathanknowles deleted the jonathanknowles/distributeFeeOptimal branch March 25, 2020 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants