Skip to content

Commit 9be8bc5

Browse files
author
Edward (Mike's bot)
committed
docs(token-swap): drop 'no floats, no fixed-point' from README
That clause was saying *why we removed* the fixed crate, which belongs in the changelog/PR description, not in the README that describes what the code does. The positive half (u128 + checked arithmetic, matching production Solana AMMs) is kept.
1 parent 912511f commit 9be8bc5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tokens/token-swap/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The pool keeps `x * y = K` invariant: if `x` is the reserve of token A and `y` i
1515
- Withdrawals proportional to LP-token share of the **effective reserves** (raw reserve minus admin's owed slice), so the admin's accrued fees don't dilute exiting LPs.
1616
- **Caller-supplied slippage floors on every state-changing instruction:** swaps revert with `SlippageExceeded` if the output falls below `min_output_amount`, deposits revert with `DepositBelowMinimum` if the LP mint amount falls below `minimum_lp_tokens_out`, withdrawals revert with `WithdrawalBelowMinimum` if either side falls below its floor.
1717
- **Defence-in-depth invariant check:** every swap re-verifies `effective_pool_a * effective_pool_b` doesn't decrease after the transfers, so a bug in the curve math fails the transaction instead of silently giving the trader too much.
18-
- All financial math in `u128` with checked arithmetic, matching how production Solana AMMs (Orca, Raydium, Meteora, Saber) do it. No floats, no fixed-point types for money.
18+
- All financial math in `u128` with checked arithmetic, matching how production Solana AMMs (Orca, Raydium, Meteora, Saber) do it.
1919
- Anchor 1.0 Rust [program](https://solana.com/docs/terminology#program) with LiteSVM integration tests.
2020

2121
## Why a CPAMM

0 commit comments

Comments
 (0)