Complex Path Trade Simulation
Simulate Complex Path (Ethereum only ATM). Performs trade using real swap
method inside the liquidity pool, sets real balanceOf
of the startAsset
for the trade.
The Request limit is 100,000,000 gas units per request.
Supported Exchanges: uniswapV2
, uniswapV3
, curvePool
.
Request Example:
curl --location 'http://18.223.66.155:8020/compute-complex-path' \
--header 'Content-Type: application/json' \
--data '{
"startAsset": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"startAmount": 1000000000000000000,
"steps": [
{
"uniswapV3": {
"pool": "88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640",
"token_in": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"token_out": "A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
},
{
"uniswapV2": {
"pool": "b4e16d0168e52d35cacd2c6185b44281ec28c9dc",
"token_in": "A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"token_out": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
}
]
}'
Response Example:
{
"amountOut": "997913322637794544",
"amountOutHops": [
"2311389439",
"997913322637794544"
],
"totalGasUsed": "182971"
}
Last updated