Skip to content

Instantly share code, notes, and snippets.

@Barabazs
Barabazs / arbitrage.py
Created August 23, 2022 06:53 — 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
@Barabazs
Barabazs / t.py
Created July 4, 2022 06:52 — forked from zhuowei/t.py
Proof that the NFT Bay's torrent is mostly zeroes
import libtorrent as lt
# usage:
# sudo apt install python3-libtorrent
# wget https://thenftbay.org/billion-dollar-nft-torrent.torrent
# python3 t.py
info = lt.torrent_info("billion-dollar-nft-torrent.torrent")
print("Number of pieces: ", info.num_pieces())
print("dumping piece hashes:")