Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Theoretical Advances in AMM (Automated Market Maker) Understanding (fbifemboy.substack.com)
91 points by SkyMarshal on Jan 30, 2022 | hide | past | favorite | 30 comments


Nice write-up. I realized recently how poorly understood AMMs are, despite their apparent mathematical simplicity. I used to think of AMM swaps as analogous to market orders, and this is still the dominant view. But in the presence of MEV, swaps behave like limit orders instead. I wrote it up in more detail here: https://ruudvanasseldonk.com/2021/12/07/a-perspective-shift-...


Question to OP, or others: do you think tradfi and things like the stock market could benefit from AMMs? No decentralization necessary, just creating markets for crowdsourced permanent liquidity. Corporate and Municipal bond markets could get a major boon from this as they already are illiquid.


If the AMM algorithms are the most profitable way to run a market making trading strategy, why wouldn't electronic market makers in "tradfi" not be using something very similar?

If it is not the most profitable, why wouldn't we expect it to lose money over time to competing algorithms?

The only way I could see this working is if the exchange deliberately gave the AMM some kind of advantage, like allowing it to trade much faster than all other participants, or without paying fees. Say, if it were allowed to connect to an exchange like IEX in front of the fiber optic speedbump.


It's not the most profitable, the same way a random forest is unlikely to be more effective than a properly trained deep learning model.

However, it's efficient when it comes to computational power (and cost!) required. On Ethereum, storing a megabyte of data costs hundreds of thousands of dollars.


AMMs are essentially an innovation around gas costs on the EVM. It is an approximation of order book without the requirement to store all the orders. I don't think this kind of optimization is necessary in tradfi markets and the additional features of a Central Limit Order Book outweigh the benefits of using an AMM imo.


My issue with central limit order books is that every asset is gatekept by the need for active market makers to provide the limit orders, it relies on money deposited at a particular exchange to be non-posted orders, it relies on stub quotes, it relies on strict regulations and deputization of exchanges to enforce behavior of market maker’s limit orders

These are expensive things to maintain.

Whereas with AMMs and liquidity pool assets, the community can provide liquidity, have a passive income stream, build new markets for the liquidity pool shares, and have routing between different asset’s liquidity pools such that the base currency isnt as important.

I like limit orders, especially for accumulation at the same price, but with the advent of this method I see more benefits. AMMs with ranged liquidity fulfills what I like about limit orders too.


Might be relevant to note that most markets are not using limit order books much (eg, FX, bonds, rates OTC). No one there would want to run purely formulaic market making as prices can gap etc.

I agree with idea/interesting concept of making market making better investible, tough.


Prices gap due to illiquidity and markets being closed, in an AMM if a price should gap people can still get it there, but I can also see the reality of the AMM preventing people from just switching to the correct prices in the bids and asks without making unnecessary fills along the way. I just think that kind of coordination is so uncommon in traditional markets that its not worth the distinction.


Illiquidity is one possible reason, news and actions are other ones (e.g. Swiss Franc peg and removal of peg in 2010s, credit events etc.). No need for markets being closed or illiquid, just people figuring out a new state or straight jumping to it - and that expresses itself in a lack of liquidity sometimes, but it's not the cause.


Yeah AMM liquidity pools suck at repricing, this got me thinking… maybe liquidity providers can just disable their particular liquidity pool share in such an event. The goal is to see what price people will buy and sell at, which is what market makers do all day every day in other systems.

(I’m sure people will try to abuse that to warp liquidity, but they already can by unwinding and removing their share.)


I would argue AMM go beyond just evading gas cost. It sounds redundant to say, but an AMM eliminates the need for active market makers; or put another way, anyone can be a market maker. I think that's an interesting thing--previously there was no very effective way for me to participate in market making (and the potential profits of such), but with an AMM it essentially becomes a passive investment.


Market making, at least in stocks, is already very well-automated. They are extremely efficient businesses; they need to, because they take million-dollar risks just in hope to make a few hundred bucks each time, and pay a lot of that in costs.

