An experiment to bait a generalized frontrunning MEV bot

Overview

Honeypot 🍯

A simple experiment that:

  • Creates a honeypot contract
  • Baits a generalized fronturnning bot with a unique transaction
  • Analyze bot behaviour using a black box approach

Final project for ChainShort bootcamp Oct 2021 cohort.

Presentation Deck

The project presentation deck is in presentation directory. It gives an overview about the project.

Experiment addresses and txs

Honeypot contract address: 0x1e232d5871979eaa715de2c38381574a9c886bad

Bot contract: 0x31B7e144b2CF261A015004BEE9c84a98263E2F66

Bot operator: 0x0a04e8b4d2014cd2d07a9eaf946945bed1262a99

Failed tx 1 (block 13710082, index 22): 0xcc1172506d5b5fa09cbf66d2296deb24958181f186817eb29cbe8385fd55ed51

Frontrun tx 1 (block 13710082, index 0): 0x18ec2c2e5720c6d332a0f308f8803e834e06c78dcebdc255178891ead56c6d73

Failed tx 2 (block 13710542, index 80): 0xfce9b77a8c7b8544cb699ce646558dc506e030aaba1533c917d7841bcc3f206a

Frontrun tx 2 (block 13710542, index 0): 0x8cda6e76f9a19ce69967d9f74d52402afbafba6ca3469248fe5c9937ef065d47

Running contract tests

The contract tests are written in Solidity. To run them:

  1. Install dapptools on your machine
  2. Navigate to the project root directory in terminal, then dapp install ds-test
  3. Rename .dapprc.template to .dapprc and add your Ethereum RPC endpoint
  4. Use dapp test to run the tests.

PnL dataset

To create or update the PnL dataset:

  1. Make sure you have Python 3 and the relevant modules installed on your machine
  2. Rename config.template.py to config.py and add your Etherscan API key and Alchemy RPC endpoint
  3. Run python analysis/create_pnl_datasets.py in your terminal

Analysis

You can view the analysis files on GitHub. If you want to edit and run them, you need to run Jupyter Notebook server with Anaconda or something similar.

Known limitations

These limitaitons are known by the time of the final presentation:

  • Unoptimized performance and too many JSON-RPC calls in when fetching data
  • PnL computation is based on heuristic, not EVM state changes
  • Outlier detection is based on manual sample check
  • A few hardcoded simplifications like constant token prices
  • No test for pnl.py and calldata.py
Owner
0x1355
Parsing json. Deciphering bytes. And putting it all together again.
0x1355
ncnn is a high-performance neural network inference framework optimized for the mobile platform

ncnn ncnn is a high-performance neural network inference computing framework optimized for mobile platforms. ncnn is deeply considerate about deployme

Tencent 16.2k Jan 05, 2023
PyTorch framework, for reproducing experiments from the paper Implicit Regularization in Hierarchical Tensor Factorization and Deep Convolutional Neural Networks

Implicit Regularization in Hierarchical Tensor Factorization and Deep Convolutional Neural Networks. Code, based on the PyTorch framework, for reprodu

Asaf 3 Dec 27, 2022
A selection of State Of The Art research papers (and code) on human locomotion (pose + trajectory) prediction (forecasting)

A selection of State Of The Art research papers (and code) on human trajectory prediction (forecasting). Papers marked with [W] are workshop papers.

Karttikeya Manglam 40 Nov 18, 2022
Repository for "Toward Practical Monocular Indoor Depth Estimation" (CVPR 2022)

Toward Practical Monocular Indoor Depth Estimation Cho-Ying Wu, Jialiang Wang, Michael Hall, Ulrich Neumann, Shuochen Su [arXiv] [project site] DistDe

Meta Research 122 Dec 13, 2022
Code for paper [ACE: Ally Complementary Experts for Solving Long-Tailed Recognition in One-Shot] (ICCV 2021, oral))

ACE: Ally Complementary Experts for Solving Long-Tailed Recognition in One-Shot This repository is the official PyTorch implementation of ICCV-21 pape

Jiarui 21 May 09, 2022
Intent parsing and slot filling in PyTorch with seq2seq + attention

