APPC Explorer

The explorer for the ERC20 APPC token

Status: Active
Client: Aptoide

APPC Explorer website screenshot

EC2, Nginx

Data layer
External webservices

Business logic
Blockchain explorer

API layer / MVC
Angular app

Aptoide team, Bootstrap CSS

« Previous
World league

Next »

Full story

What is AppCoins?

AppCoins is an open and distributed protocol for App Stores using blockchain technology and smart contracts. AppCoin tokens (“APPC Tokens”) are ERC-20 compatible tokens distributed on the Ethereum blockchain pursuant to a related ERC-20 smart contract.

AppCoins is meant for use in the AppCoins blockchain platform to perform transactions in the app store ecosystem.

appcoin diagram
Image from the Appcoins whitepaper

The problem

Ethereum technology has a few constraints, like the processing time, which creates some friction in the user experience. To minimize friction, the team decided to implement a layer 2 payment channel.

The solution

After researching different Ethereum layer 2 technologies, the team chose to fork Micro-raiden’s smart contracts to become the base of the payment channel.

What is a blockchain payment channel?

If two parties (app store and end-user, for instance) foresee that they will do several transactions together, they can leverage the trust of the blockchain without the need of using the distributed ledger to keep track of every transaction.

In a payment channel, the user “deposits” a fixed amount (e.g. 10 APPC) that will remain locked into this payment channel and every time the user wants to pay for something she can use part of that balance, sending a “proof” with the updated balance of the payment channel.

Those transactions are done off-chain and don’t encounter the time and fee limitations of the Ethereum network.

A new problem arises

However, by itself, this solution breaks the assumption that developers should be able to validate the interactions between users and their apps without the need to trust any third party because these transactions are done off-chain, i.e. outside the Blockchain.

Merkle trees

In order to solve this issue, the team started consolidating these off-chain transactions in the Blockchain and have them verifiable by developers. Periodically, for each developer’s wallet, the team gathers all the transactions and compute a Merkle Tree.

Merkle Trees are a nice and affordable way of representing large portions of data and providing a proof that someone holds that data. Once a Merkle Tree is computed for a given developer’s wallet, its root hash is sent to the Blockchain coupled with the developer’s wallet.

If the developer wants to validate the transactions they have in his wallet, the developer can either ask the API for all the transactions and compute the Merkle Tree himself. In addition, he can store the transactions himself and use them to compute the Merkle Tree. Then, he can validate that the root hash sent by our system to the Blockchain is correctly computed.

Blockchain explorer

But for developers to be able to verify this off-chain transactions, there's a missing piece in the puzzle, a Blockchain explorer. While everyone can use the API to ask for all the transactions, it would be nice to have a nice interface (a website) where one could check all the transactions.

That's why the team decided to build and deploy, with an intuitive and powerful interface where one can query transactions, wallets, blocks, stores and OEMs.

And that was the part where I came in to help. The website is a Angular 6 web app, querying the API, where all the heavy lifting is done (great work guys!).

The big challenge was to design and implement a merkle tree navigator.

I'm very proud of being part of this. We are shaping the future.

« Previous
World league

Next »