Files
staking-reward-streamer/test
r4bbit 10b6743d55 fix(Karma): prevent overflow errors when issuing rewards
As described in #206 it's theoretically possible to cause overflows when
either Karma is issued via `mint()` or `setReward()` because both
functions don't take the supply of the other "domain" into account.

This commit fixes this by performing an arithmetic operation on
`super.totalSupply()`, `totalDistributorAllocation` and the newly issued
`amount`.

If there's an overflow, the code will cause an overflow and reverts.
This ensure overflows can't happen *after* rewards have been issued.

Closes #206
2025-05-13 13:36:02 +02:00
..