Omniscia Alliance Block Audit

SubscriptionPaymentPortal Code Style Findings

SubscriptionPaymentPortal Code Style Findings

CON-01C: Inefficient Uniswap Integration

Description:

The system integrates with the Uniswap V2 router system while it ultimately always relies on a single trade pair and path.

Example:

contracts/subscription/SubscriptionPaymentPortal.sol
444uint256[] memory amounts = IUniswapV2Router01(uniswapRouter)
445 .swapExactTokensForTokens(
446 paymentConfig_.priceWithUSDT,
447 // max % slippage.
448 tknAmount_.fixedPointMul(FP_ONE - paymentConfig_.maxSlippage),
449 route_,
450 address(this),
451 // solhint-disable-next-line not-rely-on-time
452 block.timestamp
453 );

Recommendation:

We advise the pair between TKN and USDT to be utilized directly as it will significantly optimize the codebase's gas cost avoiding the very high overhead of the Uniswap V2 router.

Alleviation:

The Alliance Block team considered this exhibit but will retain the current behaviour for the current iteration of the codebase and will explore the optimization implications of this exhibit in a future iteration. As a result, we consider this exhibit acknowledged.