Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

params.gno

3.26 Kb · 75 lines
 1package padv12
 2
 3// Protocol parameters (MVP). Tunable before deploy; post-deploy treated as constants
 4// unless a future governance path is added with timelock.
 5
 6const (
 7	// Token economics
 8	TotalSupply int64 = 1_000_000_000
 9	CurveSupply int64 = 800_000_000 // sold on bonding curve
10	// PoolSeed is legacy: graduation seeds LP with ALL remaining tokens
11	// (TotalSupply - RealSold), not a fixed 200M reserve.
12	PoolSeed int64 = 200_000_000
13
14	// Virtual constant-product seed (Pump-style).
15	// Max net raise when selling full CurveSupply:
16	//   R = VirtualUgnot0 * CurveSupply / (VirtualToken0 - CurveSupply)
17	// With VU0=30e6, VT0=1.073e9 → R≈87.9e6 (< 100 GNOT) — DO NOT set
18	// GraduationThreshold above that or markets stick when RealSold hits CurveSupply.
19	// Source default (50 GNOT) is safely under max raise. Sapphire prepare-v11
20	// retunes VirtualToken0 so threshold 100 GNOT is hit before sold-out.
21	VirtualUgnot0 int64 = 30_000_000    // 30 GNOT virtual
22	VirtualToken0 int64 = 1_020_000_000 // virtual token side
23
24	// Graduation when net ugnot raised into the curve reaches this.
25	// Must stay BELOW max raise from exhausting CurveSupply (see Virtual*).
26	// Sapphire deploy patches to 100 GNOT and retunes VirtualToken0 accordingly.
27	GraduationThreshold int64 = 100_000_000
28
29	// Fees: 1.20% total. Of the fee: 40% creator, 40% protocol, 20% LP/k remainder.
30	FeeBPS              int64 = 120
31	CreatorFeeShareBPS  int64 = 4000
32	ProtocolFeeShareBPS int64 = 4000
33
34	// Fallback create bond for unit tests / if bond realm unavailable.
35	// Production pad uses createbond.CurrentBondUgnot() (see bond package).
36	// Sapphire normal bond = 2 GNOT; promo ≈ $20 in ugnot set on bond.StartPromo.
37	CreateBondUgnot      int64 = 2_000_000
38	BondRefundBuyers     int   = 5
39	BondRefundMinRaised  int64 = 10_000_000 // ≥5 GNOT raised
40	BondRefundMaxHeights int64 = 100_000
41
42	// Anti-snipe: first N heights, max cumulative tokens per address (BPS of TotalSupply).
43	AntiSnipeHeights   int64 = 30
44	AntiSnipeMaxBuyBPS int64 = 300 // 5% per address in window
45
46	// Status
47	StatusCurve     = 0
48	StatusGraduated = 1
49
50	// Trade history ring buffer.
51	MaxTradeHistory = 256
52	// Trade sides stored in history
53	TradeSideBuy  = 0
54	TradeSideSell = 1
55	TradeSideOpen = 2 // initial listing mark
56
57	DenomUgnot = "ugnot"
58
59	// --- Gnoswap auto-list (Sapphire) ---
60	// CreatePool fee is fixed in GNS (pool.GetPoolCreationFee, typically 100e6 = 100 GNS).
61	// GNOT cost of that fee MOVES with market (~10 GNOT/GNS on Sapphire probe → ~1000 GNOT/listing).
62	//
63	// Funding model (price-safe):
64	//   LP  = raised-sized WUGNOT (protected — never sold for fee)
65	//   Fee = pre-funded GNS on pad  OR  surplus WUGNOT above raised (ExactOut → GNS)
66	// wugnot.Deposit is EOA-only — protocol wraps off-pad and transfers inventory in.
67	GnoswapFeeTier     uint32 = 3000 // 0.3% meme tier
68	GnoswapTickSpacing int32  = 60
69	GnoswapMinTick     int32  = -887272
70	GnoswapMaxTick     int32  = 887272
71	// Max WUGNOT (ugnot units) allowed for ExactOut fee buy — price ceiling / slippage cap.
72	// Not tied to raised/2. At ~10 GNOT/GNS, 100 GNS needs ~1006 GNOT; 5000 leaves headroom
73	// if GNS becomes ~5× more expensive vs GNOT. Prefer pre-funding GNS to skip this path.
74	GnoswapMaxFeeWugnot int64 = 5_000_000_000 // 5000 GNOT
75)