Install
openclaw skills install kyberswap-arbitragePerform triangular arbitrage on Base via KyberSwap by finding profitable token swaps, calculating optimal paths, and executing multi-hop trades with gas and...
openclaw skills install kyberswap-arbitrageTriangular arbitrage: profit from price differences between 3 tokens (e.g., USDC → ETH → USDT → USDC)
0x6131B5fae19EA4f9D964eAc0408E4408b2a37dD80x5F1dddbf348aC2BEbe18559BF0eDE9D3fE6ce35fconst router = new ethers.Contract(routerAddr, routerABI, provider);
// Get amounts out for exact input
const [amountOut] = await router.getAmountsOut(
amountIn, // Wei amount
[tokenA, tokenB, tokenC] // Path
);
profit = finalAmount - initialAmount - gasCosts
const tx = await router.swapExactTokensForTokens(
amountIn,
amountOutMin,
path,
recipient,
deadline
);
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA029130xfde4C96c85940E8F44A6D8d5e4fD4f4C4f9D8E80x42000000000000000000000000000000000000060x4200000000000000000000000000000000000006Common triangular paths:
amountOutMin = output * (1 - slippage%)