Buying shares
1
Deposit Collateral
Transfer 100 USDC to the protocol vault
2
Mint Equal Pairs
Protocol mints 100 X + 100 Y shares to your wallet
3
pm-AMM Swap
Unwanted shares (100 Y) swap for desired shares (+86.2 X)
4
Result
You receive 186.2 X shares total
Market Changes
Selling Tokens
You want to sell 50 X shares.1
Protocol Finds Optimal Split
Calculates best ratio: how much to swap vs. burn
2
pm-AMM Swap
Trade 21.8 X shares → 28.2 Y shares in the pool
3
Burn Equal Pairs
Burn 28.2 X + 28.2 Y pairs → receive 28.2 USDC
4
Result
You receive 28.2 USDC after selling 50 X shares
Market Changes
Why Swap First?
The key insight: you need equal amounts of X and Y to burn pairs and redeem USDC. If you only have X tokens, you must:- Swap some X → Y tokens
- Burn the resulting X + Y pairs
- Maximize USDC returned