Building an offline ussd algorand wallet

Dear Algonauts,

My name is Celestino, I am on Algorand trying to build a couple of applications. I hail from Nairobi, Kenya in East Africa. One of the application’s requirements is that it is able to work offline, and send transactions offline or at least with the most minimum bandwidth of internet, or no internet at all. It leverages what we call USSD technology, it is an old telecommunications service that is really popular south of the Sahara, this is because it is very simple to use and still enables one to access normally online services but in an offline manner.

Since I am building an application for users south of the Sahara, it is hard to imagine not implementing USSD technology, especially for my dapp’s MVP. Of course as it scales, we can have a mobile app for it, but again an Android app that has offline mode.

So, that said, let me get straight to the matter. So, due to this app’s USSD requirement, I met with a couple of members in the Algorand Community and Foundation, whereby I shared with them the need for a USSD offline Algorand Wallet. With this USSD offline wallet, developers in Africa would easily and cheaply build dapps on Algorand that solve problems in their communities. Actually, one of the popular dapps on Algorand from Africa mostly uses USSD for their solution, they go by the name of FlexFinTx, you probably heard of them. However, their USSD component is not open-source and reproducible for Algorand developers, and Algorand developers would actually have to build their own.

Even so, if we built our own Algorand USSD offline wallet, it is a challenge to decentralization. In fact, someone asked me, “How would you run a blockchain node on a feature phone?” So, just yesterday an idea came to me of how it would happen.

zk-Snarks is the solution. So here it goes, we should have an open-source USSD wallet connected to an Algorand node via zk-Snarks. This would enable these light clients i.e feature phones, to sync with the Algorand Network without having to run full nodes. I wonder if this is a viable mechanism on Algorand, I would love your feedback.

It could be a Layer-1 solution or a Layer-2 solution, not so sure about this. However, I checked several blockchains out there, and one of them ingeniously syncs small devices like mobile phones using zk-Snarks. I would love if I could hear from Algorand Researchers if this is possible on Algorand, and on developers on how it could be achieved in the most cost-effective way.

Creating a USSD offline wallet would be really beneficial to the Algorand community and technology, by making Algorand accessible to day-to-day Africans, growing the community, and making Algorand get used to architect real-world solutions.

I had earlier shared my reasons and other research material on the Algorand Discord, and I also have google docs showcasing the impact of enabling USSD technology to work on Algorand(actually any blockchain). Basically, anyone would have offline and secure access to making transactions on Algorand and still access Defi, send money and do everything without internet, just pressing buttons on his/her 10$ feature phone. Thank you.

Sincerely,
Celestino Kariuki

Have you seen www.a-wallet.net ? the source code is here: GitHub - scholtz/wallet

The wallet data is stored in your browser database in mobile or desktop device. I believe that it complies with what you call the USSD… It is stored offline until you turn on the internet. If you turn on the internet you can do the transactions, or make the app calls or whatever you want…

Btw, you can receive transactions any time … even when your wallet is offline… you just have to share your account address with one you want to receive the transaction… You can print out the account address qr code, or you can prepare the transaction qr code for an asset (USDT) for example…

It is a good idea to propose a wallet that would work on feature phones.

To my knowledge, no Algorand wallet actually is a node. Instead, they use an external node service that they trust. zk-SNARK and compact certificates may be used to reduce this trust. But since current wallets are ok with this, I think it would be simpler to use the same model for an USSD wallet.

Using zk-SNARK will most likely definitely much more complex for the phone than just using an external node.

Note that if your phone is offline, it cannot read the blockchain nor post any transaction. (It can possibly sign an IOU and transfer it to someone else, but this is a different story - this can easily be partially handled with smart contracts, knowing that such IOU may not be successfully settled as without online access to blockchain, you cannot prevent double spending - blockchain is exactly what prevents double spending!)

And if your phone is online, using an external node is much less demanding than using zk-SNARK.

Do you know if any blockchain has USSD wallets?