Example: Buy YES at 50 cents
Context: User wants to bet 50 USDT that BTC will reach 100k.
Complete Flow
Amount Calculation
If user buys YES at 50 cents:
| Metric | Value |
|---|
| Price | 50 cents = $0.50 per token |
| Amount | 50 USDT |
| Tokens received | 50 / 0.50 = 100 YES tokens |
If YES wins:
- 100 YES tokens become 100 USDT (profit: +50 USDT)
If NO wins:
- 100 YES tokens become 0 USDT (loss: -50 USDT)
Example: Sell NO at 60 cents
Context: User owns 200 NO tokens and wants to sell 100 at 60 cents.
Example: Split 100 USDT
Context: User wants market exposure without taking a position.
Before Split
- User: 100 wUSDT, 0 YES, 0 NO
After Split
- User: 0 wUSDT, 100 YES, 100 NO
Gasless Split Flow
Prices are in cents (0-100):
| Price | USD Value |
|---|
| 25 | $0.25 |
| 50 | $0.50 |
| 75 | $0.75 |
YES price + NO price approximately equals 100 cents. If YES is 60, NO should be around 40.
Sizes are in wei (18 decimals):
| Wei | Tokens |
|---|
| 1000000000000000000 | 1 |
| 10000000000000000000 | 10 |
| 100000000000000000000 | 100 |
// JavaScript example
const tokens = 10;
const wei = BigInt(tokens) * BigInt(10 ** 18);
console.log(wei.toString()); // "10000000000000000000"