|
Anyone doing anything interesting here?
I've had centralized exchange bots live since 2013.
This space moves incredibly quickly and hard to keep track. |
|
|
|
 |
|
I've been toying around with DeFi stuff as a side project for the past couple months. I never knew much about crypto or crypto trading before, so thought it would be a fun learning opportunity.
So far, I've replicated the pre-existing strats that front-run Uniswap trades in the Ethereum mempool. It's pretty amazing how easily exploitable the ecosystem is. Anyone can see your transactions before they print, then execute ahead of you by bumping the gas fee.
Front-running trades like this is kinda bush league though. The money's easy, but relatively small. The crazy high taker fees (30 bps each way), means that the only real opportunities are illiquid micro-cap tokens, which get regularly dislocated by ordinary trades. Against that you're fighting Ethereum's super-high gas fees. Plus the half dozen active players frequently get in vicious gas auction battles. A lot of the returns come from optimizations in EVM byte code. (Particularly SSTORE gas rebate tricks.)
If you could come up with a consistent strategy on the super-liquid pools (e.g. USDC-ETH), then I think you could really print money. Gas fees are invariant to transaction size. If you trade millions instead of thousands, gas costs amortize to epsilon. You could do some really cool stuff, by strategically flashing liquidity, either to avoid impermanent loss (the term DeFi zoomers use for adverse selection) or to kludge cheap passive directional execution (impossible through naive liquidity providing since Uniswap doesn't use a limit order book).
It also seems like there's a lot of opportunities to arb the DeFi exchanges against the centralized ones. My hunch would be that most price discovery occurs at the centralized exchanges. If you have the ability to dominate gas auctions, then it's basically the equivalent to latency supremacy. Going the other way, if you have the infrastructure/software to preemptively scan the mempool, then that probably gives you an advantage over regular centralized exchange traders. If they're watching Uniswap at all, they're probably only seeing market moving trades after they mine to the blockchain.
My two bps. As a neophyte, still figuring things out. It'll be interesting to see how Eth 2.0 changes the landscape. Anyone in the space or curious about it, feel free to drop a line if you want to shoot the shit offline. |
Good questions outrank easy answers.
-Paul Samuelson |
|
 |
|
Intriguing, I guess you're running an Ethereum full node? I'd quite like to run a node myself just cos it'd be fun, but I wasn't aware of the opportunity for both fun and profit.
On the topic of DEXs I saw there's https://projectserum.com/ which has a proper decentralised limit order book and what looks like crazy cheap fees ($0.00001 per transaction advertised), I wouldn't be surprised if it became quite popular. I'm not totally sure how it works, so don't take my word for it, but it appears they've nodes which handle the process of matching orders (or 'turning the crank' as they say in the technical docs https://docs.google.com/document/d/1isGJES4jzQutI0GtQGuqtrBUqeHxl_xJNXdtOv4SdII/edit#), if you could get in on that it's possible you'd have some edge in the centralised markets, similar to what you mentioned with being able to scan the mempool, assuming there's enough meaningful size going through ofc. However I've not had time to properly poke around, there are so many different flavours of the month in crypto it's hard to keep on top. However I'm amazed and encouraged that opportunities like the Uniswap one exist, even if they are small.
Off topic but one thing I do continue to be interested by is the huge amounts sloshing around top of book on Bitmex / (in the near past) Deribit / probably any other exchange with the maker rebates. I'm not a trader so not sure what's going on, I can only guess it's queueing shenanigans, but it'd be fun to have a go with some small size. |
|
|
|
 |
 jslade
|
|
Total Posts: 1250 |
Joined: Feb 2007 |
|
|
The biggest defi profits to be made are in security issues in the contracts and rube goldberg contraptions they're made out of. The bytecode generated by solidity compilers are laughable, and even the code written in solidity is absolutely hilarious. If you watch these things once in a while you'll see weird flying saucers followed by "we're upgrading our smart contracts" with little explanation of what actually happened. If you take the time to look at the transactions before and after, you rapidly realize why no explanations were forthcoming; wouldn't do much for faith in the technology. There's enough hacks they talk about people ought to be skittish.
Serum is probably fake; most of Solana is a LARP. Interesting technologies baked into it, and talented engineers involved, but the upshot is they make absolutely ridiculous claims and end up with real world performance that looks like any other generic/semi centralized proof of stake chain.
Oh yeah; eth2 -maybe in a few years. Beacon chain is only one tiny part of what eth2 is supposed to ultimately be, and there are no meaningful SCS on it. It's basically just a settlement layer for a sort of federated multichain thing that may or may not emerge some day. Eth1 is supposed to migrate there as a shard. Don't hold your breath. |
"Learning, n. The kind of ignorance distinguishing the studious." |
|
 |
|
Nice, I built something similar to front run on uniswap, but couldnt make much from it. My optimisations included patching GETH to broadcast messages wider than the default 3 nodes. I did see some addresses making a few hundred thousand USD a month front running. I also wasnt super fast as I simulated every trade in a forked virtual eth chain to check I would get my capital back as some tokens, you can only buy and not sell (I found that out the hard way). If you want to compare notes sometime. drop me a line.
The biggest trade one could do at the moment is cash and carry arbitrage on deribit or ftx (or even binance) on spot vs. futures, annualising something like 12-15% at the moment. |
|
|
|
 |
 nikol
|
|
Total Posts: 1483 |
Joined: Jun 2005 |
|
|
Decentralized exchange problems are similar to the ones solved with smart routers implemented in Bats, IB, MTF etc. in conventional markets, so tokenization of similar idea seems natural. |
... What is a man
If his chief good and market of his time
Be but to sleep and feed? (c) |
|
 |
|
For the next couple of years, you can probably make serious money just doing cash and carry, and arbing one exchange against another (including DEXes). No need to overcomplicate, it is just a matter of having fast, reliable connections to many exchanges and good risk management. You'd have to compete against Alameda (interestingly, ex-Susquehanna guys) and others, but the pie is big enough for several players.
I am not doing it at the moment because it seems like it would be a full-time job and I have more interesting things to spend my time on, but that would be pretty profitable I guess.
|
"Earth: some bacteria and basic life forms, no sign of intelligent life" (Message from a type III civilization probe sent to the solar system circa 2016) |
|
|
 |
|
This is a great inspiring article. I am pretty much pleased with your good work. You put really very helpful information. Delhi Call Girls |
|
|
 |
 Bytes32
|
|
Total Posts: 8 |
Joined: Aug 2021 |
|
|
Miner extracted value (MEV) seems to be what's hot right now.
You look at all the tx in the mempool, insert your own tx ordering, package the tx together then send them directly to a miner with a fee. In return the miner will package the transactions into a block using the ordering that you specified and take the cut of the fee.
For example;
Someone submits a ETH transaction for a $5k buy order in the ETH/USDC uniswap pool. You take that transaction and sandwhich it in between your own;
tx1: Buy $10k of ETH on ETH/USDC victim's tx: Buy $5k Eth on ETH/USDC tx2: Sell all your ETH on ETH/USDC
you pocket the difference that is left. Classic frontrunning.
You package those transactions and send them to a miner with a $fee and he executes those transactions in the order that you want.
@NeroTulip
You really think cash and carry is profitable still? The market is surprisingly efficient in crypto. |
|
|
|
 |
|
The problem is that since the advent of Flashbots, the miners are reliably extracting 90%+ of the profits in those trades. Prior to widespread Flashbots adoption, you'd win those opportunities in priority gas auctions (PGA). Most times, blocks would print well before the PGA price hit economic breakeven. There was a lot of room for technically sophisticated players to net well above their gas spend.
Now with Flashbots, competition is a lot flatter. It's a sealed auction, that goes through an easy to onramp API instead of the standard p2p mempool. There's a lot more competition, and most people bid somewhere close to the breakeven price. Consequently, it's not anywhere near as profitable as it used to be.
I haven't looked into it directly, but I think there are still opportunities in BSC and Polygon, where Flashbots (AFAIK) hasn't been adopted by the validators. The other thing is, almost all the shitcoin buys are front-run, but virtually none of the sells are. That's because nobody actually wants to carry inventory. I think there is room for quants who know how to manage portfolio risk on this side of the equation. |
Good questions outrank easy answers.
-Paul Samuelson |
|
 |
 Bytes32
|
|
Total Posts: 8 |
Joined: Aug 2021 |
|
|
@EspressoLover
That's an interesting point on the shitcoin buy-side frontrunning but not the sell-side. I've seen that as well. But I'm not sure your statement about inventory risk is true; You can easily get shitcoin x through a loan and sell it. Unless your talking about absolute microcap coins for which there is no loan market.
tx1: Take loan from compound/aave of 500 SHIT, sell 500 SHIT victim tx: sell 100 SHIT tx2: buy back 500 SHIT + extra, repay loan and pocket the difference
I think it's a matter of the market just not being efficient yet. I mean look at this transaction... This guy just picked up a $13k arb opportunity on a single exchange. It's literally the most simple arb possible and it was just sitting there - this wasn't even a flashbots transaction: https://etherscan.io/tx/0xb5f6bc80b911867b7aeeddec928fbaeeb195bb5e091334017048fff9d1e78540
The fact that the most simple arbs possible are still available means that for the complex stuff there must definitely be opportunities still. Some simple stat arb strats will probably work. What do you think? |
|
|
|
 |
|
@EspressoLover @Bytes32
Do you think there are some interesting quant/math/stats questions for MEV that can lead to alpha (besides vanilla portfolio/risk management)?
My impression is that it nowadays boils down to a tech/implementation race of searching mempools/txpools and >90% of the stuff I see are plain sandwich attacks as described by @Bytes32. A large chunk of the rest looks very niche, realistically only doable for experts developers for the given protocol/shi*tcoin.
I'm asking because if that's the case, there's no way I can compete with the tech bros in such a race which also started several years ago and where returns are quickly diminishing. |
|
|
 |
 Bytes32
|
|
Total Posts: 8 |
Joined: Aug 2021 |
|
|
>Do you think there are some interesting quant/math/stats questions for MEV that can lead to alpha (besides vanilla portfolio/risk management)?
Unless you are doing something that hasn't been done before then no.
I've come to the realisation that MEV is almost ALL about gas optimisation. Any way to improve trade execution almost always costs more gas than what it's worth.
For example, say you can do a passive fill by depositing into a specific tick range on uni v3. This gives you a 0.6% better execution than doing a taker order because you get a maker rebate. But the gas cost of depositing liquidity, then withdrawing, then selling, is almost 3x that of a regular 2 swap sandwich. And so it's actually 3x more expensive!
I'll post some ideas;
> frontrunning so that the victim tx reverts - what is the probability that they will retry the tx at a higher price? > cross exchange market making - quote on binance at greater than 0.3% + gas cost of buying on Uni, Sushi, Balancer, then when you get filled, hedge your position on a DEX (i've only found ~3 bots that are doing this so far) > passive fills - detect a tx and post liquidity in a specific tick range on uni v3 (gives you a 0.3% rebate), then hedge your position on a CEX
I'm also quite sure that there are various subtleties in the mev-geth implementation that can be exploited to make money but this is just speculation.
sell-side shitcoin frontrunning is still a nut that seemingly hasn't been fully cracked yet. This is a shitcoin transaction that could have been frontrun but was instead backrun because nobody holds inventory on BUILD: https://etherscan.io/tx/0x13d59ef76889005b10a2322b310a2aff10aaece93cff13e0138462adff7eaed6
---
These bots are hedging their positions on CEX: https://flashbots-explorer.marto.lol/?block=13448544
|
|
|
|
 |
|
Yes, that gas optimization is key is also the impression I'm getting. I've heard quite a few people talking about switching from Solidity to Yul just to save on gas.
Thanks for throwing out the ideas! In particular, the last one sounds fun. Did you discover these bots via flashbots? One thing that I assume happens a lot is that less known strategies are not run on flashbots to avoid drawing attention. So that makes me wonder what's out there beyond the stuff one sees on flashbots...but obviously nobody can (would) answer this.
Btw, do you have some recommendations to discover and learn more on MEV? I'm quite new to this, read the couple of papers that are out there, played a bit around, and I'm on various discords. I'm not expecting free alpha, but the signal 2 noise ratio is pretty frustrating on these places.
|
|
|
 |
| |
 |
|
UCC episode with MEV intern (or senpai), if you haven't checked that out already. |
|
|
 |
|
Technical essays are one where you are given to discuss any statement or any particular idea. The topic can also be in an interrogative form. So, students often search for business law assignment help tips or services to write a compelling essay. Though several generalized tips are available to write an essay, very few of them are specifically valuable for technical essays. So, here is a list of few tips to help students in their technical essay assignments. Think of a suitable title Your title will show much about your perception of the subject. Also, it will be the first thing to attract the readers towards an essay. So, think of some suitable title that goes with the statement or the topic of essays before you start. This is the primary thing done by the professionals, even if you coding assignment help from any writing agency. However, you must be sure that the title you choose shall not disgust readers to read any further. It shall be easy to understand, related to reality where the readers can feel connected to your content. Try to make it simple and profound. Collect enough information in support of your argument A technical essay consists of a writer's opinion and extracts of supporting pieces of evidence for that. Therefore, you cannot just begin to write about something because you feel it to be correct. One has to have enough evidence and examples to prove them correct. You can ask for some samples from academic writing services and look into their approach to write a technical essay. It will help you a lot as all the writers in such companies are professionals and are accustomed to every writing rule. You can also ask them to write the entire paper for you if you are still facing difficulties. Make an impressive introduction and conclusion After the title, your introduction can be the catchiest paragraph for the readers. Try to brief the overall idea or the points you are going to discuss in the introduction. Your introduction shall carry a subtle glimpse of your take on the topic. However, it shall not be lengthy or too monotonous for readers to proceed any further. The conclusion is more or less the same. It concludes the entire extract and refers to the above points as the reason for such a concluding statement. If you are still in a dilemma, you can get online exam help for guidance or write your essay. Pay special attention to formatting and structure
Formatting and structure are of grave importance in any technical essay. However, the general format for technical papers is title, introduction, abstract, main body and conclusion. But, you shall be attentive if there is any specific format asked in a question. The arrangement also includes the font style, font size and paragraph style for the writing. Generally, it also asked to use references in an essay, so most experienced research paper help recommend APA style referencing in technical essays. However, you can or cannot use other references as per the instructions. We have a few more services below: CHCCCS007 Assignment Answers FNSACC501 Assignment Answers BSBHRM405 Assessment Answers HLSC220 Assignment Answers BSBMGT617 Assignment Answers |
|
|
|
 |
|
Well, thanks for sharing this information. Assignments are not big deal if it's get done by the Abc Assignment help . They provide plagiarism-free work, affordable prices, 24*7 live help, 3000+ Ph.D. experts, and help over 100+ subjects. For personalized assignment help just visit, diploma assignment help. |
|
|
 |