Difference between revisions of "How-to list on an Exchange"

From Veriblock Wiki
Jump to: navigation, search
Line 238: Line 238:
  
 
Running an exchange requires standard operations that must be automated, including creating addresses, tracking incoming coins, and sending coins.
 
Running an exchange requires standard operations that must be automated, including creating addresses, tracking incoming coins, and sending coins.
 +
 +
=== HTTP API Examples ===
 +
Most often, an exchange will call the http api using their preferred language.
 +
 +
[[NodeCore_HTTP_API]]
 +
 +
Most exchanges will either:
 +
 +
# Call SendCoins directly -> very easy: [[NodeCore_HTTP_API#sendcoins]]
 +
# Create a signed transaction and submit to the network -> here is an end-to-end example of calling the http api: https://github.com/VeriBlock/nodecore-js/blob/master/packages/core/example/2_create_and_submit.js
 +
 +
=== GRPC Examples ===
  
 
The following repo demonstrates calling such functions in C#:
 
The following repo demonstrates calling such functions in C#:

Revision as of 22:55, 4 November 2021

See: Main_Page

Overview

VeriBlock is a decentralized blockchain and any exchange can list the coin.

CoinMarketCap provides a list of common exchanges:

https://coinmarketcap.com/rankings/exchanges/

An unofficial list of exchanges that VBK is listed on can be found here:

https://coinmarketcap.com/currencies/veriblock/#markets


Standard Information

Most exchanges will need basic information, usually collected in a form:

Details on MainNet launch: MainNet_Launch_Overview

Common Fields

Question Answer
Name of Coin VeriBlock
Coin trading symbol VBK
Project official website https://www.VeriBlock.org/
Logo for coin VBK Logo 1000.png
MainNet Launch date 25-Mar-19
Latest version of project whitepaper http://bit.ly/vbk-wp-pop (May 13, 2019)
Link to sourcecode https://github.com/VeriBlock
What country is the project based in? Cayman Islands
Official blockchain explorer https://explore.veriblock.org
CoinMarketCap link https://coinmarketcap.com/currencies/veriblock
Asset Type Coin
Is the token an ERC20? No
Is there a ledger or "rich list"? https://explore.veriblock.org/api/stats/ledger
Maximum Supply 2.1 Billion
Divisibility 8 Decimal Places (0.00000001 VBK)
Token Type Native blockchain
Forked from another coin? No, custom development
How many token holders do you have This changes, but can be seen from the rich list
Which industry does your project belong to Infrastructure utility coin for all industries

Descriptions

Question Answer
Short Description VeriBlock and its novel Proof-of-Proof (“PoP”) consensus protocol is the first and only technology in the world to allow any blockchain to inherit Bitcoin’s unprecedented thermodynamic Proof-of-Work security in an entirely Decentralized, Trustless, Transparent, and Permissionless (“DTTP”) manner.
Key Feature 1 Bitcoin-Level Double-Spend Protection: Transactions on VeriBlock-secured blockchains have the same security as transactions on Bitcoin itself.
Key Feature 2 Early Attack Detection: Early Attack Detection (EAD) metrics emitted by VeriBlock-secured blockchains describe the security of a particular transaction at any point in time.
Key Feature 3 Mobile/Lightweight ("CPU") Mining: Proof-of-Proof mining can be performed with minimal hardware requirements (a PoP miner could even run on a phone or Raspberry Pi).

Social Media

Site Url
Wiki https://wiki.veriblock.org
Twitter https://twitter.com/VeriBlock
Discord https://discord.gg/wJZEjry
Reddit https://www.reddit.com/r/VeriBlock
BTC Talk Announcement https://bitcointalk.org/index.php?topic=3133450.0

Technical Setup

More technical details can be found here: HowTo_Integrate_NodeCore_with_a_Service

The NodeCore daemon is the full-node software for the VeriBlock blockchain.


Run an instance of NodeCore

See: NodeCore QuickStart, NodeCore Operations

The hardware and software requirements to run NodeCore are here: NodeCore_Operations#Requirements

Connect to NodeCore

Test basic connection with the NodeCore CommandLine

An automated service will need to connect with the API, either via GRPC or HTTP (NodeCore_HTTP_API). Any command from the NC_CLI can be called via the API.

Configure NodeCore

