Conversation
|
@jayzalani is attempting to deploy a commit to the IOV Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
@owans can you review this submission for hacktivator idea no. 68 |
|
This documentation offers a guide for integrating USSD with Rootstock DeFi, covering architecture, implementation, and testing. The overall clarity is good, and the step-by-step instructions are generally easy to follow. The technical depth is appropriate for the target audience of developers. However, several areas can benefit from editorial improvements, primarily concerning consistency in formatting (especially code blocks), minor grammatical fixes, and adherence to the specified style guide. Some phrasing can be tightened for better clarity and conciseness. The review will cover each file individually, pointing out specific issues and offering clear recommendations to improve the documentation's quality and user experience. Review: docs/02-developers/09-use-cases/ussd-rootstock-defi/category.ymlClarity and readability: Recommendation:
Review: docs/02-developers/09-use-cases/ussd-rootstock-defi/architecture.mdThis document provides an overview of the system's architecture and data flow. It explains complex concepts clearly and uses a logical structure. Grammar and language:
Clarity and readability:
Recommendations:
Review: docs/02-developers/09-use-cases/ussd-rootstock-defi/demo-and-testing.mdThis page offers a practical guide to testing the USSD-RSK bridge. The demo overview is clear, and the curl commands are helpful. The "Known Limitations" section is useful. Grammar and language:
Clarity and readability:
Recommendations:
Review: docs/02-developers/09-use-cases/ussd-rootstock-defi/ImplementationThis page provides a detailed step-by-step implementation guide. The structure is logical, and the code snippets are well-placed. Grammar and language:
Clarity and readability:
Recommendations:
Review: docs/02-developers/09-use-cases/ussd-rootstock-defi/overview.mdThis file serves as a good introduction to the USSD-Rootstock DeFi concept. It clearly articulates the "why" and "who" before diving into the "what." Grammar and language:
Clarity and readability:
Recommendations:
Review: docs/02-developers/09-use-cases/ussd-rootstock-defi/project-setup.mdThis page guides users through setting up the project and deploying the smart contract. The steps are clear and well-ordered. Grammar and language:
Clarity and readability:
Recommendations:
Review: docs/02-developers/09-use-cases/ussd-rootstock-defi/relay-server.mdThis page details the relay server implementation and its integration with Africa's Talking. The breakdown of the USSD state machine is helpful. Grammar and language:
Clarity and readability:
Recommendations:
Review: docs/02-developers/09-use-cases/index.mdThis is an index file that uses Docusaurus's Consistency:
Recommendations:
💬 Comment posted via Revue - Documentation Review Tool |
| description: Understand the complete USSD session lifecycle, relay server architecture, and how the RSK JSON-RPC layer connects feature phone interactions to on-chain smart contract execution. | ||
| --- | ||
|
|
||
| # Architecture & Data Flow |
There was a problem hiding this comment.
Please remove H1s as the meta title already displays the title of the page
|
|
||
| USSD responses must begin with either `CON` (continue 🡢 show next menu) or `END` (terminate the session and display a final message). No other prefixes are valid. | ||
|
|
||
| ### 3. Ethers.js + RSK JSON-RPC |
There was a problem hiding this comment.
| ### 3. Ethers.js + RSK JSON-RPC | |
| ### 3. Ethers.js + Rootstock JSON-RPC |
|
|
||
| ### 3. Ethers.js + RSK JSON-RPC | ||
|
|
||
| The relay server connects to the RSK network using a standard JSON-RPC provider pointed at the RSK public node: |
There was a problem hiding this comment.
Please update to use the Rootstock RPC API: https://dev.rootstock.io/developers/rpc-api/rootstock/
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
thank you for reviewing this, will update these changes. |
|
Hi @owans, I’ve pushed a new commit addressing the review feedback. I also removed the Implementation file that I had accidentally included earlier it was only for my personal understanding during development. |
Noted @jayzalani |
|
|
||
| The ngrok inspector at `http://localhost:4040` will show you every raw HTTP POST from Africa's Talking and every response your server returns. This is essential for debugging unexpected session terminations or malformed responses. | ||
|
|
||
| --- |
|
|
||
| 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. | ||
|
|
||
| --- |
| title: Demo, Testing & Limitations | ||
| tags: [rsk, rootstock, developers, defi, ussd] | ||
| description: Validate the USSD-RSK bridge end-to-end using the Africa's Talking simulator and curl. Verify on-chain transactions via the Rootstock Testnet Explorer and understand current limitations. | ||
| --- |
| description: Learn how to build internet-free decentralized financial services on Rootstock using USSD, enabling P2P transfers and micro-loans on feature phones without internet access. | ||
| --- | ||
|
|
||
| # USSD-Based Decentralized Finance on Rootstock |
There was a problem hiding this comment.
| # USSD-Based Decentralized Finance on Rootstock |
docs/02-developers/09-use-cases/ussd-rootstock-defi/overview.md
Outdated
Show resolved
Hide resolved
docs/02-developers/09-use-cases/ussd-rootstock-defi/relay-server.md
Outdated
Show resolved
Hide resolved
docs/02-developers/09-use-cases/ussd-rootstock-defi/relay-server.md
Outdated
Show resolved
Hide resolved
|
|
||
| Start the relay server with: | ||
| ```bash | ||
| npm run start-bridge |
There was a problem hiding this comment.
npm run start-bridge
npm error Missing script: "start-bridge"
npm error
npm error To see a list of scripts, run:
npm error npm run
npm error A complete log of this run can be found in: /Users/owanate/.npm/_logs/2026-03-06T15_48_31_189Z-debug-0.log
owanate@Owanates-MacBook-Pro ussd %
There was a problem hiding this comment.
Add a note to ensure to add the start-bridge script command in package.json as earlier instructed
There was a problem hiding this comment.
ussd % npm run start-bridge
ussd@1.0.0 start-bridge
tsx index.ts
[dotenv@17.3.1] injecting env (2) from .env -- tip: 🔐 prevent building .env in docker: https://dotenvx.com/prebuild
RSK-USSD Bridge running on port 3000
/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/utils/errors.ts:698
error = new Error(message);
^
Error: network does not support ENS (operation="getEnsAddress", info={ "network": { "chainId": "31", "name": "unknown" } }, code=UNSUPPORTED_OPERATION, version=6.16.0)
at makeError (/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/utils/errors.ts:698:21)
at assert (/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/utils/errors.ts:719:25)
at EnsResolver.getEnsAddress (/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/providers/ens-resolver.ts:545:9)
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async EnsResolver.#getResolver (/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/providers/ens-resolver.ts:552:25)
at async EnsResolver.fromName (/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/providers/ens-resolver.ts:590:26)
at async JsonRpcProvider.getResolver (/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/providers/abstract-provider.ts:1193:16)
at async JsonRpcProvider.resolveName (/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/providers/abstract-provider.ts:1203:26)
at async Wallet.resolveName (/Users/owanate/Documents/Rootstock/hacktivator/ussd/node_modules/ethers/src.ts/providers/abstract-signer.ts:246:16) {
code: 'UNSUPPORTED_OPERATION',
operation: 'getEnsAddress',
info: { network: Network {} },
shortMessage: 'network does not support ENS'
}
Node.js v24.13.0
There was a problem hiding this comment.
Hi, I have made note of the missing start-bridge script and added it to the package.json section as instructed.
To resolve the second error (ENS issue), please note that you have to first deploy the smart contract using:
npx hardhat ignition deploy --network rskTestnet ignition/modules/InclusiveDeFi.ts
Then copy the deployed contract address from the output and replace YOUR_DEPLOYED_CONTRACT_ADDRESS in index.ts with your actual 0x... address before running npm run start-bridge.
The ENS error occurs because ethers.js sees the placeholder text instead of a real address and tries to resolve it as an ENS name, which Rootstock does not support.
| Copy the `https://` URL and register it as your USSD callback in the next step. Note that on the ngrok free tier, the URL changes each time you restart ngrok. | ||
|
|
||
| ## Registering with Africa's Talking | ||
|
|
There was a problem hiding this comment.
Briefly explain why the use of Africa's Talking
| ]}> | ||
| <FilterItem | ||
| value="ussd" | ||
| title="USSD-Based Decentralized Finance System on Rootstock" |
There was a problem hiding this comment.
Kindly update the title here as well
RSK-Rootstock Co-authored-by: Owanate Amachree <amachreeowanate@gmail.com>
Overview_changes Co-authored-by: Owanate Amachree <amachreeowanate@gmail.com>
Resolved common changes Co-authored-by: Owanate Amachree <amachreeowanate@gmail.com>
|
@owans Hi, I’ve made the requested updates and pushed the latest changes to the PR. When you have time, could you please take another look? Thanks a lot! |
owans
left a comment
There was a problem hiding this comment.
LGTM!
Dear @jai,
Congratulations, I'm pleased to inform you that your pull request for the USSD-Based Decentralized Finance System on Rootstock has been approved and merged into the Docs.
You will receive the follow up message from the team.
Thank you for your valuable contribution to the Rootstock ecosystem!
Title
Docs: Add USSD-Based Decentralized Finance on Rootstock
Description
Purpose: Add documentation for a USSD-based Rootstock integration that enables decentralized financial services on feature phones without internet access or a smartphone.
Context: No existing documentation covers connecting the Rootstock stack to telecom USSD gateways. This contribution fills that gap with a working proof-of-concept covering smart contract design, an off-chain relay server, and Africa's Talking gateway integration. The system allows users on basic GSM phones to perform P2P transfers and request micro-loans directly on the Rootstock network.
Changes:
overview.md- Problem statement, system architecture diagram, deployed contract details, and page navigationarchitecture.md- USSD session lifecycle, relay server state machine, component breakdown, gas/fee model, and security considerationsproject-setup.md- Hardhat 3 scaffolding,InclusiveDeFi.solcontract, Rootstock Testnet network config, and Ignition deployment stepsrelay-server.md- Express relay server, session guard for duplicate transaction prevention, fire-and-forget transaction pattern, granular error handling, and Africa's Talking USSD channel setupdemo-and-testing.md- End-to-end demo with screenshots, curl test commands for all USSD flows, Hardhat unit test commands, and on-chain verification via Rootstock Testnet ExplorerScreenshots/GIFs
Screenshots are included in
relay and server.mdand indemo-and-testing.mdcovering the full USSD flow:Testing
Verification: Ran
yarn buildlocally across all locales (en, es, ja, ko). Build completed successfully with no errors. Ranyarn check-links:externalacross 9054 links. 7 broken external links found: 5 are auto-generated self-referencing GitHub links that will resolve after merge, 2 are pre-existing repo issues (rsksmart/bridge/releases,gateway-arbitrum.network) unrelated to this contribution. Zero new broken links introduced.Output:
Quality Checklist
rBTC(not Smart Bitcoin) andRootstock(not RSK).Refs