This is the engineering story behind how we built Limit Order v2 from the ground up.
For a while, people wanted two things: more order types, and to think in dollars instead of doing token-for-token math.
But every time we looked at building them, we hit the same wall. The v1 onchain program and the ratio model couldn't express what people wanted.
So we bit the bullet and rebuilt it with a different approach: an order is a price, not a barter ratio.
It surfaced problems the v1 model had been hiding: pricing any token in USD, monitoring every order at scale, and executing safely on a ledger that never forgets.
@arzine_ documented the whole thing in 3 parts ๐
Part 1 - The any-any problem:
Part 2 - Correctness under failure:
Part 3 - From barter to money: