Factory.estimateWithdrawalAmounts ouputs can lead to confusion
Summary
Factory.estimateWithdrawalAmounts ouputs can lead to confusion
Vulnerability Detail
Factory.estimateWithdrawalAmounts inputs are tokenA, tokenB, lpAmount and the outputs are amount0, amount1. In the case that tokenA > tokenB, amount0 will be from tokenB and amount1 will be from tokenA
tnquanghuy0512
medium
Factory.estimateWithdrawalAmounts ouputs can lead to confusion
Summary
Factory.estimateWithdrawalAmounts ouputs can lead to confusion
Vulnerability Detail
Factory.estimateWithdrawalAmounts inputs are tokenA, tokenB, lpAmount and the outputs are amount0, amount1. In the case that tokenA > tokenB, amount0 will be from tokenB and amount1 will be from tokenA
Impact
This can lead to confusion to users
Code Snippet
https://github.com/sherlock-audit/2023-06-real-wagmi/blob/82a234a5c2c1fc1921c63265a9349b71d84675c4/concentrator/contracts/Factory.sol#L195
Tool used
Manual Review
Recommendation
Change the output to amountA and amountB