Draft
Conversation
… processing for larger number of bids, add ops view helpers 2. ops runbook 3. design overview
This was referenced Feb 25, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Token launch contracts - support auction mechanism, TGE related functionality
Greptile Summary
Adds token launch auction infrastructure with uniform clearing price mechanism, tiered bidding windows, and TGE orchestration.
Key Changes:
TokenLaunchAuction.sol(1786 lines): Core auction contract with batched finalization, bonus token pool for early bidders, distribution retry logic, and unwind mechanism for delayed TGELpTokenLockVault.sol&PoolLpSeeder.sol: LP management with time-locked vesting and automated liquidity seedingArchitecture:
Critical Dependencies:
transferandburnon STRATO token (documented in comments at lines 26-34)Confidence Score: 4/5
TokenLaunchAuction.sol- verify AdminRegistry whitelisting is configured before deployment, test all allocation stages with various bid distributions, and validate unwind mechanism with edge casesImportant Files Changed
Sequence Diagram
sequenceDiagram participant Owner participant Bidder participant Auction as TokenLaunchAuction participant USDST participant STRATO participant LPSeeder as PoolLpSeeder participant Vault as LpTokenLockVault participant TransferLock Owner->>Auction: initialize(tokens, wallets, params) Owner->>Auction: escrow STRATO tokens Owner->>Auction: startAuction() Note over Auction: Tier 1 Window (bonus eligible) Bidder->>USDST: approve(Auction, budget) Bidder->>Auction: placeBid(budget, maxPrice) Auction->>USDST: transferFrom(bidder, budget) Note over Auction: Tier 2 Window Bidder->>Auction: placeBid(budget, maxPrice) Note over Auction: Close Buffer (no new bids) Note over Auction: Auction ends Owner->>Auction: finalizePrice() Note over Auction: Computes clearing price P* Owner->>Auction: finalizeAllocationsBatch(maxCount) Note over Auction: Batched allocation stages:<br/>0-Classify bids by price<br/>1-Compute uncapped tokens<br/>2-Apply maxRaise cap<br/>3-Finalize bids<br/>4-Compute bonus demand<br/>5-Allocate bonus tokens Owner->>Auction: distributeBatch(bidIds) Auction->>STRATO: transfer(bidder, tokens+bonus) Note over STRATO: Transfers succeed but<br/>tokens non-transferable Bidder->>Auction: withdrawRefund(bidId) Auction->>USDST: transfer(bidder, refund) Owner->>Auction: setTgeTime(timestamp) Owner->>Auction: executeTGE() Auction->>USDST: transfer(LPSeeder, lpUSDST) Auction->>STRATO: transfer(LPSeeder, lpSTRATO) LPSeeder->>LPSeeder: addLiquidity() LPSeeder->>Vault: transfer(lpTokens) Vault->>Vault: recordLock(lpTokens) Auction->>TransferLock: unpause() Note over STRATO: Transfers now enabled Auction->>USDST: transfer(treasury/reserve) Note over Bidder,STRATO: Tokens now transferableLast reviewed commit: f6058ce