The "Lack of Slippage Protection in the Stake Function of the FjordStaking Contract" vulnerability indicates the absence of a mechanism to handle slippage during token transfers within the stake
function.
This function is responsible for transferring FJORD tokens from the user's address to the contract for staking. However, it does not account for potential slippage, which can occur if the actual number of tokens transferred is less than intended due to transaction fees or other factors. This oversight can lead to discrepancies in the contract's accounting, as the newStaked
and DepositReceipt
values may not accurately reflect the tokens received.
slippage occurs and fewer tokens are transferred than intended, the contract's internal records (e.g., newStaked and DepositReceipt) will not match the actual tokens received. This discrepancy can lead to inaccurate calculations for the user's stake, potentially affecting future rewards, interest, or dividends that the user is entitled to receive.
Potential Loss of Funds: Users may inadvertently lose tokens due to slippage without realizing it.
Manual review
recommended that the function verify the actual amount of tokens transferred and adjust the internal accounting accordingly.
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.