Hacker News new | ask | show | jobs
by denvercoder904 1472 days ago
I find the concept of Curve pools (liquidity pools) like UST/3CRV, dual token systems, algorithmic pegged stablecoins, and services like Achor very complicated to follow. Is there any good literature that I can read the help understand the relationship between these components. Do they map existing components in traditional finance?
5 comments

They are complicated on purpose, as they’re designed to hide the fact it’s just hot air supported by more hot air.

Retail investors try reading it, give up, and quietly agree that the emperor’s new clothes are lovely

theory of: uniswap AMM, dai, ust/luna, is exactly as complicated as it needs to be (not complicated at all if you did calculus 1)
Not a specific resource but a good one to start with would be MakerDAO DAI. Note that when people in the space talk about "will algorithmic stablecoins ever work?" They'r usually referring specifically to noncollateralized or undercollateralized stablecoins (like UST). DAI is overcollaterallized so its fundamental model is not really under debate recently. However, DAI is the first major decentralized stablecoin and a lot of concepts and terminology reappear in later ones so understanding what it does and how it works is a great base for understanding algorithmic stablecoins. Much like understanding Bitcoin is useful when looking at other blockchains.

For AMMs, same applies to Uniswap. Their whitepapers(V1,V2,V3) are both accessible and formal enough to be useful.

Also this paper from Curve https://curve.fi/files/stableswap-paper.pdf

Projects like Terra and Anchor are messy enough (some might say willfully misleading and opaque) that you want to be able to recognize lingo and patterns (and, ideally, source code) to come out with somewhat useful results. In some cases, you'll need to be monitoring their Discord, Twitter, and/or Telegram groups to follow them properly - though in those cases, I've taken that as enough of a red flag in itself to disqualify the entire project from my attention.

imo the problem with UST vs DAI was not under vs over collateralisation, but rather that Luna supporting UST had its value tied to UST adoption. On the other hand, DAI is collateralised by things like Eth, which could also in theory crash, but get their value from a much wider ecosystem than just DAI - hence one potentially avoids the circularity.

For a great read on this and more, check out Vitalik's post: https://vitalik.ca/general/2022/05/25/stable.html

I second the recommendation to learn about Uniswap. Uniswap was really the beginning of the defi explosion of the last couple of years
Usually DeFi platforms will have a lot of tutorials and documentation. Usually the price of an asset in a pair is computed automatically using the ratio asset1:asset2. Stablecoins also have their own docs. For example, terra’s whitepaper explains the fundamentals (mint tokens if the price is too high, burn tokens if the price is too low).
Yes. There is extensive literature on bank runs and similar failures caused by fractional or fraudulent reserves and lack of confidence, insurance, and regulation.
Eh, Curve pools and other invariant-based AMMs have some interesting properties outside traditional finance, bank runs, etc.

I'd read up on the Uniswap constant product invariant (xy=k) and consider reading the Uniswap v2 code (it's a pleasure to read) [0].

Then check out the StableSwap paper by Curve founder Michael Egorov [1]

Finally if you want a well-documented implementation to read in Solidity, check out Saddle [2]. Disclaimer, I helped write the first iteration.

[0] https://github.com/Uniswap/v2-core [1] https://curve.fi/files/stableswap-paper.pdf [2] https://github.com/saddle-finance/saddle-contract/blob/maste...

Can you please go into more detail on these "interesting properties"? I fail to see anything in terms of real analysis in the links you gave, simply descriptions of automated trading rules simple enough to be understood, but mathy enough to sell to the marks if cryptocurrencies, backtested on the growth stage of a bubble.
It solves the problem of decentralised liquidity. An order book with traditional market makers is inherently centralised, here we have incredibly simple algorithms for trading between two assets with no intermediary, and the complicated, HFT market makers of traditional finance are replaced by passive liquidity providers.

Not sure why you mention backtesting, or how that would really apply.

So basically, there is no interesting inherent property (no interesting math, no deeper dynamics), it just "solves" a problem DeFi created - and it only introduces a whole new layer of possible implementation errors and new types of risks like impermanent losses.

Backtesting is relevant because there was no stability analysis, no simulated long drawn out bearmarket, no adversarial probing. Just some minimal quant sugar to make the new gambling opportunity go down with the suckers.

In real finance, you have much more sophisticated and diversified trading algorithms babysitted and regulated for stability, with much higher effective decentralisation and control since different HFT funds are legally barred from conspiring against the traders. Oh, and much lower fees as well.

Really unhelpful and not pertinent to the question OP asked at all

HN is better than this.

You have been radicalized.
I'm completely bewildered at what you mean in this context, given that the most conservative possible viewpoint on stablecoins is "there is no algorithm that can produce a stable coin other than 100% or better reserves in the stated currency".

Remember that "conservative" in finance means not taking risks, rather than the current political meaning of "right wing authoritarian".