Skip to content

Instantly share code, notes, and snippets.

View yuanaichi's full-sized avatar
😀
I may be slow to respond.

yuanchao yuanaichi

😀
I may be slow to respond.
View GitHub Profile

Deconstructing a $2.5M CEX-DEX Arbitrage Bot

Atomic MEV is becoming tougher in recent years as competition intensifies and more skilled teams enter the game. To stay competitive, teams integrate more exchanges and capture untouched arbitrage paths and order flow which is not always trivial, especially when dealing with cross-chain MEV or any non atomic arbitrage.

One common arbitrage is CEX-DEX arbitrage. I've noticed many on-chain bots but never dug deep into their performance until now.

I'll be looking at the bot 0x98C3d3183C4b8A650614ad179A1a98be0a8d6B8E, specifically the transaction 0x6f94aa47e74de8897979fdc3b6e541bb515be9c72f2a912cd548f98e2c11729a USUAL ETH Swap

Investigating the Trade

This token is listed on many exchanges, I'll focus on Bina

nof1.ai Alpha Arena 提示词工程逆向分析

逆向工程说明: 本文档基于 nof1.ai Alpha Arena 的公开文档、交易行为模式、API 响应格式和社区讨论,系统性地逆向推导出其 System Prompt 和 User Prompt 的完整结构,欢迎各路大佬戳戳评论,一起来进行这个有趣的实验。

GitHub - nof0 Follow @wquguru

目录

@yuanaichi
yuanaichi / kzqj.pine
Created March 31, 2023 06:01
trading view 刻舟求剑
//@version=5
indicator('刻舟求剑', shorttitle='刻舟求剑', overlay=true, precision=0)
tf = timeframe.period
futureDay = input(720, 'future days')
lookBackDays = input(1418, 'Look back days')
daysBack = lookBackDays - futureDay
periodBack = daysBack
futurePeriod = futureDay
@yuanaichi
yuanaichi / arbitrage.py
Created August 23, 2022 08:56 — forked from noxx3xxon/arbitrage.py
CFMM Routing Arbitrage Example
import numpy as np
import cvxpy as cp
import itertools
# Problem data
global_indices = list(range(4))
# 0 = TOKEN-0
# 1 = TOKEN-1
# 2 = TOKEN-2

Keybase proof

I hereby claim:

  • I am yuanaichi on github.
  • I am speedx (https://keybase.io/speedx) on keybase.
  • I have a public key ASAcmC7k9em44yMusgbxdGmjA3UAr25s-Nt9Y5NgftyoXQo

To claim this, I am signing this object:

{"sig":"6857ab32badb11e6a41a375f90a5dd749eb8e18f3772839602af07884b09724460d39eddf6eaee7421582b4350afb8066dfbe854c73422e76b81f66b49d79da90","msghash":"64a4b3b908104d338a4953bc14dea6b724769cf63c5c247bec8d4a079d9dfc41"}
@yuanaichi
yuanaichi / tenxpay.eth.sol
Created June 22, 2017 06:05
TenX PAY Token Sale contract
pragma solidity 0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;