Comments (10)
I have created a wiki page on rounding.
https://github.com/habanoz/tezos-reward-distributor/wiki/Payment-Rounding
from tezos-reward-distributor.
My view is as-is should be preserved due to following arguments:
- I support the minimum payment amount policy for 0 fee customers.
- The leftovers are tiny and can still be regarded as 0.
- If delegation is so small that the reward amount is less than 1 millis, the delegate may need to pay the transfer fee for nothing in return.
from tezos-reward-distributor.
Probably a dumb question, but: Why is the min payment amount limited to 0.###?
from tezos-reward-distributor.
@nurikabe minimum payment amount is 1 milli-tezos. This is a choice made. It could have been a different amount, but I believe 1 milli-tezos is a fair amount.
Please note that a large min payment amount may result in a significant deduction from delegators share. A tiny min payment amount on the other hand may result in transfers amounting less than transfer fee.
I believen It is a good practive to limit decimal places. It is present in payment systems dealing with fiat currencies. After 3 digits decimals makes no sense for the delegator but it makes calculations harder. 1.23+0.345 and 1.230123+0.345002. Former is more managable.
from tezos-reward-distributor.
Could we make this a configuation parameter set to a sensible default of one-milli-tezos?
There are probably some edge cases we can't imagine where users may want to change this. For example, in my case I want to change minimum payout amount in dry-run mode to sanity check the numbers.
from tezos-reward-distributor.
For example, in my case I want to change the minimum payout amount in dry-run mode to sanity check the numbers.
Could you please provide some more details? I wish to understand how this will going to be useful.
If it will be helpful, we can add another parameter. However, I am afraid that more parameters will move the application into configuration hell. Let's just add parameters that many people will benefit from.
from tezos-reward-distributor.
For example, in my case I want to change the minimum payout amount in dry-run mode to sanity check the numbers.
Could you please provide some more details? I wish to understand how this will going to be useful.
I did some dry runs to make sure the calculations made sense. I was unaware of the rounding behavior; hence delegate calculations looked incorrect. This resulted in #26.
At the very least I think this rounding behavior should be clearly documented.
Personally I would like to turn the rounding off so that I can more easily review the calculations.
Similarly I can imagine wanting to change this rounding level in the future.
from tezos-reward-distributor.
OK. Let's make rounding behavior documented and configurable. Let's give the option to close the rounding behavior.
from tezos-reward-distributor.
Rounding behaviour is set to be configurable. pymnt_scale parameter is added to BusinessConfigurationX.py. Default is 3. It can be set to None to turn rounding off.
Example results are given below. Baking fee was 0.
When scale is 3.
2019-02-03 23:02:23,274 - main - INFO - producer - Reward created for cycle 57 address KT1BTr7z2SBpDxgUV7xR7mNmQzwaTDYDkuHz amount 4.793000 fee 0.000280 tz type D
2019-02-03 23:02:23,274 - main - INFO - producer - Reward created for cycle 57 address KT1MMhmTkUoHez4u58XMZL7NkpU9FWY4QLn2 amount 1.206000 fee 0.000000 tz type O
2019-02-03 23:02:23,275 - main - INFO - producer - Reward created for cycle 57 address tz1MWTkFRXA2dwez4RHJWnDWziLpaN6iDTZ9 amount 0.000999 fee 0.000000 tz type F
Some insight on calculations:
total rewards = 6
delegators reward = 4.793280
delegators pymnt = scale(4.79328,3) = 4.793000
owners total reward = 6 - 4.79328 = 1.2067199999999998
owners pymnt = scale(1.2067199999999998, 3) = 1.206
founders tota reward = 6 - ( 4.793000 + 1.206 ) = 0.0009999999999998899
founders pymnt = scale(0.0009999999999998899,6) = 0.000999
total_pymnt = 4.793 + 1.206 + 0.000999 = 5.999999000000001
When rounding is turned off.
2019-02-03 23:00:55,202 - main - INFO - producer - Reward created for cycle 57 address KT1BTr7z2SBpDxgUV7xR7mNmQzwaTDYDkuHz amount 4.793280 fee 0.000000 tz type D
2019-02-03 23:00:55,203 - main - INFO - producer - Reward created for cycle 57 address KT1MMhmTkUoHez4u58XMZL7NkpU9FWY4QLn2 amount 1.206720 fee 0.000000 tz type O
2019-02-03 23:00:55,203 - main - INFO - producer - Reward created for cycle 57 address tz1MWTkFRXA2dwez4RHJWnDWziLpaN6iDTZ9 amount 0.000000 fee 0.000000 tz type F
from tezos-reward-distributor.
Closing this issue. Get update. Test. Feel free to re-open.
from tezos-reward-distributor.
Related Issues (20)
- uncaught payout failures
- Payment for cycle 527 was off, overpaid delegates HOT 4
- Cleanup: min_payment_amt HOT 5
- Pre-commit hooks
- Configure script requires refactor
- Update docs to use octez-*
- Dry run command not reading correctly
- Batch payer class is unmanageable.
- exit status is always 0 even when TRD fails (in single-shot mode)
- Don't require signer to know about baker address
- Problem with using the new addresses as owner and founder. HOT 10
- Smoke tests are stuck in an infinite loop on the CI only HOT 1
- payouts in failed/backtracked transactions are marked as paid
- Signer auth HOT 2
- re-running failed operations with TzKT backend is so slow, it hangs HOT 2
- use `simulate_operation` instead of `run_operation` HOT 1
- TRD exiting with status code 1, even when it succeeds HOT 2
- Payment to KT always fails on first try, it goes through in a second attempt. HOT 1
- TzStats "offline_losses" is not working HOT 4
- -M 4 seems to be broken, wrong status for backtracked transactions and ctez vaults are no longer avoided
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tezos-reward-distributor.