All Projects → yieldprotocol → yield-liquidator

yieldprotocol / yield-liquidator

Licence: other
Utility for force-closing undercollateralized Yield Protocol loans and participating in dutch auctions with liquidity sourced by Uniswap flash loans

Programming Languages

rust
11053 projects
solidity
1140 projects

Projects that are alternatives of or similar to yield-liquidator

uniswap-arbitrage-flash-swap
Uniswap flash swap arbitrage solidity contracts
Stars: ✭ 341 (+95.98%)
Mutual labels:  uniswap, flashloan
uniswap-sushiswap-arbitrage-bot
Two bots written in JS that uses flashswaps and normal swaps to arbitrage Uniswap. Includes an automated demostration.
Stars: ✭ 351 (+101.72%)
Mutual labels:  uniswap, flashloan
interface
🦄 An open source interface for the Uniswap protocol
Stars: ✭ 3,657 (+2001.72%)
Mutual labels:  uniswap
v3-staker
Canonical liquidity mining contract for Uniswap V3
Stars: ✭ 289 (+66.09%)
Mutual labels:  uniswap
hypertext
A text-forward Uniswap interface.
Stars: ✭ 77 (-55.75%)
Mutual labels:  uniswap
botdexdamar
🤖 multichain trading bot with sniper, frontrun, backrun, sandwich
Stars: ✭ 124 (-28.74%)
Mutual labels:  uniswap
app-keeper
Skeleton Application on Spiral Framework: Keeper Admin Panel
Stars: ✭ 38 (-78.16%)
Mutual labels:  keeper
api-deprecated
🔮 Uniswap market data
Stars: ✭ 84 (-51.72%)
Mutual labels:  uniswap
zeneth
🏵️ Let Your ETH Chill — Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (-35.63%)
Mutual labels:  uniswap
uniswap-python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 533 (+206.32%)
Mutual labels:  uniswap
poly-flash
Flashloan on Polygon
Stars: ✭ 233 (+33.91%)
Mutual labels:  flashloan
uniswap-skim
scripts to scan all of the uniswapV2🦄 contracts on ethereum and search for skim opportunities
Stars: ✭ 126 (-27.59%)
Mutual labels:  uniswap
Pancakeswap Sniper
Barret 50 Cal. is a Pancakeswap sniping (front-runner) bot. It can be used to snipe in new coin listings, and obtain the best prices; or to place limit-buy and limit-sell orders.
Stars: ✭ 64 (-63.22%)
Mutual labels:  uniswap
keeper
Flexible and Simple authentication solution for Phoenix
Stars: ✭ 27 (-84.48%)
Mutual labels:  keeper
PoolTool
A simple Python tool to help anyone use Liquidity Pools on the BitShares blockchain.
Stars: ✭ 17 (-90.23%)
Mutual labels:  uniswap
top100token-ape-bot
UniSwapV2 compatible EVM Ape trading bot, customizable and support multiple blockchain: BSC,Ethereum,DogeChain,Polygon,Fantom,Avax
Stars: ✭ 123 (-29.31%)
Mutual labels:  uniswap
visor-core
The DeFi protocol for Active Liquidity Management. Building on Uniswap v3.
Stars: ✭ 50 (-71.26%)
Mutual labels:  uniswap
squeeth-monorepo
Squeeth is a new financial primitive in DeFi that gives traders exposure to ETH²
Stars: ✭ 156 (-10.34%)
Mutual labels:  uniswap
uniswapv3-calculator
An all-in-one platform for Uniswap liquidity providers (prev Uniswap Calculator)
Stars: ✭ 131 (-24.71%)
Mutual labels:  uniswap
awesome-uniswap-v3
A curated list of awesome Uniswap v3 resources
Stars: ✭ 375 (+115.52%)
Mutual labels:  uniswap

Yield Protocol Liquidator

Liquidates undercollateralized fyDAI-ETH positions using Uniswap V2 as a capital source.

This liquidator altruistically calls the Liquidations.liquidate function for any position that is underwater, trigerring an auction for that position. It then tries to participate in the auction by flashloaning funds from Uniswap, if there's enough profit to be made.

CLI

Usage: ./yield-liquidator [OPTIONS]

Optional arguments:
  -h, --help
  -c, --config CONFIG      path to json file with the contract addresses
  -u, --url URL            the Ethereum node endpoint (HTTP or WS) (default: http://localhost:8545)
  -p, --private-key PRIVATE-KEY
                           path to your private key
  -i, --interval INTERVAL  polling interval (ms) (default: 1000)
  -f, --file FILE          the file to be used for persistence (default: data.json)
  -m, --min-profit MIN-PROFIT
                           the minimum profit per liquidation (default: 0)

Your contracts' --config file should be in the following format where Uniswap is the UniswapV2 WETH/DAI pair and Flash is the Flashloan contract.

{
   "Controller" : "0xd160C973a098608e2D7d6E43C64Eee48766800D1",
   "Liquidations" : "0xbC0200F0AAD7C1c0bBB1CC7885E1e796DFFac3e0",
   "Uniswap": "0xbC0200F0AAD7C1c0bBB1CC7885E1e796DFFac3e0",
   "Flash": "0xbC0200F0AAD7C1c0bBB1CC7885E1e796DFFac3e0"
}

The --private-key must not have a 0x prefix. Set the interval to 15s for mainnet.

Building and Running

# Build in release mode
cargo build --release

# Run it with 
./target/release/yield-liquidator \
    --config ./addrs.json \
    --private-key ./private_key \
    --url http://localhost:8545 \
    --interval 7000 \
    --file state.json \

How it Works

On each block:

  1. Bumps the gas price of all of our pending transactions
  2. Updates our dataset of borrowers debt health & liquidation auctions with the new block's data
  3. Trigger the auction for any undercollateralized borrowers
  4. Try participating in any auctions which are worth buying

Take this liquidator for a spin by running it in a test environment.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].