Inspiration
Sending money or paying at a local shop via UPI or scanning a QR code is second nature to most of us. Having a similar system for sending crypto would go a long way in enhancing the acceptance of cryptocurrency in our day-to-day life.
Merchants who want to support multiple payment methods find it very difficult to manage the unique QR codes generated by the different apps. Because of this, they end up sticking to only one particular payment method.
We need an app that provides a simple platform for easy crypto payment without generating unnecessary QR codes.
What it does
Crypto Payment is an Open Sourced app that enables crypto to be a part of day-to-day transactions. Users can transfer crypto either via entering the UPI Id or scanning a QR Code.
How I built it
- The base of the app is built using the Flutter framework. The smart contracts are built, tested, and deployed to the Mumbai Testnet, using hardhat.
- Alchemy provides the RPC endpoints needed for connecting with the blockchain and interacting with it, both for Hardhat and the Flutter App.
- I have also used Chainlink’s data feed to fetch the price of different cryptocurrencies. This is used to calculate how much crypto is to be sent, for a specific amount of entered fiat value.
- For sending notifications AWS SNS is used. When a new installation of the app is detected upon login, the device token is used to register it as an endpoint to receive notifications. The resultant ARN is stored in a MongoDB collection. Lambda functions are used to trigger the notifications. The lambda functions themselves are triggered using API Gateways. I have created REST APIs that can be called directly from the flutter app and the message to be sent as the notification is passed. The APIs are protected with API keys to prevent unauthorized access.
Challenges I ran into
- The primary challenge in building this application was the lack of documentation around building Dapps in form of mobile applications. Most documentation and tutorials are focused on building web applications, or mobile applications with direct access to the private key.
- Due to limited time and resources, I was not able to build all the features I have initially planned, however, I wish to continue the development process.
- Designing the system architecture was an important challenge to overcome especially with respect to user account management. I am using a hybrid architecture for my app to have the core functionalities to be decentralized, whereas the notification system is managed by a centralized architecture.
- An important missing part of the project is the ability to settle the payment directly to the recipient's bank account. To achieve this, there is a need for a centralized exchange. In my limited search, I was not able to find an exchange that provided the required API endpoints and facilities needed.
- Another important challenge with building a payment application is to make sure it's compliant with the laws and regulations of the land. I am exploring this domain to understand the compliance requirements and whether there is any modification needed in the app's architecture.
Accomplishments that I am proud of
Despite the challenges, I am able to build a Flutter app that can connect with any non-custodial wallet and can be used to send crypto by scanning QR codes or entering UPI Id. Due to the lack of documentation, I have also started a tutorial series with the hope to encourage new developers to build more such applications.
What we learned
Some of the interesting things that I have learned during this hackathon are:
- Time Management: Working on a tight time frame has helped me develop my time management skills.
- Flutter: Before this hackathon, I had little to no knowledge about Flutter development. However, now I have learned a lot of technicalities associated with building apps using the Flutter framework.
- Exploring core libraries: Because of the lack of proper documentation, I had to explore some of the core dart libraries to find the correct way of building a flutter application that can connect with wallets like metamask.
- Working of Centralised Exchanges: While exploring ways to enable direct settlement of payment in Bank accounts, I got the chance to explore the working of various centralized exchanges.
What's next for Crypto Payment
Through this hackathon, I hope to connect with like-minded people with similar interests. I am also looking for any possible scope of partnering with CEX that can help with converting Crypto to Fiat and help settle payments directly to the bank.
Finally, I wish to launch the app for the public good while keeping the app source code open-sourced so that the community can help it grow.
Built With
- amazon-web-services
- dart
- flutter
- hardhat
- javascript
- lambda-functions
- solidity
Log in or sign up for Devpost to join the conversation.