Trading & Staking (SDK)
Beyond privacy primitives, Obelysk includes an OTC orderbook for limit and market orders, a shielded swap router for private AMM trades, and a prover staking system where SAGE holders earn rewards by backing the GPU prover network.
OTC Orderbook
The OTC orderbook supports limit and market orders for Obelysk token pairs. Orders are matched on-chain with no intermediary.
Place a Limit Order
const order = await obelysk.otc.placeLimitOrder({
pair: 'SAGE/STRK',
side: 'sell',
price: '0.011', // 18-decimal fixed-point
amount: '5000',
});
console.log('Order ID:', order.orderId);
Place a Market Order
const fill = await obelysk.otc.placeMarketOrder({
pair: 'SAGE/STRK',
side: 'buy',
amount: '2000',
});
console.log('Filled at:', fill.averagePrice);
View Orderbook Depth
const depth = await obelysk.otc.getOrderbookDepth('SAGE/STRK');
console.log('Best bid:', depth.bids[0]?.price);
console.log('Best ask:', depth.asks[0]?.price);
console.log('Spread:', depth.asks[0]?.price - depth.bids[0]?.price);
Batch Operations
// Place multiple orders at once
await obelysk.otc.batchPlaceOrders([
{ pair: 'SAGE/STRK', side: 'sell', price: '0.011', amount: '1000' },
{ pair: 'SAGE/STRK', side: 'sell', price: '0.012', amount: '2000' },
{ pair: 'SAGE/STRK', side: 'sell', price: '0.013', amount: '3000' },
]);
// Cancel all your orders
await obelysk.otc.cancelAllOrders();
5 pairs are currently active: ETH/STRK, ETH/USDC, wBTC/ETH, wBTC/STRK, wBTC/USDC. All prices use 18-decimal fixed-point representation.
Shielded Swap
The shielded swap router executes privacy-preserving AMM swaps via Ekubo. Your swap is routed through the ShieldedSwapRouter contract using Ekubo's ILocker interface — the AMM only sees the router, not your address.
const result = await obelysk.swap.execute({
tokenIn: 'eth',
tokenOut: 'usdc',
amountIn: '0.5',
slippageBps: 50, // 0.5% slippage tolerance
});
console.log('Received:', result.amountOut, 'USDC');
console.log('Tx:', result.transactionHash);
A 30bps (0.3%) protocol fee is applied to each shielded swap, deducted from the output amount before re-deposit. This is in addition to any Ekubo AMM fees.
Prover Staking
SAGE holders can stake tokens to back the GPU prover network. Stakers earn 15% APY and select a GPU tier that determines their minimum stake and reward multiplier.
GPU Tiers
| Tier | Min Stake | Multiplier | Hardware |
|---|---|---|---|
| Consumer | 1,000 SAGE | 1.0x | RTX 3060, RTX 4060 |
| Professional | 10,000 SAGE | 1.5x | RTX 4090, A5000 |
| DataCenter | 50,000 SAGE | 2.0x | A100, L40 |
| H100 | 200,000 SAGE | 3.0x | H100, H200, B200 |
Your effective reward rate = Base APY (15%) × Tier Multiplier. An H100 staker earns 15% × 3.0 = 45% effective APY. Rewards accrue per-block and can be claimed at any time.
Stake SAGE
await obelysk.staking.stake({
amount: '10000',
tier: 'Professional',
});
Check Staking Position
const position = await obelysk.staking.getStake('0xYOUR_ADDRESS');
console.log('Staked:', position.amount, 'SAGE');
console.log('Tier:', position.tier);
console.log('Active:', position.isActive);
console.log('Success count:', position.successCount);
console.log('Fail count:', position.failCount);
Unstake (Cooldown)
// Start the cooldown period
await obelysk.staking.requestUnstake({ amount: '5000' });
// After cooldown period expires, complete the unstake
await obelysk.staking.completeUnstake();
Claim Rewards
await obelysk.staking.claimRewards();
Network Stats
const totalStaked = await obelysk.staking.getTotalStaked();
const totalSlashed = await obelysk.staking.getTotalSlashed();
const config = await obelysk.staking.getConfig();
console.log('Network staked:', totalStaked, 'SAGE');
console.log('Cooldown period:', config.cooldownPeriod, 'blocks');
console.log('Slash rate:', config.slashPercent, '%');
GPU provers that submit invalid proofs or fail to respond in time are slashed. The slash percentage is configurable on-chain. Slashed SAGE is burned.
Next Steps
- Privacy Features — deposits, stealth payments, confidential transfers
- VM31 UTXO Vault — UTXO-based privacy with denomination splitting
- Deployed Contracts — all mainnet contract addresses