Skip to content
프로젝트

소개

Flash swap liquidation bot for compound.finance + flashbots

비즈니스 및 금융

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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.

관련 프로젝트 살펴보기

불러오는 중…