Albort - Inconsistent Reserve Checks for Fee Deduction #77
Labels
Sponsor Disputed
The sponsor disputed this issue's validity
Won't Fix
The sponsor confirmed this issue will not be fixed
Albort
Medium
Inconsistent Reserve Checks for Fee Deduction
Summary
The reserve checks for the swap fee are only performed when
woopool_from.token_mint != woopool_from.quote_token_mint
.Vulnerability Detail
This inconsistency could lead to situations where the protocol cannot cover the fee from its reserves.
Impact
Code Snippet
https://github.com/sherlock-audit/2024-08-woofi-solana-deployment/blob/main/WOOFi_Solana/programs/woofi/src/instructions/query.rs#L118
Tool used
Manual Review
Recommendation
Perform the reserve check for the swap fee regardless of the token being swapped from or to.
The text was updated successfully, but these errors were encountered: