You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curation: remove totalTokens accounting and use balanceOf()
Initially we decided to use our own tracking of tokens used for curation
to exclude tokens that might have been sent directly to the contract that could
distort the rewards calculation.
We had an issue in the totalTokens accounting that didn't account for the collected tokens.
This lead to a mismatch in rewards proportional to total collected funds, but a bigger issue
was that it could make the burn() function to fail as more tokens were in the contract than
the expected in our own accounting.
We find that there is no incentive to send tokens directly to the contract to distort
those calculations and it is both more gas-efficient and safer to use balanceOf to
get the signalled tokens from the Curation contract when querying from RewardsManager.
This commit implements the use of balanceOf(Curation) from the RewardsManager to get totalTokens used
for Curation.
0 commit comments