docs: update docs at testSplitInputCyclicSwap and testSplitOutputCyclicSwap

This commit is contained in:
royvardhan
2025-03-10 18:09:46 +05:30
parent bb10efc0cc
commit bd6f74ca9c

View File

@@ -1232,12 +1232,11 @@ contract TychoRouterTest is TychoRouterTestSetup {
function testSplitInputCyclicSwap() public { function testSplitInputCyclicSwap() public {
// This test has start and end tokens that are the same // This test has start and end tokens that are the same
// The flow is: // The flow is:
// ┌─── WETH (USV3 Pool 1) ───┐ // ┌─── 60% ──> WETH ──> USDC ───┐
// //
// USDC (60% split) ─┤ ─> USDC // USDC ──────┤ ├──> USDC
// // │ |
// └─── WETH (USV3 Pool 2) ───┘ // └─── 40% ──> WETH ──> USDC ───┘
//
// 60% of USDC is swapped to WETH using Pool 1, then swapped back to USDC using Pool 2 // 60% of USDC is swapped to WETH using Pool 1, then swapped back to USDC using Pool 2
// 40% of USDC is swapped to WETH using Pool 2, then swapped back to USDC using Pool 1 // 40% of USDC is swapped to WETH using Pool 2, then swapped back to USDC using Pool 1
uint256 amountIn = 100 * 10 ** 6; uint256 amountIn = 100 * 10 ** 6;
@@ -1300,11 +1299,11 @@ contract TychoRouterTest is TychoRouterTestSetup {
function testSplitOutputCyclicSwap() public { function testSplitOutputCyclicSwap() public {
// This test has start and end tokens that are the same // This test has start and end tokens that are the same
// The flow is: // The flow is:
// ┌─── (USV3 Pool 1, 60% split) ───┐ // ┌─── (USV3, 60% split) ───┐
// //
// USDC ──(USV2)── WETH ├─> USDC // USDC ──(USV2) ── WETH──| ├─> USDC
// //
// └─── (USV3 Pool 2, 40% split) ───┘ // └─── (USV3, 40% split) ───┘
uint256 amountIn = 100 * 10 ** 6; uint256 amountIn = 100 * 10 ** 6;
deal(USDC_ADDR, tychoRouterAddr, amountIn); deal(USDC_ADDR, tychoRouterAddr, amountIn);