Worked Example — 3 LPs, 3 Days
1. Setup
Oracle Reference Rates: 1 USD = 15,000 IDR | 1 USD = 4.7 MYR
LP Deposits
| LP | Class | Currency | Deposit | USD Value | Multiplier | kToken |
|---|---|---|---|---|---|---|
| LP-USD | B (Full) | USDT | 2,000 USD | 2,000 | 1.0× | kUSD-full |
| LP-IDR | A (Issuer) | IDRX | 90M IDR | 6,000 | 0.5× | kIDR-fx |
| LP-MYR | B (Full) | MYRC | 4,700 MYR | 1,000 | 1.0× | kMYR-full |
Protocol Parameters
| Parameter | Value |
|---|---|
| KF_SHARE_PCT | 50% |
| TXN_LP_SHARE_PCT | 30% |
| GLOBAL_LP_SHARE_PCT | 20% |
| LP-IDR (IDRX Issuer) ClassA Multiplier | 0.5× |
| OFFRAMP_FEE_BIPS | 20 bips |
Fee Tier Applied (USD-IDR, Day 1 & 3)
Day 1 and Day 3 are USD → IDR swaps. The transaction amounts determine which fee tier applies. See Volume-Tiered Fee Schedule for the full tier table.
For this example, the swaps generate the following gross profits after tier-based fees and spread are applied:
Starting equities: LP-USD = 2,000 | LP-IDR = 6,000 | LP-MYR = 1,000. KF kUSD = 0.
2. Day 1: USD → IDR, Gross Profit = +300 USD
Step 1 — Classify LPs: Transaction LPs (corridor pools): LP-USD, LP-IDR. Global LPs (non-corridor pools): LP-MYR.
Step 2 — Apply Configurable Split:
| Bucket | Calculation | kUSD |
|---|---|---|
| KF (Treasury) | 300 × 50% | 150.00 |
| Transaction LP | 300 × 30% | 90.00 |
| Global LP | 300 × 20% | 60.00 |
Step 3 — Distribute Transaction Bucket (90 kUSD):
Effective weight calculation with Class A/B multipliers:
| LP | Eff. Weight | Calculation | kUSD Received |
|---|---|---|---|
| LP-USD (B, 1.0×) | 2,000 | 90 × 2000/5000 | 36.00 |
| LP-IDR (A, 0.5×) | 3,000 | 90 × 3000/5000 | 54.00 |
Total effective weight = 5,000.
Step 4 — Distribute Global Bucket (60 kUSD):
Only LP-MYR eligible (sole non-corridor pool) → receives 60.00 kUSD.
Step 5 — WAOP Recording:
Swap recorded to Rebalancing Batch #101 (USDT-IDRX). WAOP = 15,000 IDR/USD.
Day 1 Summary
| Party | kUSD Earned | Cumulative | Updated Equity |
|---|---|---|---|
| LP-USD | 36.00 | 36.00 | 2,036.00 |
| LP-IDR | 54.00 | 54.00 | 6,054.00 |
| LP-MYR | 60.00 | 60.00 | 1,060.00 |
| KF | 150.00 | 150.00 | — |
3. Day 2: MYR → IDR, Gross Profit = +200 USD
Classification: Transaction LPs: LP-MYR, LP-IDR | Global LPs: LP-USD
Split: KF = 100 kUSD | Transaction = 60 kUSD | Global = 40 kUSD
Transaction Bucket (60 kUSD):
| LP | Eff. Weight | Calculation | kUSD |
|---|---|---|---|
| LP-MYR (B, 1.0×) | 1,060 | 60 × 1060/4087 | 15.56 |
| LP-IDR (A, 0.5×) | 3,027 | 60 × 3027/4087 | 44.44 |
Global Bucket (40 kUSD): Only LP-USD eligible → receives 40.00 kUSD.
Day 2 Summary
| Party | Day 2 kUSD | Cumulative | Updated Equity |
|---|---|---|---|
| LP-USD | 40.00 | 76.00 | 2,076.00 |
| LP-IDR | 44.44 | 98.44 | 6,098.44 |
| LP-MYR | 15.56 | 75.56 | 1,075.56 |
| KF | 100.00 | 250.00 | — |
4. Day 3: USD → IDR, Net Result = −80 USD (LOSS)
No profit distribution. KF absorbs the loss:
KF burn = 80 kUSD → KF balance: 250 − 80 = 170 kUSD.
All LP equities remain unchanged. No LP is affected.
5. Rebalancing Batch Close
Batch #101 (USDT-IDRX) is closed. Reserve Pool executes external sale of accumulated IDRX inventory at 15,050 IDR/USD via OTC partner.
WAOP for the batch = 15,000 (weighted average of Day 1 and Day 3 swaps).
Rebalancing_PnL = Volume × (15,000 − 15,050) = Loss
The rebalancing COGS is absorbed by KF, further reducing the KF balance.
3-Day Cumulative Summary
| Party | Total kUSD Earned | Final Equity | % of LP Pool |
|---|---|---|---|
| LP-USD (B) | 76.00 | 2,076.00 | 22.5% |
| LP-IDR (A) | 98.44 | 6,098.44 | 66.1% |
| LP-MYR (B) | 75.56 | 1,075.56 | 11.4% |
| KF | 170.00 (net) | — | — |
| Total Distributed | 420.00 | — | 100% |
6. Fee Tier Worked Example — Single Swap Breakdown
To illustrate how the tiered fee schedule affects a specific transaction:
Scenario: Retail user swaps $5,000 USDT → IDRX via On-Ramp partner. Oracle rate: 15,800 IDR/USD.
Step 1 — Tier Resolution
| Tier | Min | Max | Match? |
|---|---|---|---|
| MICRO | $10 | $1,000 | No ($5,000 > $1,000) |
| SMALL | $1,000 | $10,000 | Yes ($1,000 ≤ $5,000 < $10,000) |
| MEDIUM | $10,000 | $50,000 | — |
Resolved tier: SMALL → Fixed: 10,000 IDR | Variable: 5 bips | Base Spread: 20 bps
Step 2 — Platform Fee
Fixed Fee (IDR → USD) = 10,000 ÷ 15,800 = $0.633
Variable Fee = $5,000 × 0.0005 = $2.500
Total Platform Fee = $0.633 + $2.500 = $3.133
Amount to Convert = $5,000 − $3.133 = $4,996.867
Step 3 — Spread & Conversion
Base Spread (from SMALL tier) = 20 bps
Volatility Add-on (real-time) = 2 bps
Liquidity Add-on (pool depth) = 1 bps
Inventory Skew (Active Pool) = 0 bps (balanced pool)
Total Spread = 23 bps
Client Rate = 15,800 × (1 − 0.0023) = 15,763.66 IDR/USD
Amount Out = $4,996.867 × 15,763.66 = 78,769,234 IDR
Step 4 — Profit Calculation
Amount at Oracle Rate = $4,996.867 × 15,800 = 78,950,499 IDR
Amount at Client Rate = $4,996.867 × 15,763.66 = 78,769,234 IDR
Spread Profit = 78,950,499 − 78,769,234 = 181,265 IDR ≈ $11.47
Total Swap Profit = Platform Fee ($3.133) + Spread Profit ($11.47) = $14.60
Step 5 — Distribution (50/30/20)
| Recipient | Share | Amount |
|---|---|---|
| KF Treasury | 50% | $7.30 |
| Transaction LP (USD + IDR) | 30% | $4.38 |
| Global Fee Pool (MYR + SGD) | 20% | $2.92 |
7. LP Reward Realisation Examples
OffRamp Withdrawal
LP-MYR wants to cash out accumulated 75.56 kUSD rewards:
| Step | Value |
|---|---|
| kUSD to withdraw | 75.56 kUSD |
| OffRamp fee (20 bips) | 75.56 × 0.0020 = 0.15 USD |
| LP receives (USDT) | 75.41 USDT |
| Protocol revenue | 0.15 USD → Protocol Treasury |
FX Engine Conversion
LP-USD wants to convert 76.00 kUSD rewards into IDRX via the FX Engine:
| Step | Value |
|---|---|
| kUSD to convert | 76.00 kUSD |
| Swap: kUSD → IDRX via FX Engine | Treated as standard USD→IDR swap |
| Fee tier resolved | MICRO ($10–$1,000): Fixed 10,000 IDR + 0.10% variable |
| Total fees | ~$0.71 (fixed $0.63 + variable $0.08) + spread |
| Fee split (50/30/20) | KF: ~$0.50 | Txn LPs: ~$0.30 | Global: ~$0.20 |
| LP receives | ~1,197,000 IDRX (at client rate) |
This secondary swap generates new revenue that feeds back into the distribution system, creating the flywheel effect. Note that the kUSD conversion uses the same tiered fee schedule — in this case hitting the MICRO tier due to the small amount.