• Stars
    star
    604
  • Rank 74,189 (Top 2 %)
  • Language
    Solidity
  • License
    GNU General Publi...
  • Created almost 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example arbitrage trading bot

Simple Dex Arbitrage

This code base was created as part of an intermediate solidity tutorial available here:

https://jamesbachini.com/dex-arbitrage/

Please note that Aurora on Near Protocol have now introduced gas/transaction fees. More info on their twitter account https://twitter.com/AuroraIsNear If running it on that chain you need a little ETH to pay gas fees in the owner address wallet that is firing off transactions.

Disclaimer

Note the code is provided for educational purposes, is unaudited and not fit for financial transactions. Use it to experiment with and build your own strategies. A technical support call center is not available if you get funds stuck so make sure to test the recover.js script before doing anything else. Use on a testnet with play money or with funds you are willing to lose.

Setup Instructions

Edit the .env-example.txt file and add a private key, create one using this script if necessary:- https://github.com/jamesbachini/Ethers-Vanity-Address

Build using the following commands:

git clone https://github.com/jamesbachini/DEX-Arbitrage.git
cd DEX-Arbitrage
mv .env-example.txt .env
npm install
npx hardhat run --network aurora .\scripts\deploy.js

Then add the arbContract deployment address to config/aurora.json edit the base assets and move the funds across to the the arbContract address.

Then to execute run:-

npx hardhat run --network aurora .\scripts\trade.js

Finally to recover any funds use the script.

npx hardhat run --network aurora .\scripts\recover.js

More info and solidity tutorials on my blog at https://jamesbachini.com

More Repositories

1

Server-Check-PHP

PHP script for Ram and CPU usage stats for server health check
PHP
76
star
2

Solidity-SBT-Soul-Bound-Token

An experiment in creating a soul bound token (SBT)
JavaScript
62
star
3

FriendTech-Trading-Bot

A trading bot for friend.tech
JavaScript
56
star
4

Uniswap-V3-Experiments

Some scripts to test and experiment with Uniswap v3
JavaScript
51
star
5

Solana-JSON

A library for storing and retrieving JSON data from the Solana blockchain
JavaScript
51
star
6

Solidity-Snippets

Useful Solidity Code Snippets
Solidity
46
star
7

Market-Maker-Bot

A market maker bot for managing liquidity on Uniswap
JavaScript
46
star
8

JANG-Just-Another-NFT-Generator

JANG is a Javascript tool used to create custom artwork for NFT collections
JavaScript
37
star
9

vanillaHTML

Vanilla HTML is a elegantly simple boilerplate for web development projects and websites
HTML
27
star
10

myVault

Private vault for yield farming
Solidity
22
star
11

EthereumHacker

Black Ops Ethereum Game
Solidity
21
star
12

Tokenomics-Boilerplate

A tokenomics boilerplate using hardhat & solidity for governance token, Uniswap liquidity pool, buy back mechanism and staking pools
Solidity
21
star
13

Twitter-Trading-Bot

A trading bot to execute trades based on specific mentions of a ticker by a Twitter user
JavaScript
21
star
14

Memecoin

Create Your Own Memecoin With Solidity and Uniswap
Solidity
17
star
15

Aurora-Trisolaris-Auto-Compound-Script

Harvest and stake TRI rewards on Triolaris farms (Aurora Near Protocol)
JavaScript
13
star
16

Order-Execution-Tests

Order execution strategies for delta neutral crypto trading on FTX
JavaScript
12
star
17

masterchef

Updated version of the sushi masterchef contract
Solidity
11
star
18

Encryption-VScode

AES file encryption for Visual Studio Code
JavaScript
10
star
19

Uniswap-v4-Tests

A test suite for working with Uniswap v4 Hooks
Solidity
10
star
20

LayerZero-Example

A simple test passing a string between Goerli and Optimism Goerli using LayerZero
Solidity
9
star
21

usETH

A sustainable high yield stablecoin backed by a delta neutral staked Ethereum position
JavaScript
8
star
22

Ethers-Vanity-Address