Once NodeCore is running, you'll want to optimize it for the needs of an exchange, such as secure remote connections and lower peer count to increase stability. See #Securing NodeCore.

Configure NodeCore by updating the properties file (see: nodecore.properties) and restarting.

#NodeCore Configuration

#allow grpc connectivity via whitelisting
rpc.bind.address=0.0.0.0
rpc.whitelist.addresses=111.111.111.111,111.111.111.112

#limit the max peers
peer.max.count=12

#disable bootstrap peers
peer.bootstrap.enabled=false
peer.external.hosts=123.123.123.123\:7500,123.123.123.134\:7500

Use Offline Wallet

The NodeCore suite has an Offline Wallet CLI, which may be useful for exchanges: Offline Wallet CLI

This allows offline wallet functionality such as creating a new address, encrypting wallets, or creating (but not broadcasting) a transaction.

Securing NodeCore

There are multiple layers of security:

Security Feature Description See More
IP WhiteListing The client's IP must be whitelisted in order to connect to a remote node. NodeCore Networking
Wallet encryption A wallet file is encrypted. Encrypted wallets can be managed through gRPC commands or using the offline wallet CLI.. Wallet Encryption
Multisig addresses The wallet takes multiple signatures, so funds can remain safe despite a particular private key or wallet being compromised, if general multisig good-practices are followed. How to Submit Multisig Tx
Offline address creation A wallet can be created and managed without any network connectivity. https://github.com/VeriBlock/offline-wallet-cli
gRPC password (with TLS) The gRPC connection has a password, and the communication channel is encrypted. NodeCore_Networking#Passwords


Updating NodeCore

Occasionally, NC will need updating. The following instructions cover updating an instance of NodeCore running on a Linux machine. It assumes that you have already downloaded and unzipped/untarred the folder containing the new NodeCore software you want to migrate to.

See: NodeCore_Operations#Start to run NodeCore in a loop

#in NC_CLI, stop old NodeCore (downtime starts here):
stopnodecore

#on NodeCore box, move the mainnet folder with all the blockchain data:
mv /<path>/nodecore-0.4.X+1/bin/mainnet /<path>/nodecore-4.X+2/bin/mainnet
cd /<path>/nodecore-0.4.X+2/bin

#run the loop version (more robust):
./nodecore-loop

where ./nodecore-loop may be the file:

while true
do
    ./nodecore
    read -t 30
    echo Restarting NodeCore...
done

It is important to have a reasonable sleep/pause time (such as 30 seconds) to make it easy to stop the node (stopnodecore) gracefully without it automatically restarting.

Technical Integration

Running an exchange requires standard operations that must be automated, including creating addresses, tracking incoming coins, and sending coins.

HTTP API Examples

Most often, an exchange will call the http api using their preferred language.

NodeCore_HTTP_API

Most exchanges will either:

  1. Call SendCoins directly -> very easy: NodeCore_HTTP_API#sendcoins
  2. Create a signed transaction and submit to the network -> here is an end-to-end example of calling the http api: https://github.com/VeriBlock/nodecore-js/blob/master/packages/core/example/2_create_and_submit.js

GRPC Examples

The following repo demonstrates calling such functions in C#:

https://github.com/VeriBlock/VeriBlock.Demo.Rpc.Client

  1. GetInfo
  2. ValidateAddress
  3. GetBalance
  4. GetTransactionById
  5. GetNewAddress
  6. GetBlockByIndex
  7. GetBlockByHash
  8. SendTransaction

Java samples can be inferred from the GUI wallet: https://github.com/VeriBlock/nodecore-wallet-ui

Specifically this file: https://github.com/VeriBlock/nodecore-wallet-ui/blob/master/src/main/java/veriblock/wallet/core/NodeCoreGateway.java

The above file also shows how to automate encryption/decryption of wallets.

Community members have created python and node.js samples [DISCLAIMER: These are community contributions and may change]:

Examples

JavaScript to call http api for submitting a signed transaction to the network

Can call the API for sendcoins NodeCore_HTTP_API#sendcoins But an exchange may need to submit a signed transaction instead:

Here is a step-by-step explanation: https://github.com/VeriBlock/nodecore-js/tree/master/packages/core#examples

Here is a single-file end-to-end example: https://github.com/VeriBlock/nodecore-js/blob/master/packages/core/example/2_create_and_submit.js

Appendix

Other Links