Forums  > Trading  > DeFi and decentralized market making  
     
Page 1 of 1
Display using:  

contango_and_cash


Total Posts: 133
Joined: Sep 2015
 
Posted: 2020-12-01 04:12
Anyone doing anything interesting here?

I've had centralized exchange bots live since 2013.

This space moves incredibly quickly and hard to keep track.

EspressoLover


Total Posts: 474
Joined: Jan 2015
 
Posted: 2020-12-01 17:15
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

steamed_hams


Total Posts: 7
Joined: Jun 2020
 
Posted: 2020-12-04 22:33
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: 1243
Joined: Feb 2007
 
Posted: 2020-12-08 15:40
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."

illLiquid


Total Posts: 4
Joined: Nov 2012
 
Posted: 2020-12-22 03:57
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: 1345
Joined: Jun 2005
 
Posted: 2021-01-05 13:52
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)
Previous Thread :: Next Thread 
Page 1 of 1