Odos smart order routing DEX aggregator. Best swap rates with patented SOR algorithm across 500+ liquidity sources.
Install with Tessl CLI
npx tessl i github:Demerzels-lab/elsamultiskillagent --skill odos71
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
Smart Order Routing DEX aggregator. Patented algorithm for best execution across 500+ liquidity sources.
This skill includes a referral fee (1%) to support development.
| Variable | Value | Description |
|---|---|---|
REFERRAL_CODE | 0 | Referral code (0 = default) |
FEE_RECIPIENT | 0x890CACd9dEC1E1409C6598Da18DC3d634e600b45 | EVM wallet to receive fees |
COMPACT | true | Use compact calldata for gas savings |
Fee Breakdown:
https://api.odos.xyzCHAIN_ID="1" # Ethereum
# Token addresses
INPUT_TOKEN="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" # ETH
OUTPUT_TOKEN="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" # USDC
INPUT_AMOUNT="1000000000000000000" # 1 ETH in wei
USER_ADDRESS="<YOUR_WALLET>"
# Referral configuration
REFERRAL_CODE="0"
curl -s -X POST "https://api.odos.xyz/sor/quote/v2" \
-H "Content-Type: application/json" \
-d "{
\"chainId\": ${CHAIN_ID},
\"inputTokens\": [{
\"tokenAddress\": \"${INPUT_TOKEN}\",
\"amount\": \"${INPUT_AMOUNT}\"
}],
\"outputTokens\": [{
\"tokenAddress\": \"${OUTPUT_TOKEN}\",
\"proportion\": 1
}],
\"userAddr\": \"${USER_ADDRESS}\",
\"slippageLimitPercent\": 1,
\"referralCode\": ${REFERRAL_CODE},
\"compact\": true
}" | jq '{
inAmounts: .inAmounts,
outAmounts: .outAmounts,
gasEstimate: .gasEstimate,
pathId: .pathId
}'PATH_ID="<PATH_ID_FROM_QUOTE>"
curl -s -X POST "https://api.odos.xyz/sor/assemble" \
-H "Content-Type: application/json" \
-d "{
\"userAddr\": \"${USER_ADDRESS}\",
\"pathId\": \"${PATH_ID}\",
\"simulate\": false
}" | jq '{
to: .transaction.to,
data: .transaction.data,
value: .transaction.value,
gasLimit: .transaction.gas
}'# Swap ETH + USDC to DAI
curl -s -X POST "https://api.odos.xyz/sor/quote/v2" \
-H "Content-Type: application/json" \
-d "{
\"chainId\": ${CHAIN_ID},
\"inputTokens\": [
{
\"tokenAddress\": \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\",
\"amount\": \"500000000000000000\"
},
{
\"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",
\"amount\": \"500000000\"
}
],
\"outputTokens\": [{
\"tokenAddress\": \"0x6B175474E89094C44Da98b954EesdeAC495271d0F\",
\"proportion\": 1
}],
\"userAddr\": \"${USER_ADDRESS}\",
\"slippageLimitPercent\": 1,
\"referralCode\": ${REFERRAL_CODE},
\"compact\": true
}" | jq '.'# Swap ETH to 50% USDC + 50% DAI
curl -s -X POST "https://api.odos.xyz/sor/quote/v2" \
-H "Content-Type: application/json" \
-d "{
\"chainId\": ${CHAIN_ID},
\"inputTokens\": [{
\"tokenAddress\": \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\",
\"amount\": \"${INPUT_AMOUNT}\"
}],
\"outputTokens\": [
{
\"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",
\"proportion\": 0.5
},
{
\"tokenAddress\": \"0x6B175474E89094C44Da98b954EedeAC495271d0F\",
\"proportion\": 0.5
}
],
\"userAddr\": \"${USER_ADDRESS}\",
\"slippageLimitPercent\": 1,
\"referralCode\": ${REFERRAL_CODE},
\"compact\": true
}" | jq '.'| Chain | ID | Native Token |
|---|---|---|
| Ethereum | 1 | ETH |
| Arbitrum | 42161 | ETH |
| Optimism | 10 | ETH |
| Polygon | 137 | MATIC |
| Base | 8453 | ETH |
| Avalanche | 43114 | AVAX |
| BSC | 56 | BNB |
| Fantom | 250 | FTM |
| zkSync Era | 324 | ETH |
| Linea | 59144 | ETH |
| Mantle | 5000 | MNT |
| Mode | 34443 | ETH |
curl -s "https://api.odos.xyz/info/tokens/${CHAIN_ID}" | jq '.tokenMap | to_entries[:10] | .[] | {symbol: .value.symbol, address: .key, decimals: .value.decimals}'curl -s "https://api.odos.xyz/info/liquidity-sources/${CHAIN_ID}" | jq '.[] | {id: .id, name: .name}'curl -s "https://api.odos.xyz/info/contract-info/v2/${CHAIN_ID}" | jq '{
routerAddress: .routerAddress,
executorAddress: .executorAddress
}'| Error | Cause | Solution |
|---|---|---|
NO_PATH_FOUND | No route available | Try different pair |
INSUFFICIENT_LIQUIDITY | Low liquidity | Reduce amount |
SLIPPAGE_EXCEEDED | Price moved | Increase slippage |
45f9fac
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.