Submitted by WatchPug, also found by cmichel and hyh
LiquidityPool.sol#L330-L337
When the Executor calls sendFundsToUser(), the tokenGasPrice will be used to calculate the gas fee for this transaction and it will be deducted from the transfer amount.
However, since tokenGasPrice is uint256, the smallest chargeable amount is 1 wei Token for 1 gas. But there are tokens like WBTC (decimals = 8) or USDC (decimals = 6), for these tokens, even 1 wei of the token can be worth a lot of gas, if the tokenGasPrice is set to 1, gasFee will far more than the actual cost; if its set to 0, gasFee can only be 0.
Given:
Consider changing tokenGasPrice to a value with decimals of 18 and it should be used like this:
ankurdubey521 (Biconomy) acknowledged and commented:
pauliax (judge) decreased severity to Medium and commented:
