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.

Detic ros - A simple ROS wrapper for Detic instance segmentation using pre-trained dataset

Detic ros - A simple ROS wrapper for Detic instance segmentation using pre-trained dataset

Hirokazu Ishida 12 Nov 19, 2022
Hook and simulate global keyboard events on Windows and Linux.

keyboard Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.

BoppreH 3.2k Dec 30, 2022
This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

Stanford Student Robotics 1.2k Dec 25, 2022
Philippe 1 Jan 09, 2022
Open-Source board for converting RaspberryPI to Brain-computer interface

The easiest way to the neuroscience world with the shield for RaspberryPi - PIEEG (website). Open-source. Crowdsupply This project is the result of se

Ildaron 436 Jan 01, 2023
Lenovo Legion 5 Pro 2021 Linux RGB Keyboard Light Controller

Lenovo Legion 5 Pro 2021 Linux RGB Keyboard Light Controller This util allows to drive RGB keyboard light on Lenovo Legion 5 Pro 2021 Laptop Requireme

36 Dec 16, 2022
A simple program to make MSI Modern 15 speaker and microphone mute led work.

MSI Modern 15 sound led fixup for linux A simple program to fix the MSI Modern 15 speaker and microphone mute LEDs. Installation Requirements pulsectl

Seyed Danial Movahed 4 Oct 18, 2022
An embedded application for toy-car controlling based on Raspberry Pi 3 Model B and AlphaBot2-Pi.

An embedded application for toy-car controlling based on Raspberry Pi 3 Model B and AlphaBot2-Pi. This is the source codes of my programming assignmen

StardustDL 4 Oct 19, 2022
Python information display framework aimed at e-ink devices

My display, using a Raspberry Pi Zero W and Waveshare 6" e-paper hat infodisplay Modular information display framework aimed at e-ink devices. Built u

Niek Blankers 3 Apr 08, 2022
Simple Microservice to control 433Mhz wireless sockets over HTTP, e.g. on a RaspberryPi

REST-light is a simple microservice to control 433Mhz wireless sockets over HTTP, e.g. on a RaspberryPi. The main usage is an easy integration of 433M

Pascal Höhnel 1 Jan 09, 2022
Python module for the qwiic serial control motor driver

Qwiic_SCMD_Py Python module for the qwiic motor driver This python package is a port of the existing SparkFun Serial Controlled Motor Driver Arduino L

SparkFun Electronics 6 Dec 06, 2022
A refreshed Python toolbox for building complex digital hardware

A refreshed Python toolbox for building complex digital hardware

nMigen 1k Jan 05, 2023
Pihole-eink-display - A simple Python script to display PiHole statistics on an eInk Display

Pihole-eink-display - A simple Python script to display PiHole statistics on an eInk Display

Mark McIntyre 64 Oct 11, 2022
OctoPrint is the snappy web interface for your 3D printer!

OctoPrint OctoPrint provides a snappy web interface for controlling consumer 3D printers. It is Free Software and released under the GNU Affero Genera

OctoPrint 7.1k Jan 03, 2023
Simple Python script to decode and verify an European Health Certificate QR-code

A simple Python script to decode and verify an European Health Certificate QR-code.

Mathias Panzenböck 61 Oct 05, 2022
OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick

OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick. It can handle being the brains of your entire stick, or just handling the bells and wh

Sleep Unit 23 Nov 24, 2022
Raspberry Pi Pico development platform for PlatformIO

Raspberry Pi Pico development platform for PlatformIO A few words in the beginning Before experimental please Reinstall the platform Version: 1.0.0 Th

Georgi Angelov 160 Dec 23, 2022
Port of Uxn to digital hardware in the Logisim simulator

Uxn-Logisim Implements the Uxn instruction set in digital hardware. Very WIP. Contents cpu.circ - The Logisim file microcode.mc - Microcode source fil

DeltaF1 11 Mar 27, 2022
A Fast, Easy, and User Friendly way to control Robotics Actuators.

T-Motor Controller A Fast, Easy, and User Friendly way to control Robotics Actuators. View Demo · Report Bug · Request Feature Table of Contents About

26 Aug 23, 2022
a fork of the OnionShare software better optimized for lower spec lightweight machines and ARM processors

OnionShare-Optimized A fork of the OnionShare software better optimized for lower spec lightweight machines and ARM processors such as Raspberry Pi or

ALTPORT 4 Aug 05, 2021