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
The processSwapFee function in the affected contract fails to handle token approvals correctly when distributing fees to stakers. The function directly calls approve with a new non-zero value (feeToStakers) without first resetting the approval to zero, which can cause the transaction to revert if the token contract enforces a strict approval change policy (e.g., requiring zero approval before setting a new non-zero value). This vulnerability can lead to denial of service (DoS) by preventing fee distributions and disrupting contract operations.
Recommendation
Modify the processSwapFee function to safely handle token approvals by:
First resetting the approval to zero before setting a new non-zero value.
Using the safeApprove pattern (if available) or implementing a two-step approval process