params.gno
3.28 Kb · 76 lines
1package pad
2
3// Protocol parameters.
4// Defaults are compile-time constants; GraduationThreshold and ListFeeGns also have
5// live copies set in Init and adjustable by protocol via SetGraduationThreshold /
6// SetListFeeGns (see memepad.gno). Bond create fee is owned by the bond realm.
7
8const (
9 // Token economics
10 TotalSupply int64 = 1_000_000_000
11 CurveSupply int64 = 800_000_000 // sold on bonding curve
12 // PoolSeed is legacy. Graduation sizes LP tokens to curve spot
13 // (raised * VirtualToken / VirtualUgnot); unsold remainder = LeftoverTokens.
14 PoolSeed int64 = 200_000_000
15
16 // Virtual constant-product seed (Pump-style).
17 // Max net raise when selling full CurveSupply:
18 // R = VirtualUgnot0 * CurveSupply / (VirtualToken0 - CurveSupply)
19 // Pearl default: VU0=3.5e9 + VT0≈1.073e9 => max raise ≈10.2k GNOT so
20 // DefaultGraduationThreshold 10_000 GNOT is reachable before sold-out.
21 VirtualUgnot0 int64 = 102_375_071_625 // mainnet: max raise ≥ 300k GNOT
22 VirtualToken0 int64 = 1_073_000_191 // virtual token side
23
24 // Default graduation raise (ugnot). Live value starts here in Init;
25 // protocol may call SetGraduationThreshold afterward.
26 GraduationThreshold int64 = 300_000_000_000 // 300_000 GNOT (SetGraduationThreshold later)
27
28 // Fees: 1.20% total. Of the fee: 40% creator, 40% protocol, 20% LP/k remainder.
29 FeeBPS int64 = 120
30 CreatorFeeShareBPS int64 = 4000
31 ProtocolFeeShareBPS int64 = 4000
32
33 // Fallback create bond for unit tests / if bond realm unavailable.
34 // Production pad uses createbond.CurrentBondUgnot() (see bond package).
35 // Sapphire normal bond = 2 GNOT; promo ~ $20 in ugnot set on bond.StartPromo.
36 CreateBondUgnot int64 = 150_000_000 // 150 GNOT fallback; live = bond realm
37 BondRefundBuyers int = 5
38 BondRefundMinRaised int64 = 5_000_000 // >=5 GNOT raised
39 BondRefundMaxHeights int64 = 100_000
40
41 // Anti-snipe: first N heights, max cumulative tokens per address (BPS of TotalSupply).
42 AntiSnipeHeights int64 = 20
43 AntiSnipeMaxBuyBPS int64 = 500 // 5% per address in window
44
45 // Status
46 StatusCurve = 0
47 StatusGraduated = 1
48
49 // Trade history ring buffer.
50 MaxTradeHistory = 128
51 // Trade sides stored in history
52 TradeSideBuy = 0
53 TradeSideSell = 1
54 TradeSideOpen = 2 // initial listing mark
55
56 DenomUgnot = "ugnot"
57
58 // --- Gnoswap auto-list (Sapphire) ---
59 // Curve collateral is WUGNOT (Buy TransferFrom). At graduate, pad already holds
60 // raised WUGNOT for LP - no realm self-wrap needed.
61 // CreatePool fee is fixed in GNS (typically 100e6 = 100 GNS):
62 // Fee = pre-funded GNS on pad OR surplus WUGNOT (fees retained) ExactOut -> GNS
63 GnoswapFeeTier uint32 = 3000 // 0.3% meme tier
64 GnoswapTickSpacing int32 = 60
65 GnoswapMinTick int32 = -887272
66 GnoswapMaxTick int32 = 887272
67 // Max WUGNOT used as ExactOut maxIn for fee buy (ceiling / slippage).
68 // Prefer pre-funding >=100 GNS on pad so LP depth stays = raised.
69 GnoswapMaxFeeWugnot int64 = 1_500_000_000 // 1500 GNOT
70
71 // Create-time GNS list fee escrow (padv20+).
72 // Creator must Transfer >= ListFeeGns free GNS to pad before Create.
73 // Locked per-launch until Gnoswap list consumes it, or ClaimListFee refunds creator.
74 // Matches typical gnspool.GetPoolCreationFee() (100 GNS, 6 decimals).
75 ListFeeGns int64 = 100_000_000
76)