Buy spends caller's WUGNOT on the bonding curve (TransferFrom); credits tokens. amountWugnot: max WUGNOT to spend (must Approve pad first). UI: Deposit+Approve+Buy. 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.