x * y = k): each pool holds BWICK on one side and a token on the other, and the product of the two reserves stays constant across swaps, which is what sets the price.
What it does
- Pools (
CreatePool): a BWICK/token pair. The launchpad creates one automatically at graduation, seeded with the reserved tokens and the BWICK raised on the curve. - Swaps (
Swap): trade BWICK for a token or a token for BWICK against a pool. Token-to-BWICK swaps arrive via the CW20Receivehook (you send the CW20 tokens with the swap instruction attached). - Liquidity (
AddLiquidity/RemoveLiquidity): deposit both sides to earn a share of swap fees; your LP position is tracked and withdrawn on demand.
Fees
The swap fee is fixed globally in basis points (swap_fee_bps, 100 = 1%) and capped by the contract at MAX_TOTAL_FEE_BPS = 1000 (10%). Pools can carry an optional augmented_fee_bps on top (graduated pools default to 1%). Fees accrue to liquidity providers.
Interface
All pool, swap, and liquidity messages are inmsg.rs; the swap math and reserve accounting are in contract.rs.
You will see the names
dot_reserve, min_dot_out, and SwapTokenForDot in the source. These are legacy field names from an earlier prefix, functionally they are BWICK. They are part of the deployed message schema, so they are kept as-is for compatibility.
