Giter Club home page Giter Club logo

web3-bot's Introduction

config

rename config copy.json to config.json (add private key)

  • privateKey ,rpc,contract addresses ,etc
  • swap.type A,B,C, D Only Swap type A is working on master branch (web3). aka swapExactETHForTokens. Moving on to Ethers.js , branch ethers

Progress

  • swap A,B,C,D : work on fantom (using Type C on ruby)
  • swap eth -> usdt,usdp,usdc : working
  • swap usdc,usdp -> eth : working
  • call data once, store data, reuse data in ongoing swaps
  • Simplify: automate the contract Token Decimals (math fuckery) USDC (6) and Most (18)

Todo

  • start working on aribtrage

Agenda

  • Size: pool reserves vs the effect of the position size => slippage => price movement. Take swaps large enough to make the price move at internals. Such as every 1 to 5 minutes.
  • Execution: M1, 14 swaps(buying x asset) , then 5 swaps(selling x asset), create HH.HL price structure.

learning

  • deadline : if this value is incorrect, the transactions will be reverted by the EVM

cannot estimate gas

When you run contract.myTransaction(...), ethers js does 2 rpcalls to node internally:

Makes an estimate gas rpcall to the node. If call reverts you will get error cannot estimate gas that you are getting. (I don't think a gas estimate requires to have enough eth at an address) Since estimation was successful, it signs tx and sends to the node. If funds are not present, the node returns an error result, which ethers js throws as insufficient funds

web3-bot's People

Contributors

rubyaquamarine avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.