Quick script to make vanity addresses using Ethers (Slow)
JavaScript
8
star
23

Multichain-Analytics

An analysis of cross-chain bridging and swaps from Multichain.org
JavaScript
6
star
24

Token-Factory-Tutorial

Solidity token factory smart contract to deploy tokens from within solidity
JavaScript
6
star
25

Uniswap-V4-Torres-Token-Sale

A Solidity ERC20 token using Uniswap v4 hooks to create a compliant token sale system following judge Torres ruling in the XRP case
Solidity
6
star
26

DenoCode

Deno is a secure runtime for JavaScript and TypeScript.
HTML
6
star
27

Pine-Script-Examples

Pine Script Example Code For TradingView Indicators And Strategies
PostScript
6
star
28

jamesbachini

jamesbachini
5
star
29

CBDC-Central-Bank-Digital-Currency

An experiment in Solidity contract design for a ERC20 compatible CBDC
Solidity
5
star
30

SCRAP-Smart-Contract-Rapid-Analysis-Platform

A simple script for analysing growth metrics for DeFi smart contracts
JavaScript
5
star
31

Web3-PWA-Boilerplate

A boilerplate for a web3 progressive web app
HTML
5
star
32

TwitterNFT

A NFT for Twitter Blue Profile Picture
JavaScript
5
star
33

MetaSignature

A simple dApp for signing text and file hashes with metamask
4
star
34

solevm

Solana EVM compatible layer 2
Go
4
star
35

StayAwake.js

StayAwake.js | Prevent mobile browsers from falling asleep.
4
star
36

Ethereum-Transaction-Viewer

A script to download a wallet addresses transaction history
JavaScript
3
star
37

satoshisearch

Web scraper and text analyser of the metzdowd.com cryptography mailing list archives where Satoshi first posted the Bitcoin whitepaper. tl;dr Hal Finney is Satoshi
JavaScript
3
star
38

SolidStart

Solidity Hardhat & Foundry Deployer
JavaScript
3
star
39

Web3-Session-Keys

A test to explore how session keys can be used with digital wallets to authenticate users in a web3 environment
HTML
3
star
40

Simplifi

Simplified DeFi Frontends, Immutably Served From A Smart Contract
HTML
3
star
41

Gas-Paying-NFT

A NFT which holds liquid staking tokens in collateral from a mint fee. Staking yield is sold off and sent to holders so they always have some ETH for gas fees
JavaScript
3
star
42

PerpFactory

FTX on brink of collapse after liquidity crunch at crypto exchange
JavaScript
2
star
43

Python-Portfolio-Tracker

A crypto portfolio tracker using Python and the Coinbase API
Python
2
star
44

GiveForever

A perpetual donation vault using liquid staking tokens
JavaScript
2
star
45

Bitcoin-Prediction-Model

A data logger and keras model to predict the price of bitcoin
Python
1
star
46

feedbackbutton

A simple floating support or feedback button which loads a short form for websites
HTML
1
star
47

WSBsignal

A content filter and analytics script for WallStreetBets
HTML
1
star
48

USBT

Sustainable stablecoin backed by staked Ethereum basis trade
JavaScript
1
star
49

Ethereum-Health-Monitor

A monitoring application on NodeJS to track core Ethereum infrastructure
JavaScript
1
star
50

ReasonLigo-VSCode

A syntax highlight for ReasonLigo for development of Tezos smartcontracts
1
star
51

Unlock-Smart-Contract

An example of team & VC distributions transparent with bonuses in a smart contract
Solidity
1
star
52

WomenWhoCode

An evolving ERC721 NFT based on ERC20 staking
JavaScript
1
star
53

Whale-Watcher

Defi Whale Watching
JavaScript
1
star
54

DotEnv-Encrypted-Private-Keys

A demonstration of how to use AES encryption to secure private keys in .env files
JavaScript
1
star
55

SAFT-Simple-Agreement-For-Future-Tokens

A solidity smart contract and accompanying legal contract for saft token sales
JavaScript
1
star
56

Token-dApp

A Soroban token and react dApp using the Stellar SDK
Rust
1
star