Inspiration

How do users without smartphones participate in the digital economy? Specifically, how do they send and receive digital assets (e.g. XRP or stablecoins based on xrpl) when they do not have smartphones which can handle keys? Armed with feature phones, the options available are SMS, USSD or use of paper-based wallets and trusted agents with smartphones.

We decided to start with an SMS implementation to prove the use case and decided to call it Mandla Money SMS Wallet. Mandla Money can be used to provide cheap and quick distribution of relief aid to disaster victims, distribution of social welfare and everyday transacting in communities that are otherwise excluded from the digital economy. It can even be used fro cross-border remittance using a XRP or a stablecoin.

Mandla is a name of African origin which means power, we believe our wallet gives power to the people. Mandla Money - Power to the people!

What it does

We have developed an SMS wallet that allows users in low-tech/low-resource environments to send and receive digital assets over SMS. In order to do so, we assume the role of a trusted custodian and make use of xrp tags to allow users to send assets to one another using their cellphone numbers as tags. Alternatively, instead of using a recipients cell number, they can make use of the recipients Mandla ID which is generated when they first register.

The format of an SMS sending a digital asset is send#asset#REPLACECELLNUMBER#value e.g. sending XRP 2 from one user to another would be send#zar#REPLACECELLNUMBER#2.

The wallet has been tested with XRP (native asset), FOO (issued asset) and XAGO.ZAR (a ZAR stablecoin issued by xago.io in South Africa).

How we built it

We built the Mandla SMS wallet using a Django backend, xrpl-py SDK, Postgres DB and Twilio SDK for sending SMS's over the internet. Using Twilio, we can send, receive and parse SMS's from our Django backend server.

In order to detect new transactions, we implemented a scheduled task that calls a URL that polls the XRP ledger for new transactions using our custody address (https://testnet.xrpl.org/accounts/rBBFeyRk19orSKU8k9JhF1A7KcQgM1dqse/transactions), when new transactions are detected, they are imported into the application which trigger the relevant allocation based on the specified tag.

Further, in order to support issued assets, we had to create a trust line between our custody address and the relevant issuer address (e.g. rw4WrHbV63xEYGMkxAyuzpJoSXjtbGysvS for the FOO asset - https://xrpl.org/tx-sender.html).

The demo wallet is deployed on Heroku and can be accessed via SMS (send a "Hello Mandla" SMS to +27600178563

Challenges we ran into

Gracefully parsing failed transactions (e.g. with tecError message when running our transaction poller)

Correctly setting a trust line on both ends - from the issuer side and from the receiver side

Accomplishments that we're proud of

We are proud to have developed and deployed a wallet with the following capability:

  • The ability to send and receive XRP asset over SMS using a cell number or a system generated user ID (a Mandla ID)
  • The ability to send and receive the FOO asset (issued asset) over SMS
  • And ultimately the ability to send and receive the XAGO.ZAR (South African Rand stablecoin issued by xago.io - https://testnet.xrpl.org/accounts/rKLVzfiwLQPGjwd8m5t3b3qSSymwVF1g4z) in our wallet

What we learned

We learnt how to poll the xrpl ledger for transactions, create trust lines for sending and receiving issued assets (stablecoins) and how to read the different transaction error codes tecPAthDry etc.

What's next for Mandla Money SMS Wallet

Our current implementation shows what is possible over SMS for sending XRP and other issued assets. However, because there is a central custodian, the solution is not particularly secure. What is next is to store the secret keys using a key manager such as Amazon KMS. This helps avoid compromise of wallet keys if the backend server is compromised. In addition, we need to send one-time pins over SMS to add a layer of security for wallet users to avoid them being impersonated and give a sense of authentication. In addition, we would like to add a WhatsApp interface (WhatsApp wallet) and add in support for other stablecoins and CBDC's e.g. adding support for USD stablecoins will be relevant for countries that are using the USD to alleviate economic pressure e.g. Venezuela and Zimbabwe.

Share this project:

Updates