Often times, stores or banks will allow users to round their transactions up on purchases in order to give to a good cause (for example, a total of $6.84 might round up to $7.00, and the extra 16 cents will be donated to a charity). We wanted to be able to bring the same idea into the cryptocurrency space, particularly on Ark's platform.

What it does

Our application allows users to sign up for Ark wallets. When they create transactions, the amount is rounded up to the next 0.1 of an Ark, and the difference is sent to the public address of a charity of their choice (such as American Red Cross, Purple Heart, or Wounded Warriors). The application also keeps track of their addresses and balances, and normal transactional functionality is built in.

How I built it

We needed 3 main components to build this: a web interface for the wallet, a database to store our users, and the Ark api to handle transactions. For the web interface, we used normal HTML, CSS, and javascript to allow users to interact with their wallet. For the database, we decide to use Google's Firebase, since they have a clean javascript API. With Ark, we used two different javascript APIs, one for generating seeds and addresses for new users, and another for handling transactions and keeping track of balances.

Challenges I ran into

We ran into a few challenges with this application. First, getting set up with the Ark testnet was a bit difficult since my partner and I had not been added to Ark's official slack channel. We had to dig around online for a bit and use Ark's reddit to help get ourselves online, but once we got our testnet wallets set up it was pretty easy to use. Another challenge we ran into was importing Ark's APIs into our application, since we needed to get two distinct Ark javascript libraries working together properly to run the app correctly. We were able to overcome this by bundling and importing the libraries together, with particular attention to the order and dependencies.

Accomplishments that I'm proud of

We're very proud that we were able to develop an application that goes toward a good cause. Rounding up to the nearest 0.1 of an Ark is a small addition to a user's transactions, but if millions of people are doing it, it adds up to a significant amount of money in donations for these charities. We're also proud that we were able to combine these separate technologies and get them to work together to create a new application for Ark's platform.

What I learned

We learned a lot about how to use Ark's API, as well as Ark's general platform and technology. Because we wanted to integrate Ark into our application, we learned a lot about how Ark's testnet works, how their APIs work, how their transactions are structured, and about Ark's purpose in general. Most of our experience had been with other cryptocurrencies, so getting familiar with an entirely new currency was fun and exciting!

What's next for Char(k)ity

For the purposes of our demo, we created a static HTML application, but next steps would be to decouple the app into a functioning front and back end, with the back-end handling all of our users' sensitive data, and the front-end simply acting as an interface. Currently, Ark's APIs only support transactions with single outputs, so users must pay two transaction fees in order to give to charity. Once the API gets updated in the next core version, multiple output transactions will be supported, so we will change the structure of our application to put the normal recipient output and charity output in the same transaction, thereby saving on fees. Lastly, we would also consolidate users' Ark in a few wallets owned by the platform (similar to the way exchanges like Coinbase handle cryptocurrency), and simply update users' account balances, rather than issue each user their own unique address.

Share this project: