Centralized exchanges rely on trusting that their owners will take the proper security precautions. This has led to many incidents of stolen cryptocurrency adding up to billions of dollars worth of losses, and is a stark contrast to the decentralization of the rest of the space. On the other hand, decentralized exchanges have the potential to be much more secure: theoretically, users are not vulnerable to server downtime and hacks, and can retain anonymity.
We present N Chainz, a decentralized cryptocurrency exchange with a unique multi-chain architecture. We built N Chainz from the ground up, and included features such as block generation, limit orders, and the ability to trade a base token with another token. More details are included in our whitepaper.
go get -d github.com/rsenapps/nchainz
go install github.com/rsenapps/nchainz
(from project root):
nchainz COMMAND [ARGS]
createwallet
Create a wallet with a pair of keysgetbalance ADDRESS SYMBOL
Get the balance for an addressprintaddresses
Print all adddreses in wallet file
order BUY_AMT BUY_SYMBOL SELL_AMT SELL_SYMBOL ADDRESS
Create an ORDER transactiontransfer AMT SYMBOL FROM TO
Create a TRANSFER transactionfreeze AMT SYMBOL FROM UNFREEZE_BLOCK
Create a FREEZE tokens transactioncancel SYMBOL ORDER_ID
Create a CANCEL_ORDER transactionclaim AMT SYMBOL ADDRESS
Create a CLAIM_FUNDS transactioncreate SYMBOL SUPPLY DECIMALS ADDRESS
Create a CREATE_TOKEN transaction
node HOSTNAME:PORT
Start up a full node providing your hostname on the given portprintchain DB SYMBOL
Prints all the blocks in the blockchainwebserver PORT
Run a webserver on the given port
The GNU Affero General Public License (see LICENSE)