Atomic Arbitrage - A base example of a bare implementation of an arbitrage bot

Overview

Atomic Arbitrage

Atomic Arbitrage is a base example of a bare implementation of an arbitrage bot. Written in Go based off an old example bot. Starting with UNI V2 arbs before moving onto UNI v3, Balancer, and Curve arbitrage.

Contributing?

Just tackle a To-Do task and submit a PR, ideally once done I can make some Github actions to test speed and determine if PRs actually improve efficiency. Also if you have design/architecture improvements file and issue and I will start on them, not sure how to make public right away so starting with a conceptually simple bot then gradually evolve it over time.

To - do

  • - Re-write flash-swap to Yul+ instead of Solidity
  • - Build out an example test environment (hopefully in Foundry cramming in Yul+ via FFI and yul-log)
  • - Clean up code structure
  • - Move off hardcoded pairs from json, use event listening with Geth to reconstruct an in-memory db of all pairs for each exchange. (Recreate from factory logs at cold boot)
  • - GraphQL interface instead of relying on JSON-RPC (although this can also be skipped by just moving straight to Geth)
  • - Fuzzing Tests with Go 1.18beta2
  • - Better transaction signing and construction (ie call uniswap call() first then direct it to the arb contract rather than having a contract call it first)
  • - e2e tests and timing
  • - Detect more swaps than just swapExactTokensForTokens (or just use a better method to detect arb opportunities, and dive into the mempool)
  • - Organize Code from flat repo, and fix a lot of code-style issues
  • - Goroutine stuff
  • - Remove interfaces in favor of generics where possible? (I think Generics are faster?)
  • - Transactions is also mostly unfinished and un optimized in any way
  • - Has also occured to me file names may need to be changed to be more inline with what they actually do

Go Notes

Some good talks if you are bored, if you want to learn how to make your Go code run faster.

You might also like...
Example blog built with Go and the Cosmic Headless CMS 🔥
Example blog built with Go and the Cosmic Headless CMS 🔥

Go + Cosmic This repo contains an example blog starter that is built with Go, and Cosmic. See live demo hosted on Heroku Prerequisites Go (I recommend

this is an example of hystrix-go usage in web dev

hystrix-go-example this is an example of hystrix-go usage in web dev Explanation this example contains 2 service: alpha as our main service, circuit b

Concurrency Lab 1 Go Example
Concurrency Lab 1 Go Example

Concurrency Lab 1 If you're stuck look at examples on Go by Example Using the lab sheet There are two ways to use the lab sheet, you can either: creat

Concurrency Lab 2 Go Example
Concurrency Lab 2 Go Example

Concurrency Lab 2 If you're stuck look at examples on Go by Example Using the lab sheet There are two ways to use the lab sheet, you can either: creat

An example event-driven application using Atmo and NATS

Atmo + NATS Example Project This repo is an example of using Atmo with NATS as a streaming messaging layer. In this example, Atmo connects to NATS and

Minimal example app of hexagonal architecture in go

Hexagonal Architecture Minimal example of hexagonal architecture (ports & adapters) in go. Resources T

Example app using labstack/echo and ozzo-validator.

Example app using labstack/echo and ozzo-validator.

Example hello-world service uses go-fx-grpc-starter boilerplate code

About Example hello-world service uses https://github.com/srlk/go-fx-grpc-starter boilerplate code. Implementation A hello world grpc service is creat

Go clean architecture fully working example

Burp - clean architecture app Burp is a CRUD app managing beers. Front-end is written in Angular 12. Database in this example is mongodb. Root project

Comments
  • Clean up code structure

    Clean up code structure

    I restructured the file architecture and put all of the important logic into separate packages. I also updated the repo to Go 1.18. Let everything compiles and tests run with no problems with go test ./...

    Let me know if there is anything that should be changed/tweaked!

    opened by 0xKitsune 0
Owner
null
[TOOL, CLI] - Filter and examine Go type structures, interfaces and their transitive dependencies and relationships. Export structural types as TypeScript value object or bare type representations.

typex Examine Go types and their transitive dependencies. Export results as TypeScript value objects (or types) declaration. Installation go get -u gi

Daniel T. Gorski 172 Dec 6, 2022
An atomic counter that also tracks and calculates a rate written in Go.

An atomic counter that also tracks and calculates a rate written in Go.

Enterprize Software 1 Oct 27, 2021
Type-safe atomic values for Go

Type-safe atomic values for Go One issue with Go's sync/atomic package is that there is no guarantee from the type system that operations on an intege

Alec Thomas 17 Apr 8, 2022
Go implementation of the XDG Base Directory Specification and XDG user directories

xdg Provides an implementation of the XDG Base Directory Specification. The specification defines a set of standard paths for storing application file

Adrian-George Bostan 304 Dec 23, 2022
This example implements a basic example of how to create your own modules, and how to call them from other modules

This example implements a basic example of how to create your own modules, and how to call them from other modules. In addition, an example of how to do unit tests is developed.

null 1 Feb 1, 2022
Golang CS:GO external base. Development currently halted due to compiler/runtime Golang bugs.

gogo Golang CS:GO External cheat/base. Also, my first Golang project. Wait! Development momentarily halted due to compiler/runtime bugs. Disclaimer Th

cristei 2 Jun 25, 2022
Golang Base Code

Golang Base Code Getting Started Clone repository. git clone [email protected]:mo-t

Moh Taufiqur Rohman 0 Dec 14, 2022
An example client implementation written in GO to access the CyberVox platform API

About This is an example client implementation written in GO to access the CyberVox platform API.

Cyberlabs AI 15 Nov 7, 2022
Example programs for the Gio project.

Gio Examples Example programs for the Gio project. Issues File bugs and TODOs through the issue tracker or send an email to ~eliasnaur/[email protected].

Gio 82 Dec 20, 2022
This is an example of the cobra project

Devops cmd and mian.go This is an example of the cobra project Execute the following command in the current path to compile the project,you will appea

flyone 5 Sep 6, 2022