Inspiration

Existing businesses will want to take advantage of cryptographic security in order to save money on billing systems that use complex safeguards to prevent human error. Blockchains make value transfer simple, but adopting new technology is not easy. Although businesses already have the data they use to invoice customers, they lack the technical expertise to do so via the blockchain. AnyRate is designed to make it easy for businesses to bill users without the headaches and overhead of legacy billing infrastructure, or the growing pains of implementing new technology by hand.

In addition to security, blockchain-based billing provides transparency and peace-of-mind to customers because the exact terms of their agreement will always be publicly-accessible on the blockchain. Automated billing can be less expensive and more secure than current processing & banking systems, and it is totally transparent.

What it does

Businesses can use the app to create easily create and deploy smart contracts that will bill customers according to their custom parameters. Businesses can also manage their on-chain treasury through the app.

Customers can see their usage statistics for a business that they're a customer of. They manage their payment account through the blockchain, depositing and withdrawing as though using any checking account. They can think of their AnyRate account as an isolated checking account which they've given a service special permission to withdraw from, without exposing any of their other private banking information.

AnyRate Admin can charge the Business a fee for its service and also help Business bill their customers.

This comprehensive system have the following interfaces:

  1. Business - Create Billing Form
  2. Business - Treasury Management
  3. Customer
  4. AnyRate Admin

How we built it

We created a mock API server that simulates the billing information that a business has (e.g. usage customer usage and costs). We then used Chainlink's AnyApi to call this API and put the information on-chain.

Using the factory pattern, we create a new Billing smart contract for each of the client and its different set of billing parameters. A new Treasury smart contract, generated from the TreasuryFactory.sol is also created for each business to manage their treasury.

Challenges we ran into

Originally we wanted to take advantage Acala network to take advantage of the low transaction fee, but we had to give up midway as we found out that AnyAPI, a central part of our project, isn't supported there.

Accomplishments that we're proud of

It is our first time using Chainlink, and we feel that we have got a good grasp of Chainlink's AnyAPI through this project.

We also made extensive use of the factory pattern (twice!) to deploy smart contracts on chain.

Lastly, all this is accomplished by 2 people who met for the first time during this hackathon, with only a few months of smart contracts development experience and hackathons, and live in VERY different time zones!

What we learned

  • A good working knowledge of Chainlink
  • Deploying to Acala and experience with Polkadot for the first time

What's next for AnyRate

If we had more time, we could:

  • extend the Chainlink jobs to include cronjobs as initiators so that the Billing can be done regularly (e.g. at the end of every month)

Built With

Share this project:

Updates