Course: How to use Gate.io Proof of Reserves to verify your asset's security

Intermediate12/19/2023, 2:44:04 PM
Gate officially announced that it had upgraded its PoR through zero-knowledge proof technology, allowing users to enjoy better privacy protection and data security. It became one of the first exchanges in the industry to adopt zero-knowledge proof PoR. This article will guide you on how to use Gate's Proof-of-Reserve to verify the security of your funds on Gate.io.
https://gimg.gateimg.com/learn/38e3abd1c6d3013a54a3a3eb9331525f8c1e80b6.jpg

Gate.io is a leading crypto exchange with over 13 million users and 1,700+ trading pairs. As one of the oldest and largest trading platforms in the world, Gate.io strictly adheres to industry regulations and does not participate in any market manipulations. Openness, transparency, equality, and collaboration have always been our mission. We adopt a variety of centralized and decentralized methods to ensure the security of users’ assets.

As early as May 2020, Gate was the first to propose exchange proof-of-reserve (PoR) and invited the well-known American auditing firm Armanino LLP to audit its assets. It is one of the earliest exchanges in the industry to propose reserve proof. On November 23, 2023, Gate officially announced that it had upgraded its PoR through zero-knowledge proof technology, allowing users to enjoy better privacy protection and data security. It became one of the first exchanges in the industry to adopt zero-knowledge proof PoR. This article will guide you on how to use Gate’s Proof-of-Reserve to verify the security of your funds on Gate.io.

Background

What is Proof-of-Reserve?

In centralized exchanges (CEX), the assets of each user are recorded in the platform’s database ledger, making it difficult for users to confirm whether their assets have been transferred and whether the exchange has sufficient assets to cover the assets deposited by users. Therefore, exchanges need a method to prove that they have enough reserve assets to fully redeem users’ funds, which requires the value of the exchange’s reserve assets to be higher than the value of the assets deposited by users. This proof of publicly available assets is called Proof-of-Reserve. The related data to Proof-of-Reserve is the reserve ratio, which is the ratio of the exchange’s held assets to the user’s deposited assets multiplied by 100%. When the reserve ratio is greater than 100%, the exchange’s assets can meet the normal withdrawal needs of users. The higher the reserve ratio, the stronger the ability to resist liquidity risks.

The reserve ratio is generally divided into exchange reserve ratio and single currency reserve ratio. The exchange reserve ratio refers to the ratio of the overall assets of the exchange to the total user deposits multiplied by 100%. The single currency reserve ratio refers to the ratio of the number of a specific currency held in the exchange wallet to the amount of that currency deposited by users multiplied by 100%.

To learn more, please _click How zk-SNARK Improves Gate.io Proof of Reserves._

What is Zero-Knowledge Proof?

Zero-Knowledge Proof (ZKP) is an encryption method that allows one party (known as the prover) to prove to another party (known as the verifier) that a certain statement is true without revealing any additional information that would disclose the basis of the proof. This process not only protects the privacy of the prover but also ensures that the verifier cannot replicate the proof process or obtain any additional information from it.

To understand this technology, let’s consider a simple example: User A knows the phone number of User B. When User C asks User A if they know User B’s phone number, User A can prove that they indeed possess the phone number by dialing B’s number on the spot, without revealing it to User C. This process preserves the privacy of the user while still providing the answer, and it is what we refer to as “zero-knowledge proof.”

To learn more, please click A Detailed Explanation of Zero-Knowledge Proofs.

Combining Zero-Knowledge Proofs with Proof-of-Reserves

zk-SNARK is a succinct, non-interactive zero-knowledge proof technology. It performs a “trusted setup” in advance to generate a Common Reference String (CRS), which allows all provers to access it directly. This is similar to a scoring system in an exam, where zk-SNARK directly uploads the correct answers and allows the examinees to check their answers (by sending their solutions to the backend system, which will provide the final result of correctness). It is highly efficient.

