Skip to content
koa web app providing liquidity for the PSF token
JavaScript Dockerfile Shell
Branch: master
Clone or download
Pull request Compare This branch is 155 commits ahead, 100 commits behind christroutner:master.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin fix(spot price): Added improved spot-price function Sep 2, 2019
config fix(bch-js): replaced slp-sdk with bch-js Sep 29, 2019
database Adding database dir Jan 10, 2019
docs Updating documentation Sep 30, 2019
mainnet Adjusting log levels for /testnet page Jan 13, 2019
src Updating documentation Sep 30, 2019
test fix(bch): refactored bch lib to use bch-js Sep 29, 2019
.editorconfig Add editor config Feb 11, 2016
.eslintrc.json babel removal complete Mar 6, 2018
.gitignore Adding mainnet and testnet wallets to gitignore Mar 22, 2019
.npmrc Adding package-lock.json Jan 13, 2019
.travis.yml Adding Greenkeeper fix to .travis.yaml Apr 5, 2019
LICENSE Updating README and Lincense Apr 8, 2019 Adding README to the docs folder Sep 2, 2019
docker-compose.yml Got docker containers to build and run successfully for both testnet … Jan 10, 2019
install-mongo Replacing files with non-babel equivalent Mar 6, 2018
package-lock.json fix(bch-js): replaced slp-sdk with bch-js Sep 29, 2019
package.json Updating documentation Sep 30, 2019
rebuild-image adding mainnet to docker-compose Jan 1, 2019
token-liquidity.js Renaming index.js to token-liquidity.js Sep 2, 2019


This is an application for providing token liquidity, inspired by the pricing algorithm in the Bancor Whitepaper. While Bancor uses ERC20 tokens, this application focuses on the Simple Leger Protocol for creating tokens on the BCH network.

The idea is simple: This program has its own BCH public address. If you send BCH to the address, the program will send you tokens. If you send tokens to that address, the program will send you BCH. The app functions as an automated market-maker, providing perfect liquidity for the token. The exchange rate is determined by the price formula.

The price formula used in this program was inspired by the Bancor whitepaper, but those equations were ultimately thrown out and similar equations created. Experiments are preserved here in the spreadsheet, and a whitepaper will be created to explain the new equations in detail. Skip to the log-price-test sheet to see the final curve and breakdown that I settled on.


Build Status

Coverage Status




You can’t perform that action at this time.