PyTorch Seq2Seq Intent Parsing Reframing intent parsing as a human - machine translation task. Work in progress successor to torch-seq2seq-intent-pars

Sean Robertson 160 Jan 07, 2023
Implement of "Training deep neural networks via direct loss minimization" in PyTorch for 0-1 loss

This is the implementation of "Training deep neural networks via direct loss minimization" published at ICML 2016 in PyTorch. The implementation targe

Cuong Nguyen 1 Jan 18, 2022
1st Solution For ICDAR 2021 Competition on Mathematical Formula Detection

This project releases our 1st place solution on ICDAR 2021 Competition on Mathematical Formula Detection. We implement our solution based on MMDetection, which is an open source object detection tool

yuxzho 94 Dec 25, 2022
Auto-updating data to assist in investment to NEPSE

Symbol Ratios Summary Sector LTP Undervalued Bonus % MEGA Strong Commercial Banks 368 5 10 JBBL Strong Development Banks 568 5 10 SIFC Strong Finance

Amit Chaudhary 16 Nov 01, 2022
Differential rendering based motion capture blender project.

TraceArmature Summary TraceArmature is currently a set of python scripts that allow for high fidelity motion capture through the use of AI pose estima

William Rodriguez 4 May 27, 2022
Using Self-Supervised Pretext Tasks for Active Learning - Official Pytorch Implementation

Using Self-Supervised Pretext Tasks for Active Learning - Official Pytorch Implementation Experiment Setting: CIFAR10 (downloaded and saved in ./DATA

John Seon Keun Yi 38 Dec 27, 2022
Contains code for the paper "Vision Transformers are Robust Learners".

Vision Transformers are Robust Learners This repository contains the code for the paper Vision Transformers are Robust Learners by Sayak Paul* and Pin

Sayak Paul 103 Jan 05, 2023
Additional code for Stable-baselines3 to load and upload models from the Hub.

Hugging Face x Stable-baselines3 A library to load and upload Stable-baselines3 models from the Hub. Installation With pip Examples [Todo: add colab t

Hugging Face 34 Dec 10, 2022
Cervix ROI Segmentation Using U-NET

Cervix ROI Segmentation Using U-NET Overview This code illustrate how to segment the ROI in cervical images using U-NET. The ROI here meant to include

Scotty Kwok 35 Sep 14, 2022
Turning pixels into virtual points for multimodal 3D object detection.

Multimodal Virtual Point 3D Detection Turning pixels into virtual points for multimodal 3D object detection. Multimodal Virtual Point 3D Detection, Ti

Tianwei Yin 204 Jan 08, 2023
Create images and texts with the First Order Generative Adversarial Networks

First Order Divergence for training GANs This repository contains code accompanying the paper First Order Generative Advesarial Netoworks The majority

Zalando Research 35 Dec 11, 2021
QuakeLabeler is a Python package to create and manage your seismic training data, processes, and visualization in a single place — so you can focus on building the next big thing.

QuakeLabeler Quake Labeler was born from the need for seismologists and developers who are not AI specialists to easily, quickly, and independently bu

Hao Mai 15 Nov 04, 2022
Embodied Intelligence via Learning and Evolution

Embodied Intelligence via Learning and Evolution This is the code for the paper Embodied Intelligence via Learning and Evolution Agrim Gupta, Silvio S

Agrim Gupta 111 Dec 13, 2022
(CVPR 2021) PAConv: Position Adaptive Convolution with Dynamic Kernel Assembling on Point Clouds

PAConv: Position Adaptive Convolution with Dynamic Kernel Assembling on Point Clouds by Mutian Xu*, Runyu Ding*, Hengshuang Zhao, and Xiaojuan Qi. Int

CVMI Lab 228 Dec 25, 2022
3D ResNets for Action Recognition (CVPR 2018)

3D ResNets for Action Recognition Update (2020/4/13) We published a paper on arXiv. Hirokatsu Kataoka, Tenga Wakamiya, Kensho Hara, and Yutaka Satoh,

Kensho Hara 3.5k Jan 06, 2023