Token transfers should account for Token-2022 transfer fees to ensure vault balances reflect actual amounts received, maintaining the x * y = k invariant.
Specific Issue: The codebase assumes transfers in transfer_tokens (transfer.rs) and related operations (liquidity_operations.rs, swap_operations.rs) occur without fees, ignoring Token-2022’s transfer fee extension. This results in vault balances being lower than expected, breaking pool calculations and pricing.
Likelihood:Medium
Reason 1: Token-2022 tokens (e.g., with 1% fees) are increasingly used in Solana AMMs.
Reason 2: Users deposit or swap without fee checks, making this issue prevalent in affected pools.
Impact: High
Vault balances misalign with expected amounts, leading to underfunded swaps or liquidity provisions, causing user losses.
Breaks x * y = k, enabling arbitrage or pool manipulation.
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.