Announcing BlockSplit.app

Anomit Ghosh
BlockVigil
Published in
3 min readJun 11, 2019

Since the launch of our API gateway and development platform, ThunderVigil on the ThunderCore network, we decided to take it upon ourselves to showcase the ease of building an application for blockchain using all the features of our API gateway, EthVigil, specifically designed for the Ethereum protocol.

Enter BlockSplit.app . It is a powerful way to record and settle expenses shared among flatmates, colleagues and friends, but with a difference.

  • The proof of every record and settlement exists on the Ethereum chain. BlockVigil does not own any of the data that users submit on the chain.
  • We designed the smart contract that holds the business logic of recording expenses and settlements.
  • Transactions that write to the BlockSplit smart contract are routed through EthVigil REST API calls over HTTP. We also hooked up webhook processors on the backend, websocket clients on the frontend and email processors powered by the API gateway’s robust, antifragile monitoring solutions.

A closer look at the architecture

  • All interactions between the application layer and the API gateway happen over REST HTTP(S).
  • The BlockSplit smart contract is designed to be as stateless as possible. Which means only the bare minimum information is written to the contract storage to save on gas costs. Instead, the inputs to the transactions called on the smart contract hold the necessary information to recreate the state of the application.
  • The transactions are sent out through EthVigil’s transaction ordering and dispatching service that ensures setting of correct gas estimate, gas price, nonce on the raw transaction data. It also ensures stuck transactions are resubmitted with revised estimates, among other features.
  • These stateless transactions generate Ethereum event logs which are pushed to a listener service that is a part of the application layer and holds the business logic responsible for making sense of these updates. It acts as a webhook to which the API gateway dispatches the relevant updates.
  • The event logs and associated transactions are also pushed as updates via websockets to the browser where the user gets a real time experience of the submitted transactions being mined, included in a new block and the resultant update being refreshed on the front end. The websocket dispatcher is a part of our API gateway solution as well.
  • The stateless transaction data is captured and then persisted in a relational and graph database. The relational database holds basic metadata integral to maintaining user accounts, submitted expenses, group subscriptions etc. while the graph database specifically holds the debt graph between the users. This is entirely business-dependent logic, which at the end of the day is powered by the EthVigil API gateway.

We will be open sourcing BlockSplit pretty soon after going through a few iterations of feedback from a group of early users. With that, we hope to demonstrate the ease of building a complex application at scale with the integrity required to run on top of a decentralized, distributed platform such as Ethereum.

Currently, BlockSplit is in private alpha. If you wish to speed up our development iterations and subsequent public release, please do sign up on the invitation form below. By answering less than five questions, you will help us get focused insights into this specific use case.

--

--