flashswap-arbitrage-avalanche
Crypto arbitrage bot that searches multiple token exchanges on the Avalanche blockchain for a significant difference in price between two tokens. Once a arbitrage opportunity is found the bot will execute the simultaneous buying and selling of the tokens through a flash swap provided by token exchanges (selected exchanges are forks of the Uniswap V2 Smart Contract).
시스템 구조
저장소별 전략/실행 조건 확인 필요
거래소 API 기반 자동 주문 실행
에디터 요약저장소 설명과 공개 메타데이터 기준으로 암호화폐 거래 봇, 거래소 API/프레임워크, 차익거래, 기술적 분석 성격의 프로젝트로 파악했습니다. 확인 근거는 README, 저장소 토픽, 저장소 설명, GitHub 지표, 파이프라인 필드이며, 주요 데이터는 암호화폐 거래소 시장 데이터, 가격/거래량 데이터입니다. 전략/실행 조건은 저장소별 문서와 코드 확인이 필요하며, 실행 방식은 "거래소 API 기반 자동 주문 실행"라고 보수적으로 기록했습니다. GitHub 지표는 별 140개, 포크 45개입니다.
| 저장소 | cjthoma1/flashswap-arbitrage-avalanche |
|---|---|
| 제작자 | cjthoma1 |
| 스타 / 포크 | ★ 140 / 45 |
| 라이선스 | BSD-3-Clause |
| 최근 업데이트 | 2023-02-04 |
| 스냅샷 시점 | 2026-07-08 (아래 README는 이 시점의 사본입니다) |
아래는 제3자가 작성·공개한 오픈소스 코드입니다. QuantField는 해당 코드의 동작과 안전성을 보증하지 않으며, 설치·실행 전 코드를 직접 검토하시기 바랍니다.
README
Introduction
Avalanche is an open-source platform for launching decentralized applications and enterprise blockchain deployments in one interoperable, highly scalable ecosystem. Avalanche gives you complete control on both the network and application layers—helping you build anything you can imagine.
The Avalanche Network is composed of many blockchains. One of these blockchains is the C-Chain (Contract Chain), which is an Ethereum Virtual Machine instance. The C-Chain's API is almost identical to an Ethereum node's API. Avalanche offers the same interface as Ethereum but with higher speed, higher throughput, lower fees and lower transaction confirmation times. These properties considerably improve the performance of DApps and the user experience of smart contracts.
The goal of this guide is to lay out best practices regarding writing, testing and deployment of smart contracts to Avalanche's C-Chain. We'll be building smart contracts with development environment Hardhat.
Prerequisites
NodeJS and Yarn
First, install the LTS (long-term support) version of nodejs. This is 16.14.2 at the time of writing. NodeJS bundles npm.
Next, install yarn:
npm install -g yarn
Getting Started
Create .env file
Add env variable equal to your metamask private key Steps to get key
METAMASK_PRIVATE_KEY=<private key>Intall your dependencies
yarnRun arbitriage bot (Check package.json for options)
yarn run arb:pangolin:joe:wavax:usdt --network mainnet
AvalancheGo and Avash
AvalancheGo is an Avalanche node implementation written in Go. Avash is a tool to quickly deploy local test networks. Together, you can deploy local test networks and run tests on them.
Solidity and Avalanche
It is also helpful to have a basic understanding of Solidity and Avalanche.
Write Contracts
Edit the Coin.sol contract in contracts/. Coin.sol is an Open Zeppelin ERC20 contract. ERC20 is a popular smart contract interface. You can also add your own contracts.
Hardhat Config
Hardhat uses hardhat.config.js as the configuration file. You can define tasks, networks, compilers and more in that file. For more information see here.
In our repository we use a pre-configured file hardhat.config.ts. This file configures necessary network information to provide smooth interaction with Avalanche. There are also some pre-defined private keys for testing on a local test network.
Hardhat Tasks
You can define custom hardhat tasks in hardhat.config.ts