Buy spends WUGNOT on the bonding curve; credits tokens. amountWugnot: max to spend. UI preferred: Deposit + Transfer(pad, amt) + Buy. Fallback: Deposit + Approve + Buy (TransferFrom). minTokensOut: slippage floor (0 = disabled). Auto-graduates at threshold or sold-out.
Production: collateral is real WUGNOT on pad -> Graduate can auto-list Gnoswap. Tests (testSkipBanker): amountWugnot ignored; OriginSend ugnot is used as units.
Last-fill (no overshoot):
- Cap net so RaisedUgnot never exceeds GraduationThreshold (refund excess WUGNOT).
- Cap by remaining curve tokens (CurveSupply - RealSold).
If the curve is already sold out (or raise already filled), Buy refunds the full take and graduates when ready - no panic so users are not stuck mid-tx.