Inspiration
We won the last Metabuild and have since developed Toolblox (then named VOOG) further. While conducting interviews with companies on their willingness to use blockchain we found accounting to be a particular concern. We also talked to accountants who seemed wary (scared) of crypto-native companies and doing taxes for them. Additionally, we found that DAOs suffer from lack of proper reporting with uncounted cashflows from unknown addresses.
So, we decided to try to bring the two worlds - Web3 and traditional accounting - closer to each other and a new standalone product called Ada (Autonomous decentralized accountant) was born.
What it does
- Deploys a custom smart contract for the user to keep track of invoices and their status (processed/not processed). This contract will also hold funds for paying Ada for processing each invoice (it's up to the user to top it up when needed).
- Creates an address book (.vcf file list), encrypts it and uploads to Web3.Storage. This address book will be used to fill contact, payment and tax details on the generated invoice PDF.
- Fetches a recent FX rate to add a sum in fiat (USD) to the invoice.
- Sends out the Invoice to buyer, seller and/or custom e-mail address.
- Provides a dashboard for users to check statistics, charts and conduct reporting (monthly invoices, invoices by counterparty etc)
How we built it

- Front-end was implemented as a PWA (progressive web application). This means that all code runs on the user browser. In theory the app can be easily enhanced to bypass Ada backend and connect to other processors instead (who provide different functionality or offer jurisdiction specific services) to further enhance decentralization.
- Invoice events are fetched from the Near Blockchain using a custom built Near Lake Indexer client.
- Automation is handled using Azure Functions written in Node.js and C# and take advantage of various Azure features (Queus, Storage, Blobs, Key Vault). Functions written in Node.js use the Near Js API to communicate with the invoice workflow contract and the oracle (priceoracle.testnet).
- Emailing is handled using SendGrid and PDF generation itself is using the WebKit engine.
- ARC-1 specification: we propose a new ARC-1 standard which specifies that contracts who wish to use invoice processors need to emit a specific event with the following details: from/to/amount/currency/article.
- NBitcoin library was used for encryption and decryption of the address book. The idea is that while Blockchain is transparent and open, there are still personal details which should not be stored openly. This is the sequence of operations:
- Ada generates in the browser a Mnemonic (secret key phrase) which the client needs to store offline and confirm with random word out of the Mnemonic. Mnemonic will be stored in browser local storage.
- User sets a password. Password will be used together with the Mnemonic to encrypt/decrypt.
- Ada creates in the browser a new key pair (address book master key), encrypts the address book (list of .vcf files) with it and uploads the encrypted file to Web3.Storage
- Ada encrypts the address book master file with user public key to generate an Access Key file and uploads to Web3.Storage.
- User can optionally give Ada server-side access to the address book. For this, Ada creates a new key pair on the server side, stores the private key in Azure Key Vault and sends the user the public key. Public key will be used to encrypt the address book master key to create a new Access Key file which also will be uploaded to IPFS. The private key will only be used transiently during function execution (when generating PDF).
- At the end of this setup procedure: Web3.Storage will contain 3 files - encrypted address book, access key file for user and access key file for Ada; browser will have the mnemonic; user knows the password and the mnemonic; Ada holds its private key in Azure Key Vault.
- To create the invoice workflow smart contract we use Toolblox API which allows to clone an existing workflow (template flow) with custom details. We then deploy it using standard Near JS API.
- The workflow can be opened from within Toolblox to add custom workflow steps if needed. For example the user could add a step called "Confirmation Needed" if it is required by the company's internal rules etc.
- While Ada is a separate product it lives in symbiosis with Toolblox: Toolblox will use Ada for invoicing purposes and Ada uses Toolblox smart contract builder to create invoice workflows. At the same time anyone else could use Ada for invoicing or anyone else could use Toolblox API to create workflows on blockchain. In that sense they are separate products.
- While their architecture is similar (both Blazor PWA apps), code is shared minimally. Ada CSS is based on Toolblox for unified look and feel and some controls - which were also developed during the hackathon - such as grid, checkbox and multiselect are shared. They also share some js code - also refactored during the hackathon - to deploy a smart contract to Near. For all intents and purposes Ada is a separate product with its own codebase and own monetization scheme, planned and developed during the hackathon period.
Challenges we ran into
Initial challenge was to find out what really is the desired output for accountants. For this we interviewed an accounting company and determined that Ada needs to provide three things: invoices, consolidated reporting and value of each transaction in fiat.
Next challenge was to incorporate all of the different technologies into an offering which would feel lightweight and easy to use. The back-end consists of many different technologies and a queue-based approach with asynchronous processing but (also thanks to Near blockchain) still processes one incoming invoice in a few seconds.
Accomplishments that we're proud of
Figuring out the PKI for storing the address book.
- We created an approach which encrypts and stores the address book only once and allows to add "access rights" for many parties. This avoids address book duplication and allows for a flexible approach where users could give access rights to different processors.
- Implemented the Mnemonic-based approach (secret recovery phrase) to be in line with industry standard (Metamask, Near wallet etc).
- All this means that the address book can be stored on public decentralized storage without being afraid of exposing too many details
What we learned
We learned that there are many Web3-native apps and many Web2-native SaaS apps but there is little in-between. Bridging this cap is the key to fulfilling a mission of bringing the value of blockchain to every person and company on the planet.
What's next for Ada
- Validate assumptions with accountants and Web3 developers and adapt the main flow if needed
- Develop new features (such as matching invoices with payment receipts) and integrations (such as Zapier)
- Create content (videos, tutorials) to educate users
- Help to bring out new web3 native solutions that support the ARC-1 standard
Built With
- azure
- blazor
- c#
- functions
- nbitcoin
- near
- node.js
- sendgrid
- toolblox
- typescript
- web3.storage
- webkit



Log in or sign up for Devpost to join the conversation.