Giter VIP home page Giter VIP logo

hyperfyre-rule-engine-research's Introduction

Rule-Engine Research

Overview

The aim of the research is to identify whether a user holds any balance for a specified Token. The research was done on Ethereum, Binance Smart Chain and Polygon network, and on the tokens ERC-20 and BEP-20.

About 2000 Blockchain Wallet addresses, downloaded from the above mentioned networks, were used as input.

  • polkadot-token-2000-users.csv - List of 2000 users holding PolkaDot token (BEP-20)
  • theta-token-2000-users.csv - List of 2000 users holding Theta Token (ERC-20)
  • uniswap-token-2000-users.csv - List of 2000 users holding Uniswap token (ERC-20)

Code Walkthrough

Following are the steps involved in the execution of the script app.js:

  1. The necessary minimum ABI need and the required variables such as RPC endpoints and Contract Addresses are defined.

  2. In order to process the requests in bulk, a instance of Web3.js Batch instance is defined

  3. Iterating over User records, each request is added to the Batch Object for every wallet address.

  4. Once added, batch.execute() runs the whole Batch to generate Token balance for every users.

Observations

  • Ethereum RPC took about 20 seconds to retrieve all the balances.
  • It took BSC (Binance Smart Chain) about 3 seconds to retrieve all the balances.
  • Polygon Network, on it's free tier plan, had a 40 requests/sec limit on the public RPC endpoint, while the private RPC endpoint had a 100 requests/sec limit. Hence, batch execution for 2000 users was not possible

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.