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.

Lego Mindstorms EV3 and Lego Spike Prime

Lego Mindstorms EV3 and Lego Spike Prime What is FLL? The FIRST LEGO League Challenge Robotics Tournament challenges students from 9 to 16 years old t

Danimar Campos da Costa 1 Nov 14, 2021
Blender Camera Switcher

Blender Camera Switcher A simple camera switcher addon for blender. Useful when use reference image for camera. This addon will automatically fix the

Corgice 1 Jan 31, 2022
Andreas Frisch 1 Jan 10, 2022
🏡 My Home Assistant Configs. Be sure to 🌟 my repo to follow the updates!

Home Assistant Configuration Here's my Home Assistant configuration. I have installed HA on a Lenovo ThinkCentre M93P Tiny with an Intel Dual-Core i5-

iLyas Bakouch 25 Dec 30, 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
Example code and projects for FeatherS2 and FeatherS2 Neo

FeatherS2 & FeatherS2 Neo This repo is a collection of code, firmware, and files

Unexpected Maker 5 Jan 01, 2023
ROS2 nodes for Waveshare Alphabot2-Pi mobile robot.

ROS2 for Waveshare Alphabot2-Pi This repo contains ROS2 packages for the Waveshare Alphabot2-Pi mobile robot: alphabot2: it contains the nodes used to

Michele Rizzo 2 Oct 11, 2022
Using a raspberry pi, we listen to the coffee machine and count the number of coffee consumption

A typical datarootsian consumes high-quality fresh coffee in their office environment. The board of dataroots had a very critical decision by the end of 2021-Q2 regarding coffee consumption.

dataroots 51 Nov 21, 2022
A iot Bike sytem based on RaspberryPi, Ardiuino

Cyclic 's Kernel ---- A iot Bike sytem based on RaspberryPi, Ardiuino, etc 0x1 What is This? Cyclic 's Kernel is an independent System With self-produ

Retr0mous 2 Oct 09, 2022
Create a low powered, renewable generation forecast display with a Raspberry Pi Zero & Inky wHAT.

GB Renewable Forecast Display This Raspberry Pi powered eInk display aims to give you a quick way to time your home energy usage to help balance the g

Andy Brace 32 Jul 02, 2022
Imbalaced Classification and Robust Semantic Segmentation

Imbalaced Classification and Robust Semantic Segmentation This repo implements two algoritms. The imbalance clibration (IC) algorithm for image classi

24 Jul 23, 2022
Play a song with a 3D printer.

MIDI to GCODE Play a song with a FDM 3D printer. SLA printers don't have motors, so they cannot play music. Warning: Be ready to turn off the 3D print

Patrick 6 Apr 11, 2022
Real-time Coastal Monitoring at the University of Hawaii at Manoa

Coastal Monitoring at the University of Manoa Source code for Beaglebone/RPi-based data loggers, shore internet gateways, and web server. Software dev

Stanley Lio 7 Dec 07, 2021
Scapy: the Python-based interactive packet manipulation program & library. Supports Python 2 & Python 3.

Scapy Scapy is a powerful Python-based interactive packet manipulation program and library. It is able to forge or decode packets of a wide number of

SecDev 8.3k Jan 08, 2023
Universal Xiaomi MIoT integration for Home Assistant

Xiaomi MIoT Raw 简体中文 | English MIoT 协议是小米智能家居从 2018 年起推行的智能设备通信协议规范,此后凡是可接入米家的设备均通过此协议进行通信。此插件按照 MIoT 协议规范与设备通信,实现对设备的状态读取及控制。

1.9k Jan 02, 2023
uOTA - OTA updater for MicroPython

Update your device firmware written in MicroPython over the air. Suitable for private and/or larger projects with many files.

Martin Komon 25 Dec 19, 2022
Segger Embedded Studio project for building & debugging Flipper Zero firmware.

Segger Embedded Studio project for Flipper Zero firmware Установка Добавить данный репозиторий в качестве сабмодуля в корень локальной копии репозитор

25 Dec 28, 2022
A modular sequencer based on Pi Pico & EuroPi

PicoSequencer A modular sequencer based on Pi Pico & EuroPi by Zeno Van Moerkerke / Keurslager Kurt For now it is 'only' a trigger sequencer, but I si

5 Oct 27, 2022
KIRI - Keyboard Interception, Remapping, and Injection using Raspberry Pi as an HID Proxy.

KIRI - Keyboard Interception, Remapping and Injection using Raspberry Pi as a HID Proxy. Near limitless abilities for a keyboard warrior. Features Sim

Viggo Falster 10 Dec 23, 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