Skip to content

allinbits/cosmos-cash-poc

Repository files navigation

Cosmos-Cash

What is Cosmos Cash

Cosmos Cash is a research project that aims to develop a protocol that provides features typical of electronic money, adopting the blockchain technology as underlying infrastructure, and thus leading to a digital asset to be applied within the payment industry.

Please read the full report for more information.


What's in this repository

This repository hosts a Cosmos Cash proof-of-concept application built on Cosmos SDK that stores data in a key/value store and is secured using a Proof Of Authority consensus algorithm.

The goal of the application is to re-define how an electric money institution works by leveraging the Cosmos SDK and Tendermint.

How to install the application


  1. Clone the repository
git clone git@github.com:allinbits/cosmos-cash-poc.git

  1. Install the binaries (poad, poacli)
cd cosmos-cash-poc
make install

  1. Ensure binaries are available and for testing purposes set the keyring to be test
poad -h
poacli -h
poacli config keyring-backend test

How to initialize the application


  1. Initialize the genesis file ($HOME/.poad/config/genesis.json)
poad init --chain-id=cash cash

  1. Create a key for the first validator
poacli keys add validator

  1. Add the validator that was created in the step 2 as the first validator and assign them 1000000000 cash coins
poad add-genesis-account $(poacli keys show validator -a) 1000000000cash,1000000000stake

  1. Generate a initial CreateValidator transaction to allow other applications in the network to sync when they join
poad gentx --name validator --keyring-backend test

  1. Put the previously generated transaction in the correct location to allow the application to start correctly
poad collect-gentxs

  1. Start the applicaton 🎉
poad start

  1. Run commands outlined in the Makefile
cat Makefile | grep create-

How to run a localnet


  1. Build the dockerfile
docker build -t 388991194029.dkr.ecr.us-east-1.amazonaws.com/allinbits-dev/cosmos-cash-poa .

  1. Run the localnet
make localnet-start

  1. Set up the consensus
make localnet-consensus

  1. Create issuer data
make localnet-distribute-tokens

  1. Create user data
make localnet-users

How to run the webui (run localnet commands for seed data)


  1. Go to the vue folder
cd vue

  1. Start the web server
yarn serve

  1. Check the website in the browser

localhost:8080