nucypher / nucypher-contracts

Ethereum contracts supporting TACo applications on the Threshold Network.
16 stars 11 forks source link

Revisit rounding strategies during reward calculation #260

Open cygnusv opened 4 months ago

cygnusv commented 4 months ago

From GH (https://github.com/nucypher/nucypher-contracts/pull/254#discussion_r1587594690):

Vicky:  now I see your question, but I didn't do that on purpose, reason is it could produce different result because of rounding errors, for all other places it's division first and then addition/subtraction.

Continuing discussion on Discord:

David:  re: rounding errors, in general, addition & subtraction before division would yield less rounding errors
Vicky:  But it will produce different errors, and easily it will create authorizedOverall different to sum of authorized