In the morning, I saw everyone saying that ZAMM made money, so I quickly took a few bites of lunch and took a look at the white paper.
Too long version summary:
Whether for deployers, LPs or traders, this is the more gas-saving Uniswapv2.
How is gas saved?
1⃣ Singleton Design
Core: All liquidity pools (such as ETH/USDC, BTC/DAI, etc.) are concentrated in one smart contract, without cross-contract interaction.
Compared with the traditional model:
Uniswap and other AMMs need to deploy contracts independently for each trading pair, and cross-contract communication (such as routing contracts and factory contracts) is required when calling.
ZAMM merges all pools into a single contract, similar to putting all goods on "one shelf".
Advantages:
Lower Gas: Avoid extra overhead of cross-contract calls
2⃣Flash Accounting
Core: Use EIP-1153 transient storage (temporary storage, automatically cleared after transaction) to complete accounting of multi-step transactions (such as A→B→C token exchange) in a single transaction to avoid repeated transfers of intermediate tokens.
Example process:
Traditional mode: A→B transfers once, B→C transfers again (two gas fees).
ZAMM mode:
Record the exchange path of A→B→C in transient storage.
In the end, only the net amount transfer of A→C is executed (only one gas fee).
Advantages:
Save Gas: Reduce the number of on-chain transfers (especially multi-hop transactions).
3⃣ Concentric Liquidity
Core: After liquidity providers (LPs) enter assets once, they can earn fees permanently, and allow other strategy contracts to "layer" and build complex strategies based on their liquidity.
Analogy:
Base layer: LP's original liquidity is equivalent to the "foundation", which earns stable fees.
Strategy layer: Other protocols (such as leveraged mining, hedging tools) can build "buildings" on the "foundation" without moving the foundation.
Advantages:
Passive income: LP does not need to actively adjust positions (such as full-range liquidity).
Composability: Strategy developers can directly reuse the underlying liquidity to reduce development costs.
4⃣Token Launchpad
Core: Through the makeLiquid() function, atomic operations complete token creation + liquidity pool initialization.
Traditional pain points:
The project party needs to deploy the token contract first, and then call AMM to create a liquidity pool (two transactions, two gas fees, and operational risks).
ZAMM improvements:
The token issuance and liquidity pool injection are completed in a single transaction (such as automatically injecting 50% of tokens and ETH into the pool). Similar to "one-click token issuance + listing on the exchange".
Advantages:
Risk prevention: avoid manipulation or loopholes caused by failure to inject liquidity in time after the token is created.
Gas saving: The merge operation saves more than 40% of the gas cost.
——————
ZAMM has some optimizations in the contract, but the gas of ETH is already very low now, and I can't see the practical significance. Anyway, after so much research, I can't make this money anyway.