This article will describe how to verify OKX's ownership and balance of the wallet address through OKX's reserve snapshot file and open source reserve verification tool.
Preparations before verification
1. Download the verification tool, double-click to decompress the downloaded zip file.
The file contains the following two tools:
VerifyAddress - To verify ownership of reserves address. CheckBalance - To verify reserves address balance (Note: rpc.json needs to be configured, in order to configure node RPC or OKLink open API and other related information.)
2. Download Proof of Reserves File
3. Store the downloaded Proof of Reserves and verification tool in the same folder
4. If you need to verify the ownership of reserves address, please refer to the [Verify OKX's Ownership of Wallet Reserves Address via verification tools] chapter for operation; If you need to verify the balance of reserves address, please refer to the [Verification of Wallet Reserves Address Balance] chapter for operation
Supporting cryptos for verification
Cryptos
|
Network
|
BTC
|
BITCOIN
|
ETH
|
Ethereum
|
ETH
|
Arbitrum
|
ETH
|
Optimism
|
USDT
|
Ethereum
|
USDT
|
Tron
|
USDT
|
Polygon
|
USDT
|
Avalanche
|
USDT
|
Arbitrum
|
USDT
|
Optimism
|
1. Verify OKX's Ownership of Wallet Reserves Address
- Multi-signature adopts 2/3 signature, and each piece of data contains two signatures, which are signed by two private keys among the three private keys held by OKX. By verifying the two signatures, it can be ensured that OKX has at least two of the private keys, thus proving that OKX has ownership of the multi-signature address.
- The BTC single-signature address passed message and signature results can prove OKX's ownership of the address.
-
-
Passed message and signature results can prove OKX's ownership of the address.
-
You can confirm the ownership of the reserves address published by OKX through the open source tools provided by OKX or third-party tools.
1.1 Verify OKX's Ownership of Wallet Reserves Address via verification tools
Step 1: Open the terminal program
- Mac system: Terminal
- Windows system: Command Prompt
Step 2: Run the command and locate to the directory of the downloaded folder, in our case, enter the command cd ~/Downloads/proof-of-reserves
Step 3: Enter the following command in terminal(The file name can be replaced with another file that needs to be validated)
Mac
./VerifyAddress --por_csv_filename=okx_por_20221122.csv
Windows
VerifyAddress.exe --por_csv_filename=okx_por_20221122.csv
Step 4:If the verification is passed, the terminal will return "Verify address signature end, all address passed"(shown in picture below)
1.2 Verify OKX's Ownership of Wallet Reserves Address via third-party tool
For the following addresses, you can use third-party tools to verify OKX's ownership of these addresses.
- BTC single-signature address - BTC signature verification tool
- EVM address - ETH signature verification tool
- TRX chain address - TRX chain signature verification tool
Taking the BTC single-signature address as an example
Step 1: download and open Proof of Reserves file
Step 2: copy a record from the file, including address, message, and signature (shown as below)
Step 3: Go to BTC signature verification tool website, paste the Address, Message, and Signature
Step 4: If the verification is passed, the result will be shown as below:
2. Verify the balance of OKX Wallet Reserves Address
You can verify by the following steps:
1. Compare the address balance of a specific crypto chain at the snapshot height time with the address balance in the snapshot file published by OKX to verify whether they are consistent.
2. Compare the sum of address balances of a specific crypto chain at the snapshot height time with the sum of address balances in the snapshot file published by OKX to verify whether they are consistent.
When querying the address balance at the height of the snapshot, you can configure node rpc for balance query, or configure OKLink's open API for balance query.
2.1 Verify BTC specified address balance and total balance
Step 1: Install the Bitcoin Core client, synchronize to the latest height, and then roll back the block to the height of the OKX snapshot
-
You can download Bitcoin Core here:https://bitcoincore.org/en/download/ ,Please download version 0.21 or version after 0.21
-
You need to edit the configuration file of Bitcoin Core,in order to visit RPC node。Create ~/.bitcoin/bitcoin.conf file and open it with an editor or run the command of
vi ~/.bitcoin/bitcoin.conf
,edit
server=1
rpcuser=OKX
rpcpassword=OKXWallet
-
Enter the bin directory,run
./bitcoind
command,and start the node
-
Wait for the node to synchronize to the latest height, it will take about 12 hours
-
After synchronizing to the latest height, you need to roll back the node to the OKX snapshot height to query the balance of the snapshot height. The steps are as follows:
-
Go to the BTC browser to query the block hash of the next height of the snapshot height, copy this block hash and fill in the hash value part of the command below.
-
Run
./bitcoin-cli invalidateblock
00000000000000000005829017993a7a21e4b7c731c95b9cb979c01294a7bd27
command(Note : ‘00000000000000000005829017993a7a21e4b7c731c95b9cb979c01294a7bd27’ - This parameter is the hash value of the next block at the height of the BTC block in the Proof of reserves file that you downloaded. This is just an example. You need to query the hash value based on the BTC block height in the downloaded Proof of reserves file.)
-
- Wait for the node to roll back to the snapshot height, you can run
./bitcoin-cli getblockcount
command to check whether the rollback is complete, you can also view the node output log judgment, as shown in the figure below
Step 2:Configure the parameters
- Open rpc.json file
- Configure btc-related RPC parameters in the rpc.json file and save the file, as shown in the figure below
Step 3:Use the tool CheckBalance to verify whether the balance of the on-chain address is consistent with the balance shown in the snapshot file
Verification Steps
1: Open the terminal program
- Mac system: Terminal
- Windows system: Command Prompt
2: Run the command and locate to the directory of the downloaded folder, in our case, enter the command cd ~/Downloads/proof-of-reserves
Verify the balance of a single address
1)Enter the following command on the terminal, as shown below(The address and file name can be replaced with other addresses and files that need to be validated)
Mac
./CheckBalance --mode="single_address" --coin_name="btc" --address="3A1JRKqfGGxoq2qSHLv85u4zn935VR9ToL" --por_csv_filename=okx_por_20221122.csv
Windows
CheckBalance.exe --mode="single_address" --coin_name="btc" --address="3A1JRKqfGGxoq2qSHLv85u4zn935VR9ToL" --por_csv_filename=okx_por_20221122.csv
2)According to the returned result, the balance of a single address is shown as below
3)Compare the OKX balance published in the file and returned result, it is consistent
Verify the balance of all addresses
1)Enter the following command on the terminal, as shown below(The file name can be replaced with another file that needs to be validated)
Mac
./CheckBalance --mode="single_coin_total_balance" --coin_name="btc" --por_csv_filename=okx_por_20221122.csv
Windows
CheckBalance.exe --mode="single_coin_total_balance" --coin_name="btc" --por_csv_filename=okx_por_20221122.csv
2)According to the returned result, the balance of all addresses is shown as below
3)Compare the OKX balance published in the file and returned result, it is consistent
2.2 Verify ETH / USDT specified address balance and total balance
OKX has published the addresses on the ethereum, optimism, arbitrum, polygon, avalanche and other chains that it owns and the balance of related assets (ETH or USDT). You can use open source tools to verify the balance of related addresses.
You can choose to use the official default RPC, third-party rpc or OKLink API for verification
1. Use the default rpc without modifying rpc.json, you can directly go to the verification step
2. Use third-party node rpc (such as: Infura, Alchemy) - please see the appendix
3. Use OKLink's API for verification - please see the appendix
Use the tool CheckBalance to verify whether the balance on the on-chain address is consistent with the balance shown in the snapshot file
Verification steps
Step 1: Open the terminal program
- Mac system: Terminal
- Windows system: Command Prompt
Step 2: Run the command and locate to the directory of the downloaded folder, in our case, enter the command cd ~/Downloads/proof-of-reserves
Verify a single address balance:
1: Suppose you want to verify whether the balance of the ETH address 0xc5451b523d5fffe1351337a221688a62806ad91a at the specified height is consistent with the balance displayed in the snapshot file(E.g. okx_por_20221122.csv), you need to execute the following command on the terminal
Mac
./CheckBalance --mode="single_address" --coin_name="eth" --address="0xc5451b523d5fffe1351337a221688a62806ad91a" --por_csv_filename=okx_por_20221122.csv
Windows
CheckBalance.exe --mode="single_address" --coin_name="eth" --address="0xc5451b523d5fffe1351337a221688a62806ad91a" --por_csv_filename=okx_por_20221122.csv
Note: If you query other currencies, you need to replace coin_name and address
2. According to the returned result, the balance of the query address of ETH at the specified height is shown as below:
3. Compare the proof of reserves published by OKX and the output results, the balance of the address and the balance in the proof of reserves, can see that they are consistent, which can prove the balance of this address that OKX has at the time of the snapshot.
Verify the sum of all address balances of certain crypto
1. Suppose you want to verify whether the balance of all ETH addresses at the specified height is consistent with the balance shown in the snapshot file(E.g. okx_por_20221122.csv), you need to execute the following command on the terminal:
Mac
./CheckBalance --mode="single_coin_total_balance" --coin_name="eth" --por_csv_filename=okx_por_20221122.csv
Windows
CheckBalance.exe --mode="single_coin_total_balance" --coin_name="eth" --por_csv_filename=okx_por_20221122.csv
Note: If you want to query other cryptos, you need to replace coin_name, and the following values are supported:
BTC,ETH,ETH-ARBITRUM,ETH-OPTIMISM,USDT-ERC20,USDT-TRC20,USDT-POLY,USDT-AVAXC,USDT-ARBITRUM,USDT-OPTIMISM
2. According to the returned result, the total balance of all addresses of ETH at the specified height is shown as below:
3. Compare the proof of reserves published by OKX and the output results, the balance of all addresses and the balance in the proof of reserves are consistent, which can prove the sum of balances that OKX has at the time of the snapshot.
Appendix
Use third-party node RPC (eg: Infura, Alchemy)
Configure the rpc parameters of each chain archive node in the rpc.json file, as shown in the following figure:
- Install the archive node manually. It may take some time to synchronize, reference: https://geth.ethereum.org/docs/install-and-build/installing-geth
- Use third-party nodes: Infura、Alchemy
OKLink API balance verification
Configure parameters related to OKLink open API in the rpc.json file, as shown in the figure below
OKLink is a blockchain big data company that provides an open interface to query the address balance of a specified height in the blockchain. You can also obtain the public API from OKLink to verify the address balance published by OKX.