Merkle Tree is a data structure similar to a “tree.” The data at the lowest layer are called “leaf nodes,” and the data in the middle can be called “intermediate nodes.” The values of the intermediate nodes are calculated by hashing the values of the two child nodes (any input value is processed in a specific way to produce a specific value). The intermediate nodes on the left and right are then hashed to obtain a unique output value for the higher-level intermediate node. After processing at each level, a unique root node (Root) of the Merkle Tree is obtained.

Gate.io combines zk-SNARK technology with Merkle Tree to place all user deposits into the Merkle Tree. Then, zk-SNARK is used to prove that all balances in the tree are non-negative (i.e., the exchange has not forged any accounts to interfere with the output of the Merkle Tree). Finally, the Merkle Tree is generated, and the relevant node hashes and root hash are made public for user verification.

Operation Tutorial

Frontend UI Interface

Click on the link or go to the Gate.io website and scroll to the bottom. Click on the 100% Proof of Reserves button to access the Gate Reserves frontend page.

Basic Reserve Information

After entering the Gate.io Proof-of-Reserves frontend page, users can directly view the latest update time of the reserve. In the example below, the most recent audit was conducted on November 10, 2023, using Markle Tree + zk-SNARKs as the auditing method. Users have deposited approximately 2.77 billion USD worth of assets, and the assets held in the Gate wallet exceed the user deposits by 434 million USD, totaling 3.206 billion USD. The overall reserve ratio is 115.69%.

Single Cryptocurrency Reserve Ratio

Scrolling down the page will show the specific amounts and reserve ratios for different cryptocurrencies. Taking the first crypto, BTC, as an example, as of December 8, 2023, users have deposited 13.85K BTC, while the Gate wallet holds 17.10K BTC, resulting in a reserve ratio of 123.52% for BTC.

Click on the page icon in the lower right corner of the image to view the reserve ratio of up to 112 tokens on Gate. Click on the “Verify now” button in the image to display the verification tutorial. By following the tutorial, you can verify if your account balance is included in the calculation, thus confirming that the reserve ratio reflects the results with your funds properly accounted for.

Other Frontend Display Pages

There is another way to check the audit status of your assets, which is to go to the My Account page and navigate to the Audits section. Here, you can view your historical audit records and Gate’s comprehensive reserve situation.

Verification Process

1. Download Verification Program

Users can download the verification program through Github or the download link provided on the reserve page, and rename it as [main]:

User need to choose the corresponding system of their device for downloading.

2. Download Asset Verification Data

Enter the personal Audit page, find the batch that needs verification, and click on “Download Merkle Tree” and “Download User Config” respectively to download the data.

After downloading, you will have a compressed file named zkmerkle_cex_xxx.tar.gz. Put the main program (the verification program file mentioned earlier) into the folder, and place the user_config.json file into the config folder. Once everything is done, the file structure will be as shown in the following diagram:


Once this step is completed, all the necessary preparations have been made and formal validation can begin.

3. Verify Exchange Assets

Users can directly enter [cmd] or enter [cd ~/Downloads/zkmerkle_cex_xxx] command in [terminal] to enter the previously configured zkmerkle_cex_xxx file mentioned above.

Then enter:

Plain Text
./main verify cex

If verification is successful, it will output:

Plain Text
All proofs verify passed!!!

4. Verify Your own Assets

Please enter the following command to verify your own assets:

Plain Text
./main verify user

If the user’s assets are calculated correctly, the account and balance data will be a leaf node of the Merkle tree. Therefore, a successful verification will be output.

Plain Text
merkle leave hash: 164bc38a71b7a757455d93017242b4960cd1fea6842d8387b60c5780205858ce
verify pass!!!

If you want to learn more technical details, you can click on the link to access Github and view the open source code.

Conclusion

Enabling zk-SNARK is an important upgrade to Gate.io’s Proof of Reserves and a significant step in protecting user asset security. With outstanding security and privacy safeguards, it brings users more confidence and sets a new standard for the entire cryptocurrency industry.

Auteur: Wayne
Vertaler: Sonia
Revisor(s): Edward、KOWEI、Elisa、Ashley He、Joyce
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.

