Closed gnarlycow closed 4 months ago
Since tx generation may require auth params like permitInfo
while swap data / price impact is a mere simulation that doesn't require these, what we can do is to create a version of generateXXXTx
that takes the specified swapData
and amount0Min
/amount1Min
, and simply populates calldata according to these params.
done with solver integration https://github.com/Aperture-Finance/uniswap-v3-automation-sdk/pull/234
Currently we have
getRebalanceTx
to generate the tx, and anothergetRebalanceSwapInfo
to generate swap info and price impact. Frontend calls these separately, so the tx may be generated from a different blockchain state than swap info / price impact. As a result, the tx that user signs may not be consistent with the displayed swap info and price impact.The same goes for optimal mint and optimal increase liquidity.
We should provide a unified helper that generates tx, swap info, and price impact all generated from the same block number.