Synthetic tokens are ERC20 tokens that represent 1:1 pegged underlying assets while enabling separate yield tracking through a weighted checkpoint mechanism.Documentation Index
Fetch the complete documentation index at: https://scalex.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Token Properties
1:1 Pegging
Each synthetic token always maintains a 1:1 relationship with its underlying asset:- 1 sUSDC = 1 USDC (stable value)
- 1 sETH = 1 ETH (stable value)
- No appreciation or depreciation of token value
Yield-Bearing Capability
While maintaining stable value, synthetic tokens:- Accrue yield from lending operations continuously
- Track yield separately from token balance
- Enable claimable yield at any time
Order Book Compatibility
Designed specifically for CLOB trading:- Predictable order sizes (100 sUSDC = exactly 100 USDC value)
- Clean price discovery (no yield interference)
- Standard trading mechanics
Weighted Checkpoint System
Global Yield Counter
Tracks total yield generated per underlying asset:User Checkpoints
Each user has individual checkpoints for fair yield tracking:Yield Calculation Formula
Checkpoint Updates
On Deposits
On Withdrawals
Weighted Checkpoint Visualization
The weighted checkpoint mechanism ensures fair yield distribution for users joining at different times: Fair Distribution Example:- Fairness: Users earn based on actual participation time
- Efficiency: Single global update serves all users
- Accuracy: Weighted averages prevent gaming the system
- Transparency: Clear mathematical formula for yield calculation
On Trading
Checkpoint updates maintain fair yield tracking during active trading through weighted averages.Technical Implementation
ERC20 Integration
Yield Tracking
- Yield calculation occurs O(1) per user
- Global updates scale to unlimited users
- No individual account updates needed
Benefits Over Traditional Models
vs aTokens (Aave-style)
| Feature | aTokens | Synthetic Tokens |
|---|---|---|
| Value Stability | Changes with yield | Always 1:1 stable |
| Order Trading | Complex (changing value) | Simple (stable value) |
| Price Discovery | Corrupted by yield | Pure market dynamics |
| Slippage Calculation | Imprecise | Accurate |
System Advantages
- Order Book Isolation: Trading operations unaffected by yield calculations
- Capital Efficiency: Tokens trade freely while earning yield
- User Experience: Simple 1:1 understanding, no complexity
- Gas Optimization: Efficient yield tracking at scale
Integration with Protocol
BalanceManager Interaction
- Mints tokens on user deposits
- Tracks user checkpoints
- Coordinates yield distributions
OrderBook Integration
- Locks tokens during active orders
- Updates balances on trades
- Maintains trading functionality
LendingManager Integration
- Receives yield distributions
- Updates global counters
- Calculates user entitlements
