Cow Feeder is a bot automatically execute trade on cowswap

Related tags

Hardwarecowfeeder
Overview

Cow Feeder

Cow Feeder is a bot automatically execute trade on cowswap, includes functions:

  • Monitoring Ethereum network gas price and execute trade when gas price is low and reaches target gas price set by user.
  • Protect trade from quick price change when bot waits for a good gas price.
  • Automatically approve to trade on cowswap when gas price is low and reaches target gas price set by user. (In progress)

Extra bonus to use Cow Feeder:

  • More chances to have CoWs. People are more likely to set same target gas price, such as 40 gwei, thus executing trade at a small time window together.

Requirements

Python 3

Setup

1. Install dependencies

pip install -r requirements.txt

2. Set config.json file

", "your_wallet_address": "0x..........", "private_key": "your_wallet_address_private_key", "sell_token_address": "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83", "buy_token_address": "0x4ecaba5870353805a9f068101a40e0f32ed605c6", "sell_token_amount": "100", "least_buy_token_amount": "80", "target_gas_price": "40" } ">
{
  "network": "mainnet",
  "http_provider_url": "https://mainnet.infura.io/v3/
    
     "
    ,
  "your_wallet_address": "0x..........",
  "private_key": "your_wallet_address_private_key",
  "sell_token_address": "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83",
  "buy_token_address": "0x4ecaba5870353805a9f068101a40e0f32ed605c6",
  "sell_token_amount": "100",
  "least_buy_token_amount": "80",
  "target_gas_price": "40"
}

Http Provider Url

http_provider_url: If you don't already have a http provider, you can register a free one at infura.io.

Private Key

private_key: Private key is not mnemonic. With metamask, you can find it by clicking three dots, opening account detail and exporting private key. Private key is important. You can also leave private_key as an empty string in config.json and set it as environment variable with export private_key=your_wallet_private_key. Cow Feeder handles both cases.

Least buy token amount

least_buy_token_amount: While gas price goes down, price of trading pair might change as well. If the amount of token you are getting is lower than least buy token amount, Cow Feeder will not execute trade.

Gas Price

target_gas_price: Gas price is in gwei, you can decide target gas price by referring historical gas price at etherscan.io/gastracker.

3. Try it on xDai network

{
  "network": "xDai",
  "http_provider_url": "https://rpc.xdaichain.com/",
  "your_wallet_address": "0x..........",
  "private_key": "your_wallet_address_private_key",
  "sell_token_address": "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83",
  "buy_token_address": "0x4ecaba5870353805a9f068101a40e0f32ed605c6",
  "sell_token_amount": "0.5",
  "least_buy_token_amount": "0.49",
  "target_gas_price": "1"
}

You can try it out on xDai network. You don't need a http provider api key for xDai network. Gas price on xDai network is usually at 1, you can refer to xdai gas price oracle

4. Run it

python cowfeeder.py

Contributors

Disclaimer

This is alpha release. Use at your own risk.

Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z

nissan_ecu_hacking Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z My goal

Liam Goss 11 Sep 24, 2022
Electrolux Pure i9 robot vacuum integration for Home Assistant.

Home Assistant Pure i9 This repository integrates your Electrolux Pure i9 robot vacuum with the smart home platform Home Assistant. The integration co

Niklas Ekman 15 Dec 22, 2022
This tool emulates an EMV-CAP device, to illustrate the article "Banque en ligne : à la decouverte d'EMV-CAP" published in MISC

About This tool emulates an EMV-CAP device, to illustrate the article "Banque en ligne : à la decouverte d'EMV-CAP" published in MISC, issue #56 and f

Philippe Teuwen 28 Nov 21, 2022
This is a python script to grab data from Zyxel NSA310 NAS and display in Home Asisstant as sensors.

Home-Assistant Python Scripts Python Scripts for Home-Assistant (http://www.home-assistant.io) Zyxel-NSA310-Home-Assistant Monitoring This is a python

6 Oct 31, 2022
A dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc. written in Python

Weather Clock for Raspberry PI This project is a dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc.

Markus Geiger 1 May 01, 2022
Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs

Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs

Matthew Garrett 1.2k Jan 04, 2023
For use with an 8-bit parallel TFT touchscreen using micropython

ILI9341-parallel-TFT-driver-for-micropython For use with an 8-bit parallel TFT touchscreen using micropython. Many thanks to prenticedavid and his MCU

3 Aug 02, 2022
Resmed_myair_sensors - This is a Home Assistant custom component to pull daily CPAP data from ResMed's myAir service using an undocumented API

resmed_myair This component will set up the following platforms. Platform Description sensor Show info from the myAir API. Installation Using the tool

Preston Tamkin 17 Dec 29, 2022
3D-printable hexagonal mirror array capable of reflecting sunlight into arbitrary patterns

3D-printable hexagonal mirror array capable of reflecting sunlight into arbitrary patterns

Ben Bartlett 2.3k Dec 30, 2022
Point Density-Aware Voxels for LiDAR 3D Object Detection (CVPR 2022)

PDV PDV is LiDAR 3D object detection method. This repository is based off [OpenPCDet]. Point Density-Aware Voxels for LiDAR 3D Object Detection Jordan

Toronto Robotics and AI Laboratory 114 Dec 21, 2022
E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

2.8k Dec 30, 2022
Micropython automatic watering

micropython-automatic-watering micropython automatic watering his code was developed to be used with nodemcu esp8266, but can be modified to work with

1 Nov 24, 2021
A Python script to monitor the latest block on an LCD.

PiHole-Monitoring A Python script to monitor the latest block on a lcd display. The first number represents the dns queries from the last 24h, the sec

Maxi 4 Dec 05, 2022
Authentication provider using Synology DSM users for Home Assistant

Authentication provider using Synology DSM users for Home Assistant The Synology authentication provider lets you authenticate using the users in your

Sam Debruyn 5 Oct 06, 2022
Christmasvillage-rpi - Raspberry Pi relay controller for ChristmasVillage.io

ChristmasVillage.io Relay Controller Links ChristmasVillage.io - Live Stream & Controls Youtube Instagram About This repository controls the light rel

Grant Windes 2 Feb 15, 2022
CO2Ampel - This RaspberryPi project uses weather data to estimate the share of renewable energy in the power grid

CO2Ampel This RaspberryPi project uses weather data to estimate the share of ren

Felix 4 Jan 19, 2022
A Raspberry Pi Pico plant sensor hub coded in Micropython

plantsensor A Raspberry Pi Pico plant sensor hub coded in Micropython I used: 1x Raspberry Pi Pico - microcontroller 1x Waveshare Pico OLED 1.3 - scre

78 Sep 20, 2022
FHEM Connector for FHT Heating devices

home-assistant-fht from: https://github.com/Rsclub22 FHEM Connector for FHT Heating devices (connected via FHEM) Requires FHEM to work You can find FH

5 Dec 01, 2022
A versatile program that uses the raspberry pi camera and provides it as a service

PiCameleon Is a daemon program meant to provide the RaspberryPi Camera as a service while running according to a configuration.

André Esser 52 Oct 16, 2022
♟️ QR Code display for P4wnP1 (SSH, VNC, any text / URL)

♟️ Display QR Codes on P4wnP1 (p4wnsolo-qr) 🟢 QR Code display for P4wnP1 w/OLED (SSH, VNC, P4wnP1 WebGUI, any text / URL / exfiltrated data) Note: Th

PawnSolo 4 Dec 19, 2022