Assessment reports>Singularity>Discussion>Return value of `uniswapLiquidityProvision`

Interpretability of uniswapLiquidityProvision return value

The UniswapLiquidityAssetManager contract's uniswapLiquidityProvision function returns a value FeesDetails memory feesDetails, which is constructed by the _releaseFundsAndPrepareLiquidityProvisionArgs function. The relevant code is the following:

feesDetails.serviceFee =
    feesDetails1.serviceFee +
    feesDetails2.serviceFee;

feesDetails.relayerRefund =
    args.relayerGasFees[0] +
    args.relayerGasFees[1];

We can see that the two types of fees are set by summing up fees arising from the two assets involved in liquidity provision. Thus for both of these sums, the two summands reflect different units so that their sum does not have any immediate interpretation. For example, one summand might be 5 USDC, and the other summand might be 1 ETH. Interpretability of the meaning of the sum 6 of the two numerical values is then questionable.

Singularity removed feesDetails from the codebase in

Zellic © 2024Back to top ↑