I noticed that in the implementation when converting sol to wsol, we only convert anotherAmount variable, but it is possible that in invariant changes. In that case, if anotherAmount is slightly smaller than the amount needed for the deposit, the instruction on the smart contract side will cause failure with the error Insufficient balance.
It is more ideal that in the computePairAmount the slippage is also passed(right now its passed as 0) and then the amount calculate will be more correct.
I noticed that in the implementation when converting sol to wsol, we only convert anotherAmount variable, but it is possible that in invariant changes. In that case, if
anotherAmount
is slightly smaller than the amount needed for the deposit, the instruction on the smart contract side will cause failure with the error Insufficient balance.It is more ideal that in the computePairAmount the slippage is also passed(right now its passed as 0) and then the amount calculate will be more correct.