-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Rounding Error is fixed Before, when we would call the following, it would double count for the `leftover_rewards` in `rewards_processed` ```rust // DAO gets any remainder { let leftover_rewards = self.ncn_fee_group_rewards(group)?; self.route_from_ncn_fee_group_rewards(group, leftover_rewards)?; self.route_to_base_fee_group_rewards(BaseFeeGroup::dao(), leftover_rewards)?; } ``` This is because we increment `rewards_processed` when we route to the `ncn_fee_group_rewards` or `base_fee_group_rewards`, however in the example above, we routed to ncn, counted and then routed to base, counted. The fix is to increment `rewards_processed` only when we route from the reward pool. ( Note, `rewards_processed` is only decremented on the distribute functions ) This has also been changed in NcnRewardRouter for coherence.
- Loading branch information
1 parent
3613f86
commit 9d583e9
Showing
4 changed files
with
78 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters