Giter Club home page Giter Club logo

new-bedford's Introduction

New Bedford

Node.js CI

New Bedford is a (massively) upgraded version of Nantucket that some of you are probably familiar with. I'm releasing this now because I don't feel like making upgrades for the new Chainlink oracle setup (and I don't want to pay for bloXroute to backrun the price updates). Despite this lack of compatibility, I hope something in here is useful to someone.

Features

Solidity

  • ๐Ÿฆ„ Liquidate via Uniswap (v2) flash swaps
    • Intelligently select between 1 hop vs 2 hop paths based on expected slippage
  • ๐Ÿ”ข Liquidate multiple accounts at once
  • ๐Ÿงฎ Compute repay amounts atomically on-chain
  • โ›ฝ๏ธ Burn CHI to reduce gas costs or use custom CHI-like implementation to avoid extraneous transfers and emits
  • ๐Ÿท Atomically post prices to Compound's Open Price Feed
    • This won't work anymore because of Chainlink ๐Ÿ˜ž
  • โ› Updateable MinerPayer in case Flashbots makes searchers pay a contract
  • ๐Ÿ“ฆ Adjust % paid to miner at bundle creation time
  • ๐Ÿฅธ Incognito mode for PGAs - rotate to & from addresses after each successful transaction

NOTE: These features are spread across the ethereum-pga and ethereum-flashbots directories. ethereum-flashbots is generally better.

TypeScript

  • Fetch accounts from Compound's API on startup
  • Subscribe to Compound contract events to stay up-to-date after that
  • Poll Coinbase Pro API and see if new prices make any account liquidatable
    • This won't work anymore because of Chainlink ๐Ÿ˜ž
  • Keep track of min & max prices since last on-chain posting, and use combination most likely to make an account liquidatable
  • Split architecture that communicates over IPC
    • delegator subscribes to events and watches for accounts to become liquidatable
    • txmanager receives liquidatable accounts + params from delegator and formulates transactions for PGAs
    • txmanager-mev receives liquidatable accounts + params from delegator and formulates transactions for flashbots
  • Extensive logging with Winston; optional Slack bot integration
  • Decent test coverage

NOTE: Most of this won't work without my web3-blocks library, which is still private. But if you can infer what functionality needs to be there and replicate the API, you might be able to get this running.

Usage and Disclaimer

Don't. You will almost certainly loose money. Feel free to admire the code or use it as a reference point, but please don't try to run it as-is.

new-bedford's People

Contributors

adamegyed avatar haydenshively avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.