Giter Site home page Giter Site logo

phackt / crypto-honeypot-detector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from malvaphe/crypto_honeypot_detector

0.0 0.0 0.0 382 KB

The project aims to identify crypto honeypots in many chains.

JavaScript 98.78% HTML 0.06% SCSS 0.82% Solidity 0.34%

crypto-honeypot-detector's Introduction

Crypto Honeypot Detector

Crypto Honeypot Detector

An honeypot detector for many chains. The project aims to identify crypto honeypots following these steps:

  • You must specify a dex.
  • You must specify the token to test and the token to exchange it with.
  • The application will try to buy some tokens and then resell them.

Before running it

First of all clone the project:

  git clone https://github.com/malvaphe/Crypto-Honeypot-Detector

Then follow these instructions or the project won't work:

  • The project is based on the use of contracts distributed in the blockchains.
  • Before running the project you must deploy the contract in the blockchains you are interested in.
  • The contract is in the Crypto-Honeypot-Detector/contract/multicall.sol file.
  • After the deployment, you need to transfer tokens to the contract.

BSC deployment example:

You have deployed the contract and now you have the contract address.

You need to transfer some WBNB and some BNB to pay the transaction fees (they will not really be spent, they are used for simulation).

The BNBs must be sufficient to cover virtually all transactions.

You can take the tokens back at any time through the contract.

Depending on the transferred amount you need to modify all the dexs in Crypto-Honeypot-Detector/apis/dexs who use that chain.

In this case only PancakeSwap.js.

const mainTokentoSell = 'the amount of WBNB you have transferred';

After doing this in all the chains you are interested in, edit the Crypto-Honeypot-Detector/config/const.js file by entering the contract addresses and your address:

export const BSCaddress = '';
export const ETHERaddress = '';
export const AVAXaddress = '';
export const FTMaddress = '';
export const MATICaddress = '';
export const XDAIaddress = '';
export const ownerAddress = '';

Run it

Go to the project directory:

  cd Crypto-Honeypot-Detector

Install dependencies:

  npm i

Run the project:

  npm start

API Reference

  GET /api/${dex}/${tokenAddress}/${mainTokenAddress}
Parameter Type Description
dex string Required. Dex where to exchange the token
tokenAddress string Required. Token to test
mainTokenAddress string Required. Token to use to make the purchase

Available dexs:

  • pancakeswap (BSC)
  • traderjoe (AVAX)
  • pangolin (AVAX)
  • spookyswap (FTM)
  • quickswap (MATIC)
  • honeyswap (XDAI)
  • sushiswap (ETH)
  • uniswap2 (ETH)
  • uniswap3 (ETH)

If ${mainTokenAddress} equals 'default' the server will use the default mainToken of the chain:

  • WBNB for BSC
  • WAVAX for AVAX
  • WFTM for FTM
  • WMATIC for MATIC
  • WXDAI for XDAI
  • WETH for ETH

Possible results

Problem testing the token due to a server error (status code 403):

{
  error: true,
  msg: 'Error testing the honeypot, retry!'
}

Problem testing the token due to a token error (status code 404):

{
  error: true,
  data: {
    ExError: true,
    isHoneypot: false,
    tokenSymbol: null,
    mainTokenSymbol: mainTokensymbol,
    problem: true,
    extra: 'Token probably destroyed itself or does not exist!',
  }
}

The token does not have enough liquidity for the selected pair (status code 200):

{
  data: {
    isHoneypot: false,
    tokenSymbol: tokenSymbol,
    mainTokenSymbol: mainTokensymbol,
    problem: true,
    liquidity: true,
    extra: 'Token liquidity is extremely low or has problems with the purchase!',
  }
}

Test completed without errors (status code 200):

{
  data: {
    isHoneypot: true/false,
    buyFee: buyTax,
    sellFee: sellTax,
    buyGas: buyGas,
    sellGas: sellGas,
    maxTokenTransaction: maxTokenTransaction,
    maxTokenTransactionMain: maxTokenTransactionMain,
    tokenSymbol: tokenSymbol,
    mainTokenSymbol: mainTokensymbol,
    priceImpact: priceImpact,
    problem: problem,
    extra: extra,
  }
}
* maxTokenTransactionMain is the maximum tradable quantity converted into mainToken.

Configuration

You can configure the project by editing the Crypto_Honeypot_Detector/config/const.js file.

// Server port
export const port = 8080;

// Max price impact %
export const priceImp = 2;

// Max safe fee
export const maxBuyFee = 10;
export const maxSellFee = 10;

Authors

crypto-honeypot-detector's People

Contributors

malvaphe 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.