Reimplement Simple Arbitrage in Rust

Overview

Reimplement Simple Arbitrage in Rust

Example

Stack

Arbitrage Logic

  1. Find TKN/ETH pairs that exist in several Dexes.

  2. Update those pairs reserve using getReserve from UniswapFlashQuery.sol

  3. store reserve in Reserve struct WETH should always be reserve1

  4. calculated buy_price and sell_price

You might also like...
Stalin Binary Search, Rust implementation
Stalin Binary Search, Rust implementation

Stalin Binary Search Idea is based on Stalin Sort It's alike binary search but any checking element which is not target one is eliminated. Complexity

Supervised discretization in Rust

Discrust Supervised discretization in Rust The discrust package provides a supervised discretization algorithm. Under the hood it implements a decisio

"Algorithms for approximate string matching" in Rust, with Python bindings.

ukkonen Implementation of a bounded Levenshtein distance by Esko Ukkonen in "Algorithms for approximate string matching" in Rust, with Python bindings

Common data structures and algorithms for competitive programming in Rust
Common data structures and algorithms for competitive programming in Rust

algorithm-rs algorithm-rs is common data structures and algorithms for competitive programming in Rust. Contents TBA How To Contribute Contributions a

zine/book about bitmap drawing algorithms and math with code examples in Rust
zine/book about bitmap drawing algorithms and math with code examples in Rust

A Bitmapper's Companion - zine/book about bitmap drawing algorithms and math with code examples in Rust A small zine/book written in LaTeX. In progres

Pure Rust implementation of the Double Ratchet algorithm
Pure Rust implementation of the Double Ratchet algorithm

Double Ratchet A pure Rust implementation of the Double Ratchet, as specified by Trevor Perrin and Moxie Marlinspike. The Double Ratchet allows two us

A rust implementation of Alexey Akhunov's multiproof algorithm

multiproof.rs A rust implementation of Alexey Akhunov's multiproof algorithm. At the time of creation, multiproof is still a work in progress and this

Algorithms implemented in Rust, explained.

Rusty Algorithms & Data Structures for Learners This repository presents Rust implementations of common algorithms and data structures, many of which

 Example of a genetic algorithm in Rust and Python
Example of a genetic algorithm in Rust and Python

Example of a genetic algorithm in Rust and Python Monkey typewriter Finding the phrase 'To be or not to be. That is the question.' Inspired by the exa

Comments
  • Cargo build errors

    Cargo build errors

    Good day. I am trying to build the simple-arbitrage-rs app. Cargo build gives me the following errors:

    Attempt-1 Cargo.toml: ethers = { git = "https://github.com/thasarito/ethers-rs", feature="abigen" } Error: Updating git repository https://github.com/thasarito/ethers-rs Updating crates.io index Updating git repository https://github.com/rust-ethereum/ethabi Updating git repository https://github.com/hyperledger-labs/solang error: failed to select a version for generic-array. ... required by package elliptic-curve v0.11.6 ... which satisfies dependency elliptic-curve = "^0.11.6" (locked to 0.11.6) of package ecdsa v0.13.4 ... which satisfies dependency ecdsa = "^0.13.4" of package ethers-core v0.6.0 (https://github.com/thasarito/ethers-rs#a77bf845)

    Attempt-2 Cargo.toml: ethers = { version = "0.6.2", features = ["abigen"] } Error: error[E0432]: unresolved import ethers::contract::MultiAbigen --> build.rs:2:24 | 2 | use ethers::contract::{MultiAbigen}; | ^^^^^^^^^^^ no MultiAbigen in contract

    Do I need to install any other software before attempting the build?

    opened by GerhardLiebenberg 7
  • Fixes the pool get_pair call in case the pair does not exist

    Fixes the pool get_pair call in case the pair does not exist

    • if abigen! satisfies our needs, we can delete some of the bindings
    • I believe the bug was due to create_pool calling to get a pair that did not exist, which returns 0x, and it could not decode it. If it returns 0x, I have added unwrap_or(H160::zero()) instead.
    • added dbg for pool_a and pool_b
    • added dropping of ganache at the end of the test

    (we need another transaction in create pool to actually create a pool <- in absence of this, we would expect getPair to return address(0), which is what it does right now)

    opened by nazariyv 2
Owner
null
Fast, parallel, extensible and adaptable genetic algorithms framework written in Rust

oxigen Oxigen is a parallel genetic algorithm framework implemented in Rust. The name comes from the merge of OXIdación (Rust translated to Spanish) a

Martín Pozo 146 Dec 18, 2022
darwin-rs, evolutionary algorithms with rust

darwin-rs This library allows you to write evolutionary algorithms (EA) using the Rust programming language. Written by Willi Kappler, License: MIT -

Willi Kappler 95 Jan 1, 2023
Genetic Algorithm library in Rust

RsGenetic Summary and Features RsGenetic is a framework for executing genetic algorithms in Rust. It is designed to have a simple but modular API. Exa

Mathieu De Coster 74 Dec 27, 2022
Rust implementation of real-coded GA for solving optimization problems and training of neural networks

revonet Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also know

Yury Tsoy 19 Aug 11, 2022
Linear Programming for Rust, with an user-friendly API. This crate allows modeling LP problems, and let's you solve them with various solvers.

good_lp A Linear Programming modeler that is easy to use, performant with large problems, and well-typed. use good_lp::{variables, variable, coin_cbc,

Rust Operations Research 101 Dec 27, 2022
Raft implementation in Rust

rsraft Raft implementation in Rust. The aim of this project is implementing the Raft Consensus Algorithm as described in the paper, with the goal of f

Lauro Caetano 42 Dec 24, 2022
A tool used to evaluate the output of retrieval algorithms. Written in Rust.

Rusteval A tool used to evaluate the output of retrieval algorithms. Written in Rust. Building Install Rust with curl -sSf https://static.rust-lang.or

Giorgos Sfikas 17 Mar 22, 2022
This crate implements fast route planning algorithms in Rust.

This crate implements fast route planning algorithms in Rust. Algorithms Currently implemented: Contraction Hierarchies: The implementat

Payas Rajan 4 Aug 15, 2021
A browser app that evolves vehicles using genetic algorithms, written in Rust and Bevy

Vehicle Evolver Deluxe This is a simulation that uses AI (to be specific: genetic algorithms) to try to build better and better vehicles. The vehicles

null 95 Dec 26, 2022
Rust implementation of AstroBWT Proof-Of-Work algorithm

AstroBWT AstroBWT is a proof-of-work (PoW) algorithm based on Burrows-Wheeler transform (BWT). Developed and used by the DERO Project for Mobile (arm)

null 6 Mar 7, 2022