Sandbox Testing & Certification
Purpose: Validate integration correctness, stress-test edge cases, and certify the partner for production before any real funds flow.
1. Testing Environment
Ratio provides a dedicated sandbox environment on Kaia testnet that mirrors production behaviour. The sandbox includes simulated oracle feeds, mock pool balances, and configurable test scenarios.
2. Certification Test Cases
Partners must pass all mandatory test cases before production activation. Test cases are partner-type-specific:
| Test Category | Description | Applies To |
|---|---|---|
| Happy Path — Full Cycle | End-to-end: quote → execute → settle → confirm for each enabled corridor | On/Off-Ramp, Distribution |
| Quote Expiry Handling | Attempt execution on expired quote; verify rejection and re-quote flow | On/Off-Ramp, Distribution |
| State Engine Scenarios | Test behaviour under NORMAL, PROTECT, and RESTRICT states | On/Off-Ramp, Distribution |
| Volume Limit Enforcement | Exceed daily/monthly limits; verify graceful rejection | All |
| LP Deposit Routing | Verify correct pool allocation (Reserve for Class A, Reserve+Yield for Class B) | LP, Issuer |
| kToken Issuance | Verify correct kXXX-fx or kXXX-full tokens minted and received | LP, Issuer |
| Withdrawal Cooldown | Attempt withdrawal before cooldown expiry; verify rejection with unlock date | LP, Issuer |
| RFQ Quote-Response | Submit RFQ; verify quote within SLA; execute or reject | RFQ Counterparty |
| Webhook Delivery | Verify all callbacks received, HMAC signature validated, idempotent handling | All with webhooks |
| Error & Rollback | Simulate settlement failure; verify rollback signal via Communication Layer | On/Off-Ramp |
| Auth Failure | Invalid API key, expired token, wrong Partner ID — verify clean 401/403 responses | All |
| Reconciliation Match | Daily reconciliation of stablecoin-in vs. fiat-out; zero discrepancy target | On/Off-Ramp |
3. SLA Validation
During sandbox testing, the following SLA targets must be demonstrated:
| SLA Metric | On-Ramp Target | Off-Ramp Target | Measurement |
|---|---|---|---|
| Fiat → Stablecoin Conversion | < 30 minutes | N/A | Time from fiat receipt to stablecoin delivery |
| Stablecoin → Fiat Payout | N/A | < 60 minutes (T+0) | Time from stablecoin receipt to fiat credit |
| API Uptime | 99.5% | 99.5% | Monthly uptime measured by Ratio monitoring |
| Quote Response Time | < 2 seconds | < 2 seconds | P95 latency for /v1/quote and /v1/rfq |
| RFQ Response Time | N/A | N/A | < 60 seconds during operational hours |
Estimated Duration: 1–3 weeks