Ongoing Reading List
An ongoing collection of articles/tweets that I still need to read. Send me things too I guess.
MEV
— mebius (@0xmebius) December 11, 2021
@bensams 10 days of alpha leaks
Reading through flashbots discord, it's sad how far behind some searchers start at. A lot are new to smart contracts, and it really shows. Some builders like @EdgarArout and @bertcmiller publish example code which helps, but there is a lot of meta knowledge that goes unsaid 1/x
— Benjamin Samuels (@thebensams) December 1, 2021
1/ Day 2 of 12ish days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 2, 2021
When an EOA address calls a smart contract, it’s trivial to detect in the mempool because rival searchers can just read the transaction’s calldata.
1/ Day 3 of 12ish days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 3, 2021
If you’re new to writing smart contracts, don’t expect to make money doing MEV for a while (if ever!). It takes an incredible amount of domain knowledge to extract MEV safely, and no single strategy is going to remain profitable forever.
1/ Day 4 of 12ish days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 5, 2021
Gas trick: When interacting with a uni-like pair directly using .swap(), always set the destination address to the next pair in your arbitrage chain.
1/ Day 5 of 12ish days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 5, 2021
Today we're going to talk about ways to search for arbs. I think of arbs as a large graph where each ERC20 is a node and its edges are DEX pairs. An arb searcher's goal is to traverse this graph using swaps to make a profit. pic.twitter.com/KbYh0BiAZI
1/ Day 6 of 12ish days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 6, 2021
Catching up to experienced searchers in a given strategy takes a huge amount of time, energy, and expertise. Unless you have a good reason to believe you can surpass another searcher, it's probably going to be a huge waste of time.
1/ Day 7 of 12ish days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 7, 2021
Gas optimizations beyond the basics are a complete waste of time. If you're having trouble getting your bundles picked up due to gas efficiency, you should probably start looking for a new strategy.
1/ Day 8 of 12ish days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 8, 2021
Today we'll be talking Searcher tooling. The right tools will make your bot easier to test, faster to develop, and easier to analyze.
1/ Day 9 of 12ish days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 9, 2021
Not all MEV on Ethereum mainnet goes through Flashbots. In fact, searchers who find new strats/sources of MEV avoid Flashbots like the plague.
Observe the highly detailed diagram below, where would you prefer to route your transaction? pic.twitter.com/WUtIaf412d
1/ Day 10 of 10 days of MEV alpha leaks;
— Benjamin Samuels (@thebensams) December 13, 2021
There are tons of MEV bots that have been open sourced over the past year. These codebases are extremely valuable for learning how other searchers do things, but should be used for learning only.
Defi
An open list of problems in DeFi, the problems we solve over the next 24-36 months decide our next level of adoption. https://t.co/PLfMG4mE4U
— Emperor (@0x_emperor) January 29, 2022
🧙🏾♀️New Paper Alert 🧙🏾♀️
— Tarun Chitra (@tarunchitra) December 20, 2021
Our [Stephen Boyd, @GuilleAngeris, @alexhevans] Christmas Gift to you is a look at routing in CFMMs like Uniswap, Balancer, and Curve
People have talked about *heuristics* for routing, but what about an *optimal* form of routing? 🔮https://t.co/sbYctx7uLL pic.twitter.com/JW7kSebmz9
Last week, @crypt0glitter asked me for a formula for how much you need to swap on Uniswap v3 in order to add max liquidity to a range on the same pool.
— Dan Robinson (@danrobinson) July 2, 2021
Sharing the derivation, since I think it's a pretty good illustration of how I approach Uniswap math.https://t.co/8fjm7keY2O
p2e
Instead of thinking about play to earn (P2E) as building standalone games or 'apps', we believe it is about building economies that community members can trust, collectively operate, own, and build on top of.
— pet3rpan (@pet3rpan_) December 22, 2021
This is @1kxnetwork's thesis on play to earn.https://t.co/5AvmPfqENH
Solidity
I compiled all of my Solidity and Yul tips + tricks into a single doc as lots of people were interested in my previous thread, but not many replied. Tips and Resources here - https://t.co/ZC9wcitblB suggest any additions you have! Learned a lot of them from MEV twitter!
— ControlCplusControlV (@controlcthenv) December 27, 2021
As I go back to basics with smart contracts dev and solidity, I will progressively post tips, tricks, ressources and cheat sheet in this thread. Can be useful if some of you are taking this road 👇
— Supercycled (@_supercycled) January 25, 2022
🛠 lil superfluid: A simplified token streaming contract
— $MIGUEL Piedrafita (@m1guelpf) January 20, 2022
Money streaming is an incredibly cool primitive (you can continuously pay people every second!), so I did my best to make a simple (but complete) implementation 😁
Check it out in lil web3 👇https://t.co/DYUYKRXp2v
TIL using the `indexed` kw can save gas on events, because you're reading them off the stack instead of putting them in memory. pic.twitter.com/H10gRZcXIR
— maurelian (@maurelian_) February 2, 2022
Binary search with bitmasking for on-mint generation. ~9500 gas to generate metadata from 248 traits across 8 properties (31 each).
— Eugene (@fiveoutofnine) December 14, 2021
I don't know why people are using the AJ Alias Walker algorithm and hailing it as a super-efficient solution. pic.twitter.com/HhtOojywPb
So proud of this little piece of code, just had to share it 😁
— tycoon.eth ⟠ 🦇🔊 (@0xTycoon) November 25, 2021
Using solidity assembly to take advantage of the fact that bytes and strings are big endian and uints are little endian...(when converting uint strings.. see my pinned tweet for the project details) pic.twitter.com/APk21Bjtjf
if you're implementing any kind of smart contract that receives a callback & holds funds, make sure to verify the msg.sender is the address you expect it to be. otherwise bad things can happen. https://t.co/Hk83AgllQr
— Georgios Konstantopoulos (@gakonst) September 29, 2021
alfa
If you ever burn out on MEV but still wanna write smart contracts, you can write strats for @iearnfinance and get paid proportionately to how much your strat earns.
— Benjamin Samuels (@thebensams) January 13, 2022
Same skillset as MEV with a little less emphasis on backend work. https://t.co/bgMK5LhZnU
I have seen a lot of threads about how to learn solidity for total beginners, but I want to write a thread on how to learn solidity for people with a non-trivial amount of programming experience.
— 0xcacti (@0xcacti) January 23, 2022
zk
✨A Succinct Story of Zero Knowledge✨
— Nalin (@nibnalin) January 3, 2022
New deep dive on the theory of zero-knowledge proofs, and how to build up ZK SNARKs from their theoretical roots in computational complexity theory.
I've been working on this for a while now :)https://t.co/CJyzUTyws0
NEW: Group Signatures with zkSNARKs
— 0xPARC (@0xPARC) January 26, 2022
In this post, @gustafjt @0xkatz @pumatheuma @kzdagoof @raymondzhong and @gubsheep break down a zkSNARK construction that emulates a familiar cryptographic primitive—the group signature scheme. (1/n)https://t.co/KDJhHUfkl0
1/ Recursive Zero Knowledge proofs.
— jefflau.eth | numeracy.eth | elucidate.eth (@_jefflau) December 22, 2021
I learnt about these in one of the recent lectures at @0xPARC by Barry Whitehat
I will try and give a high level overview on why recursive moon maths is game-changing.
Another thread 🧵
👇
other
Are you a beginner and interested in writing your first SQL query that will allow you to play around with the ETH chain data? Then this is the thread for you.
— Deepanjal (@bakabhai993) November 27, 2021
🤔 Does this link take you to Uniswap? Do you trust it because Twitter says it takes you to Uniswap? Why don't you click to find out?https://t.co/6XiIACU6tk
— harry.eth 🦊💙 (@sniko_) November 4, 2021