Token English Auction

HTTP 402 Payment Required - TON Blockchain Implementation

▶ Current Status

Raised / Target
-- / --
Progress
--%
Start Price
--
Current Price 🔒
--
Will be locked if you bid now
Tokens/TON
--
Time Remaining
--
Status: ACTIVE | Auto-refresh: 10s

▶ Place Bid

💎 Connect TON Wallet
Connect your wallet to auto-fill address and send payment directly
Auto-filled when wallet connected

▶ Recent Bids

BIDDER MAX PRICE AMOUNT BID TIME
Loading bids...

▶ API Endpoints

GET /api/auction/info
Get current auction status. Returns auction parameters, current price, total raised, and available supply.
curl https://x402.palette.finance/api/auction/info
GET /api/auction/bid?ton_amount=N&wallet=ADDR 402
Create a bid. Returns 402 Payment Required with payment instructions. One bid per wallet (1-100 TON).
curl "https://x402.palette.finance/api/auction/bid?ton_amount=5&wallet=UQBlen..."
Returns HTTP 402: Payment required. Send TON to address with bid_id as comment. Payment expires in 180 seconds. No refunds after payment.
GET /api/auction/my-bid?wallet=ADDR
Check your bid status. Returns bid details, payment status, and estimated token allocation.
curl "https://x402.palette.finance/api/auction/my-bid?wallet=UQBlen..."
GET /api/auction/bids?limit=20
Get recent bids list. Returns last N completed bids with bidder address, amount, price, and time.
curl "https://x402.palette.finance/api/auction/bids?limit=20"
Response Codes: 200 OK | 402 Payment Required | 409 Conflict (bid exists) | 410 Gone (auction closed) | 422 Invalid Amount

▶ Auction Mechanics

Parameter Value Description
Start Price -- Initial token price in TON
Ceiling Price -- Maximum token price
Min/Max Bid -- Bid limits per wallet
Supply -- Total tokens available
Rules: English Auction with Pay-as-bid pricing. One bid per wallet.
• Price increases linearly as more TON is raised (0 → target)
Each participant pays THEIR price (locked at bid time) 🔒
• Early bidders get better prices! Late bidders pay more.
• Pro-rata distribution if total demand exceeds supply.
📊 AUCTION SCENARIOS
[✓] SCENARIO 1: Target Reached (≥10,000 TON)
Success! All participants receive tokens at THEIR price (Pay-as-bid).

Example - Pay-as-bid:
• Alice bids 100 TON early at 0.0001 TON/token → gets 1,000,000 tokens
• Bob bids 100 TON late at 0.0008 TON/token → gets 125,000 tokens
Alice wins 8x more tokens for same TON! 🎯

If total demand > supply (Oversubscribed):
• Pro-rata cut applied to everyone
• Each keeps their own price, but gets fewer tokens
• Excess TON refunded automatically
• Example: Total tokens requested = 10M, available = 5M
  → Allocation ratio: 50%
  → Alice gets: 1M × 50% = 500K tokens, refund 50 TON
  → Bob gets: 125K × 50% = 62.5K tokens, refund 50 TON
[✗] SCENARIO 2: Target NOT Reached (<10,000 TON)
Auction Failed. Full refund to all participants.

• NO tokens distributed (allocated_token = 0)
• You receive back: your_bid - 0.01 TON (gas fee)
• Refunds processed automatically via distribute endpoint
• Example: You bid 50 TON → get back 49.99 TON