Demo, Testing & Limitations
This page walks through end-to-end validation of the USSD-RSK bridge using the Africa's Talking sandbox simulator, raw curl commands, and on-chain verification via the Roostock Testnet Explorer. It also documents the current known limitations of the proof-of-concept and recommended improvements required before any production deployment.
Live Demo Overview
The following demo shows the complete USSD flow running against the deployed InclusiveDeFi contract on Roostock Testnet. A user on a feature phone dials a shortcode, navigates the text menu, and triggers real blockchain transactions without a smartphone or internet connection.
Main Menu
When a user dials the shortcode (e.g., *384#), the relay server responds with the main menu. The phone number is echoed back to confirm the active session.
Balance Check
Selecting option 1 triggers a read call to getBalance(wallet.address) on the Roostock node. No transaction is broadcast and no gas is consumed. The result is returned immediately and the session ends.
P2P Transfer Flow
Selecting option 2 opens a three-round collection flow. The user enters the recipient address in round 2 and the amount in round 3. The relay server signs and broadcasts the transaction on round 4.
Micro-Loan
Selecting option 3 immediately calls applyForLoan(). If the address has no existing active loan, the contract credits 0.01 tRBTC to its internal balance and emits a LoanIssued event.
On-Chain Transaction Confirmation
Every write operation (transfer, loan) produces a transaction that can be verified on the Rootstock Testnet Explorer. The screenshot below shows a confirmed applyForLoan transaction.
Testing Without a Phone Using curl
You can simulate the full USSD session lifecycle against your local relay server using curl. This allows you to test all branches of the state machine without the Africa's Talking gateway or a physical device.
Ensure your relay server is running (npm run start-bridge) before executing these commands.
Main Menu
curl -X POST http://localhost:3000/ussd \
-d "text=&phoneNumber=%2B2348012345678&sessionId=test001"
Expected response:
CON Rootstock DeFi (+2348012345678)
1. My Balance
2. Send Money (P2P)
3. Request Micro-Loan
Balance Check
curl -X POST http://localhost:3000/ussd \
-d "text=1&phoneNumber=%2B2348012345678&sessionId=test001"
Expected response:
END Your Balance: 0.01 tRBTC