← 返回
数据分析 中文

SaucerSwap Arbitrage

Perform triangular arbitrage on Hedera using SaucerSwap to find, calculate, and execute profitable multi-hop token swaps atomically.
在 Hedera 上利用 SaucerSwap 进行三角套利,自动发现、计算并原子执行盈利的多跳代币兑换。
harleyscodes
数据分析 clawhub v1.0.0 1 版本 99899.9 Key: 无需
★ 0
Stars
📥 998
下载
💾 19
安装
1
版本
#latest

概述

SaucerSwap Arbitrage

Overview

SaucerSwap is the main DEX on Hedera. Triangular arbitrage: profit from price differences between 3 tokens.

Key Contracts (Mainnet)

  • SaucerSwap V1: 0xcaec9706a4622D356d2D3aEd8f8D40c51f0C0dF
  • SaucerSwap V2: 0xA6F4E11E5D8A3F62A7D4E3E6B1E7F3C9E8F2A1B4

Get Quotes (V1)

const axios = require('axios');

async function getQuote(amountIn, path) {
  const [tokenA, tokenB, tokenC] = path;
  const url = `https://mainnet-api.saucerswap.fi/route?from=${tokenA}&to=${tokenB}&amount=${amountIn}`;
  const response = await axios.get(url);
  return response.data;
}

Token Addresses (Hedera)

  • HBAR: 0.0.1000 (wrapped: 0x... in EVM format)
  • USDC: 0.0.456719
  • USDT: 0.0.456720
  • ETH: 0.0.456721
  • WBTC: 0.0.456722
  • SAUCE: 0.0.456723

Arbitrage Logic

1. Check Prices

// Get prices for potential paths
const paths = [
  ['USDC', 'HBAR', 'USDC'],
  ['USDC', 'SAUCE', 'USDC'],
  ['HBAR', 'USDC', 'HBAR']
];

for (const path of paths) {
  const out = await getQuote(1000, path);
  const profit = out - 1000;
  console.log(`${path.join(' → ')}: ${profit}`);
}

2. Execute Swap

// Via HashPack or direct contract call
const tx = new ContractExecuteTransaction()
  .setContractId(poolAddress)
  .setFunction("swap")
  .setParameters([...]);

Safety Checks

  1. Slippage: Set min output = expected * 0.97
  2. Gas: Estimate network fees (tinybars)
  3. Pool Depth: Check liquidity before large trades
  4. Hedera Gossip: Account for network latency

Key Differences from EVM

  • No EOA signatures: Must use Hedera native signing
  • Network fees: Paid in tinybars (not gas)
  • Transaction types: Use HAPI, not EVM
  • Token format: Use 0.0.xxxxx not 0x...

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 07:39 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Hedera Transaction Builder

harleyscodes
构建、签名并提交 Hedera 交易,包括 HBAR 转账、代币操作和智能合约调用至 Hedera 网络。
★ 0 📥 1,342
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 199 📥 65,287
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 166 📥 60,295