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

Oracle voting owner deposit calculation #1146

Open
Zen-44 opened this issue Sep 2, 2024 · 0 comments
Open

Oracle voting owner deposit calculation #1146

Zen-44 opened this issue Sep 2, 2024 · 0 comments

Comments

@Zen-44
Copy link

Zen-44 commented Sep 2, 2024

The current way of calculating the owner deposit introduces some small errors since the value 5000 is divided first and then multiplied:
ownerDeposit = 5000 / networkSize * committeeSize

For example, a network wide oracle deployed to 1205 identities has a ownerDeposit of 5000.0000000000000595 iDNA

Is there any reason why the multiplication is not done first in the oracle voting smart contract? Something like this:
ownerDeposit = 5000 * committeeSize / networkSize
This would at least guarantee an exact amount for any network wide oracle.

I noticed this while developing the Oracle Loan tool since these really small float values can easily get discarded.

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

No branches or pull requests

1 participant