Description The reward distribution protocol, which manages a pot of rewards for players, is incompatible with rebasing tokens. This incompatibility creates a discrepancy between the recorded reward amounts for each player and the actual token balances available for distribution.
Impact
Users may receive incorrect reward amounts:
In the case of positive rebasing, users might receive less than their actual share.
In the case of negative rebasing, the contract might attempt to send more tokens than available.
The total distributed rewards may not match the actual balance held by the contract.
This discrepancy could lead to funds being locked in the contract or unfair distribution among players.
Proof of Concept
The protocol stores the total rewards and individual player rewards in an array.
Rebasing tokens in the contract's address undergo supply adjustments (rebasing).
The stored values in the array remain static and do not reflect these supply adjustments.
When a user withdraws, they receive the amount recorded in the array, which may not match the actual
rebased token balance.
Recommended Mitigation
Dynamic Balance Tracking: Implement a mechanism to update stored reward values after each rebasing event. This could involve creating a hook that is triggered by rebasing events.
Regular Balance Reconciliation: Implement a function to periodically reconcile stored values with actual token balances. Adjust individual reward records proportionally based on any discrepancies found.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.