X9Developers / XSN

XSN - Stakenet, the first cryptocurrency with Trustless Proof of Stake
https://stakenet.io
MIT License
93 stars 49 forks source link

avoid interger rounding #145

Closed rikublock closed 1 year ago

rikublock commented 5 years ago

Two significant digits were lost during percentage based tpos reward calculations due to integer rounding. Should multiply first and then divide.

Problem: A reward value of 1.23456789 encoded as int (CAmount): 123456789 123456789 / 100 becomes 1234567, information about the digits '89' is lost

I also don't see overflow becoming an issue currently.

AlexITC commented 3 years ago

@durkmurder overall this looks reasonable, what do you think?

Fiko1414 commented 2 years ago

Stakenet io giriş yapamıyorum xsn lerim orda kaldı nasıl cekecez

Nexlab-One commented 2 years ago

Stakenet io giriş yapamıyorum xsn lerim orda kaldı nasıl cekecez Check the discord