Course: How to use Gate.io Proof of Reserves to verify your asset's security

Intermediate12/19/2023, 2:44:04 PM
Gate officially announced that it had upgraded its PoR through zero-knowledge proof technology, allowing users to enjoy better privacy protection and data security. It became one of the first exchanges in the industry to adopt zero-knowledge proof PoR. This article will guide you on how to use Gate's Proof-of-Reserve to verify the security of your funds on Gate.io.

Gate.io is a leading crypto exchange with over 13 million users and 1,700+ trading pairs. As one of the oldest and largest trading platforms in the world, Gate.io strictly adheres to industry regulations and does not participate in any market manipulations. Openness, transparency, equality, and collaboration have always been our mission. We adopt a variety of centralized and decentralized methods to ensure the security of users’ assets.

As early as May 2020, Gate was the first to propose exchange proof-of-reserve (PoR) and invited the well-known American auditing firm Armanino LLP to audit its assets. It is one of the earliest exchanges in the industry to propose reserve proof. On November 23, 2023, Gate officially announced that it had upgraded its PoR through zero-knowledge proof technology, allowing users to enjoy better privacy protection and data security. It became one of the first exchanges in the industry to adopt zero-knowledge proof PoR. This article will guide you on how to use Gate’s Proof-of-Reserve to verify the security of your funds on Gate.io.

Background

What is Proof-of-Reserve?

In centralized exchanges (CEX), the assets of each user are recorded in the platform’s database ledger, making it difficult for users to confirm whether their assets have been transferred and whether the exchange has sufficient assets to cover the assets deposited by users. Therefore, exchanges need a method to prove that they have enough reserve assets to fully redeem users’ funds, which requires the value of the exchange’s reserve assets to be higher than the value of the assets deposited by users. This proof of publicly available assets is called Proof-of-Reserve. The related data to Proof-of-Reserve is the reserve ratio, which is the ratio of the exchange’s held assets to the user’s deposited assets multiplied by 100%. When the reserve ratio is greater than 100%, the exchange’s assets can meet the normal withdrawal needs of users. The higher the reserve ratio, the stronger the ability to resist liquidity risks.

The reserve ratio is generally divided into exchange reserve ratio and single currency reserve ratio. The exchange reserve ratio refers to the ratio of the overall assets of the exchange to the total user deposits multiplied by 100%. The single currency reserve ratio refers to the ratio of the number of a specific currency held in the exchange wallet to the amount of that currency deposited by users multiplied by 100%.

To learn more, please _click How zk-SNARK Improves Gate.io Proof of Reserves._

What is Zero-Knowledge Proof?

Zero-Knowledge Proof (ZKP) is an encryption method that allows one party (known as the prover) to prove to another party (known as the verifier) that a certain statement is true without revealing any additional information that would disclose the basis of the proof. This process not only protects the privacy of the prover but also ensures that the verifier cannot replicate the proof process or obtain any additional information from it.

To understand this technology, let’s consider a simple example: User A knows the phone number of User B. When User C asks User A if they know User B’s phone number, User A can prove that they indeed possess the phone number by dialing B’s number on the spot, without revealing it to User C. This process preserves the privacy of the user while still providing the answer, and it is what we refer to as “zero-knowledge proof.”

To learn more, please click A Detailed Explanation of Zero-Knowledge Proofs.

Combining Zero-Knowledge Proofs with Proof-of-Reserves

zk-SNARK is a succinct, non-interactive zero-knowledge proof technology. It performs a “trusted setup” in advance to generate a Common Reference String (CRS), which allows all provers to access it directly. This is similar to a scoring system in an exam, where zk-SNARK directly uploads the correct answers and allows the examinees to check their answers (by sending their solutions to the backend system, which will provide the final result of correctness). It is highly efficient.