By EMH there's no such thing as free lunch or true passive income. This is especially true in trading. Profit-seeking activities with low barrier-of-entry eventually become races to the bottom. If there's easy money to be made with passive AMM, people will jump into it en masse and eventually compete on cost-saving. Much like mining, where electricity costs and how quickly you can fix mining rigs with few resources could make and break a farm.


That is true up to a point, however with the "passive" aspect you get exposed to "impermanent loss", which is a loss in value due to the relative price fluctuations between the two assets in the AMM (https://www.machow.ski/posts/an_introduction_to_automated_ma...). As in most things in finance, TNSTAAFL.


Most things aren't that volatile, especially in tradfi

Range liquidity and liquidity pool optimizers reduce, eliminate, or make it profitable despite IL, even in volatile environments

All I’m seeing is that tradfi capital markets would benefit more and more


A TradFi market maker can also offer a liquidity pool if they choose to; its regulation stopping that.


Actually, things sort of like that exist in some jurisdictions where banking coops etc. pool and redistribute risk within their network.

Arguably, some dark pools also are like this with clear execution rules and an outside price oracle - only up to a point comparable, though.


No. AMMs are extremely capital inefficient market makers. The only reason they are useful in DeFi is because it's difficult to implement limit order books in a decentralized way.


AMMs are not price discovery mechanisms, i.e. they can only potentially help in liquidity provision in very well coupled underlyings (maybe index vs basket of stocks).

If, for example, credit risk on a bond changes the formulaic nature of an AMM will open up huge arbitrage opportunities.


There's no technical limitation stopping an AMM's pricing function from considering credit risk.


Sure, it could have an algorithm that "solves" for everything, but we are nowhere near that. Also, no-one believes they can always correctly guess prices in financial markets, hence one-sided markets, liquidity gaps etc.

Somehow price discovery is usually ignored in AMM circles, markets are not just about liquidity provision.

Market making can lose a ton if money quickly, and right now those losses would flow heavily into predictable AMMs if they were around in traditional asset classes.


gate.io does this.


Is there anything to AMM's beyond automated currency speculation (where "currency" is some set of digital tokens)?


This is important to understand the gravity of AMMs.

Currency was made because barter sucks.

Cryptocurrencies were made because some people find currency to suck.

AMMs makes barter not suck.

Definitely follow advancements in AMMs, they come with some new problems that have been tolerable by the markets so far but can improve. This article is about some directions of further improvements.


> Currency was made because barter sucks.

Mandatory note: currency was made because debt requires trust (or at least repeated interactions), there was never a “barter world before currency”. (And it's not about whether you like Graeber or not, the “barter myth” was known to be false even in the early 20th century, see Allyn Young)


I’d be interested to check those out books out, all economic thought pieces like those have plenty of criticisms from other economists but I’m open to the research.

Other people believe in the chronology I presented so I think its a quick way to get the point of a new concept across. I’m open to finding a more accurate way of saying that though, if its just as simple.

The key concept that I want to convey is that AMMs improve on this regardless, mainly due to the stored last price, and the routing between liquidity pools. So the required trust is even lower than what “trust-debt-glue” exists for. The AMMs practically fulfill its purpose.


It's not about any individual book, there's simply no evidence of mainstream barter use in any know place or era in the world. The “barter before money” is just a fable invented by Adam Smith.

Just Google “barter myth” and you'll have plenty of resources if you're interested in that subject.

“Barter preceding money” is the economics equivalent of “knights fighting without a helmet” you can see in Hollywood movies.


If DeFi is to be the finanacial service of the masses why do I have to have a math degree to understand this article?


You don't understand regular finance either, but the sharp edges have mostly been covered over the last hundred years so you don't see them.


Right, I forgot that the masses of iPhone and Android owners understand the technicalities of their devices.

You don't have the requisite understanding for this abstraction layer. Get that knowledge, or wait until someone distills it for you.


With AMMs there is no advancement possible. Current AMMs (almost all of it) represent a trading strategy depends on correlation between assets. Further assets in liquidity pool decoupled from each other further it fails which happens most of the time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: