Protocol Mechanics & Economic Model
How payment locks work mathematically, cryptographically, and economically on Stellar (Soroban). Zero custodial risk, deterministic release schedules, and transparent state transitions.
The Lock State Machine
Every lock in Kinlock begins in the Open state and follows a strictly defined,
immutable lifecycle. Money can only take two exit paths: forward to the snapshotted payout address,
or backward to the sender.
unlock_at timestamps.unlock_at ≤ now < expires_at). When all tranches are released, the lock is fully closed.expires_at, or the verified payee is Revoked / Suspended past a 14-day grace period. The sender reclaims 100% of the remaining balance.Worked Economic Example: $1,200 Tuition Schedule
To understand how Kinlock operates in real financial scenarios, consider a diaspora parent sending tuition to a secondary school in Nairobi, Kenya:
- Total Tuition: $1,200 USDC (represented as
12,000,000,000base units, 7 decimals). - Tranche Schedule: Split into 3 equal term payments of $400 USDC:
- Tranche 1 ($400): Unlocks immediately on Day 1 (Term 1 fees).
- Tranche 2 ($400): Unlocks at Day 90 (Term 2 fees).
- Tranche 3 ($400): Unlocks at Day 180 (Term 3 fees).
- Expiration: Set to Day 210 (30 days after the final tranche unlock).
- Protocol Fees: $0.00 (0%). Kinlock is completely non-extractive; no protocol fees are deducted.
- Network Gas Fees: Paid in XLM on Stellar (~0.00001 XLM per transaction, < $0.0001 USD total).
If the student transfers schools after Term 1, the school releases Tranche 1 ($400) and declines the rest. The remaining $800 USDC immediately returns to the parent's wallet—with zero dispute friction or intermediary delays.
Client-Side Cryptographic Privacy
Public blockchains are pseudonymous, but financial references (e.g. invoice numbers, student IDs) are sensitive personal data. Kinlock solves this through a zero-knowledge link fragment pattern:
ref_hash = sha256(reference || salt). Only this 32-byte hash is sent to the contract./claim/42#r=INV-2026-01&s=a1b2c3d4....Soroban State TTL & Safety Margins
Soroban ledger storage entries expire unless periodically renewed. To guarantee safety:
- Maximum Duration: Set to 149 days (ADR-0020) so that lock duration + 30-day TTL grace fits safely inside the network's maximum entry TTL.
- Permissionless Bumping: Any party can call
bump_lock(lock_id)to extend a lock's TTL before expiration.