Merkle Tree is a data structure similar to a “tree.” The data at the lowest layer are called “leaf nodes,” and the data in the middle can be called “intermediate nodes.” The values of the intermediate nodes are calculated by hashing the values of the two child nodes (any input value is processed in a specific way to produce a specific value). The intermediate nodes on the left and right are then hashed to obtain a unique output value for the higher-level intermediate node. After processing at each level, a unique root node (Root) of the Merkle Tree is obtained.

Gate.io combines zk-SNARK technology with Merkle Tree to place all user deposits into the Merkle Tree. Then, zk-SNARK is used to prove that all balances in the tree are non-negative (i.e., the exchange has not forged any accounts to interfere with the output of the Merkle Tree). Finally, the Merkle Tree is generated, and the relevant node hashes and root hash are made public for user verification.

Operation Tutorial

Frontend UI Interface

Click on the link or go to the Gate.io website and scroll to the bottom. Click on the 100% Proof of Reserves button to access the Gate Reserves frontend page.

Basic Reserve Information

After entering the Gate.io Proof-of-Reserves frontend page, users can directly view the latest update time of the reserve. In the example below, the most recent audit was conducted on November 10, 2023, using Markle Tree + zk-SNARKs as the auditing method. Users have deposited approximately 2.77 billion USD worth of assets, and the assets held in the Gate wallet exceed the user deposits by 434 million USD, totaling 3.206 billion USD. The overall reserve ratio is 115.69%.

Single Cryptocurrency Reserve Ratio

Scrolling down the page will show the specific amounts and reserve ratios for different cryptocurrencies. Taking the first crypto, BTC, as an example, as of December 8, 2023, users have deposited 13.85K BTC, while the Gate wallet holds 17.10K BTC, resulting in a reserve ratio of 123.52% for BTC.

Click on the page icon in the lower right corner of the image to view the reserve ratio of up to 112 tokens on Gate. Click on the “Verify now” button in the image to display the verification tutorial. By following the tutorial, you can verify if your account balance is included in the calculation, thus confirming that the reserve ratio reflects the results with your funds properly accounted for.

Other Frontend Display Pages

There is another way to check the audit status of your assets, which is to go to the My Account page and navigate to the Audits section. Here, you can view your historical audit records and Gate’s comprehensive reserve situation.

Verification Process

1. Download Verification Program

Users can download the verification program through Github or the download link provided on the reserve page, and rename it as [main]:

User need to choose the corresponding system of their device for downloading.

2. Download Asset Verification Data

Enter the personal Audit page, find the batch that needs verification, and click on “Download Merkle Tree” and “Download User Config” respectively to download the data.

After downloading, you will have a compressed file named zkmerkle_cex_xxx.tar.gz. Put the main program (the verification program file mentioned earlier) into the folder, and place the user_config.json file into the config folder. Once everything is done, the file structure will be as shown in the following diagram:


Once this step is completed, all the necessary preparations have been made and formal validation can begin.

3. Verify Exchange Assets

Users can directly enter [cmd] or enter [cd ~/Downloads/zkmerkle_cex_xxx] command in [terminal] to enter the previously configured zkmerkle_cex_xxx file mentioned above.

Then enter:

Plain Text
./main verify cex

If verification is successful, it will output:

Plain Text
All proofs verify passed!!!

4. Verify Your own Assets

Please enter the following command to verify your own assets:

Plain Text
./main verify user

If the user’s assets are calculated correctly, the account and balance data will be a leaf node of the Merkle tree. Therefore, a successful verification will be output.

Plain Text
merkle leave hash: 164bc38a71b7a757455d93017242b4960cd1fea6842d8387b60c5780205858ce
verify pass!!!

If you want to learn more technical details, you can click on the link to access Github and view the open source code.

Conclusion

Enabling zk-SNARK is an important upgrade to Gate.io’s Proof of Reserves and a significant step in protecting user asset security. With outstanding security and privacy safeguards, it brings users more confidence and sets a new standard for the entire cryptocurrency industry.

Auteur: Wayne
Vertaler: Sonia
Revisor(s): Edward、KOWEI、Elisa、Ashley He、Joyce
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.
Nu Starten
Meld Je Aan En Ontvang
$100
Voucher!