Proof of Reserve

May 4, 2023
Proofs of Reserves

Proof of Reserve

Proof of Reserve is a concept that aims to increase transparency and security in the management of assets. It is particularly relevant for cryptocurrency exchanges, which hold a large amount of user funds in their custody. Proof of Reserve allows users to verify that their funds are actually held by the exchange and not used for other purposes.

Proof of Reserves in real world assets

Proof of Reserve (PoR) is a concept that is not only relevant to the cryptocurrency world but also to real-life asset management. In the context of security assets, such as gold, silver, or other precious metals, Proof of Reserve is a way to provide assurance to investors that their assets are held securely by a custodian. In this article, we will explore how Proof of Reserve can be implemented in Solidity, the programming language used for writing smart contracts on the Ethereum blockchain, for real-life assets.

First, let’s briefly review what Proof of Reserve is. Proof of Reserve is a method to ensure that an entity actually holds the assets it claims to hold. It is typically used in the cryptocurrency world to verify that a cryptocurrency exchange holds the amount of cryptocurrency it claims to hold on behalf of its customers. This is important because cryptocurrency exchanges are not regulated like traditional financial institutions, and there have been instances where exchanges have been hacked, resulting in the loss of customer funds.

Now, let’s apply this concept to real-life assets, such as gold. When investors buy gold, they want to know that the gold is physically held by a trusted custodian. One way to achieve this is through Proof of Reserve. In this case, the custodian would publish a public statement, backed up by cryptographic proofs, to show that it holds the amount of gold it claims to hold on behalf of its customers.

Audit

Verifying that real-life assets exist is a crucial aspect of implementing Proof of Reserve. In the context of real-life assets, such as gold or silver, verifying the existence of these assets is typically done through physical audits.

When implementing Proof of Reserve for real-life assets, a trusted third-party auditor is typically engaged to physically verify the existence of the assets held by the custodian. The auditor conducts a physical audit of the custodian’s assets and provides a report that includes the total amount of assets held, the location of the assets, and any discrepancies found during the audit.

Once the audit is completed, the auditor provides a signed statement confirming the results of the audit, along with any supporting documentation, to the custodian. The custodian can then use this information to generate a cryptographic proof that shows that the assets are held by the custodian.

This proof can be made available to investors, who can use it to verify that their assets are included in the holdings of the custodian. The proof typically includes a Merkle root, which is the cryptographic hash of all the asset holdings, as well as a Merkle proof, which is a series of hashes that allow investors to verify that their assets are included in the holdings.

While Proof of Reserve can provide increased assurance to investors that their assets are held securely, there are also legal concerns that need to be considered. In particular, regulatory requirements and legal frameworks for real-life asset management may vary by jurisdiction.

For example, in the United States, the Securities and Exchange Commission (SEC) has issued guidance on the custody of digital assets, which includes requirements for broker-dealers to maintain custody of customer assets. These requirements include maintaining accurate records of customer assets and conducting regular audits of those assets.

Similar regulatory requirements may exist in other jurisdictions, and custodians should ensure that they are compliant with all applicable laws and regulations when implementing Proof of Reserve.

In addition to regulatory concerns, there may also be legal implications if a custodian is found to have misrepresented the assets it holds. This could result in legal action, including lawsuits and criminal charges, which could have significant financial and reputational consequences.

Companies that can execute audit

Several companies specialize in executing audits of Proof of Reserve for digital and real-life assets. Some of the most reputable companies in this space include:

  1. BDO: BDO is a global accounting firm with a dedicated Blockchain and Digital Assets practice that offers a range of services, including Proof of Reserve audits. BDO has worked with several high-profile clients in the cryptocurrency industry and has a strong reputation for quality and reliability.

  2. BitGo: BitGo is a digital asset custody and security company that offers Proof of Reserve audits as a service. BitGo has developed its own proprietary technology for conducting these audits, which it claims is more efficient and accurate than traditional methods.

  3. Armanino: Armanino is a U.S.-based accounting firm that offers a range of blockchain and digital asset services, including Proof of Reserve audits. Armanino has worked with several high-profile clients in the cryptocurrency industry and has a strong reputation for quality and reliability.

  4. Grant Thornton: Grant Thornton is a global accounting firm with a dedicated Blockchain and Digital Assets practice that offers Proof of Reserve audits. Grant Thornton has experience working with a wide range of clients in the cryptocurrency industry and has a strong reputation for quality and reliability.

  5. Coinbase: Coinbase is one of the largest digital asset exchanges in the world and offers Proof of Reserve audits as a service to its institutional clients. Coinbase has a strong reputation for security and reliability and has implemented several industry-leading security measures to protect its clients’ assets.

Chainlink is a decentralized oracle network that provides a secure and reliable way to connect smart contracts with real-world data and systems. While Chainlink is not a traditional audit firm, it can be used to enhance the security and reliability of Proof of Reserve audits.

These are just a few of the companies that offer Proof of Reserve audit services. When selecting an audit firm, it is important to consider factors such as the company’s reputation, experience, and expertise in the specific type of assets being audited.

One way that Chainlink can be used in Proof of Reserve audits is by providing real-time data feeds that can be used to verify the existence of real-life assets. For example, a custodian could use Chainlink to obtain real-time price data for gold or other precious metals, which could then be compared to the custodian’s own records to verify the amount of assets held.

Chainlink can also be used to enhance the security of Proof of Reserve audits by providing a tamper-proof and decentralized record of the audit results. By using Chainlink to record the audit results on a blockchain, the results become immutable and cannot be tampered with, providing increased assurance to investors that the audit was conducted properly.

Additionally, Chainlink can be used to automate certain aspects of the Proof of Reserve audit process, such as the reconciliation of asset holdings between the custodian and the auditor. By using Chainlink to automate these processes, the audit can be conducted more efficiently and with less risk of error or fraud.

While Chainlink can be a valuable tool in conducting Proof of Reserve audits, it is important to note that it should not be used as a substitute for a traditional audit. Chainlink should be used in conjunction with traditional audit methods and conducted by a reputable and independent audit firm to ensure the accuracy and reliability of the audit results.

Code examples in your smart contract implemention

Solidity is a programming language used to develop smart contracts on the Ethereum blockchain. Chainlink is a decentralized oracle network that provides reliable and secure data feeds to smart contracts. Together, they can be used to implement Proof of Reserve verification for real-life assets in a secure and efficient manner.

Here is an example of how Solidity and Chainlink can be used to implement Proof of Reserve verification:

  • The custodian of the real-life assets provides the details of the assets, such as the type of asset, quantity, and location, to a trusted auditor.

  • The auditor verifies the existence of the assets using traditional audit methods, such as on-site inspections, and records the results.

  • The auditor then creates a Chainlink oracle contract that provides real-time price data for the asset.

  • The oracle contract is linked to the smart contract that will hold the asset.

  • The smart contract then queries the oracle contract for the real-time price data of the asset.

  • The smart contract compares the real-time price data obtained from the oracle contract with the recorded quantity of the asset held by the custodian.

  • If the recorded quantity matches the real-time price data obtained from the oracle contract, the smart contract considers the Proof of Reserve verified.

  • The verified Proof of Reserve can then be used to mint or redeem asset-backed tokens on the Ethereum blockchain.

This implementation ensures that the assets held by the custodian are backed by real-life assets and provides investors with a higher level of trust and transparency.

pragma solidity ^0.8.0;

import "github.com/smartcontractkit/chainlink-brownie-contracts/contracts/src/v0.8/ChainlinkClient.sol";

contract ProofOfReserve is ChainlinkClient {
    using Chainlink for Chainlink.Request;
    
    address public custodian;
    uint256 public recordedQuantity;
    uint256 public oraclePrice;
    bytes32 public requestId;
    
    // Kovan network settings
    address private oracle = 0x56dd6586DB0D08c6Ce7B2f2805af28616E082455;
    bytes32 private jobId = "29fa9aa13bf1468788b7cc4a500a45b8";
    uint256 private fee = 0.1 * 10 ** 18;
    
    constructor(address _custodian, uint256 _recordedQuantity) {
        custodian = _custodian;
        recordedQuantity = _recordedQuantity;
        setChainlinkToken(0xa36085F69e2889c224210F603D836748e7dC0088);
        setChainlinkOracle(oracle);
    }
    
    function requestPrice() public returns (bytes32 requestId) {
        Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.fulfill.selector);
        request.add("get", "https://api.coingecko.com/api/v3/simple/price?ids=gold&vs_currencies=usd");
        request.add("path", "gold.usd");
        requestId = sendChainlinkRequestTo(oracle, request, fee);
    }
    
    function fulfill(bytes32 _requestId, uint256 _price) public recordChainlinkFulfillment(_requestId) {
        oraclePrice = _price;
    }
    
    function verifyProofOfReserve() public view returns (bool) {
        return (recordedQuantity * oraclePrice == address(custodian).balance);
    }
}

This code creates a smart contract called ProofOfReserve that implements Proof of Reserve verification for real-life assets. The custodian variable holds the address of the custodian that holds the real-life assets, and the recordedQuantity variable holds the recorded quantity of the assets held by the custodian.

The requestPrice function uses Chainlink to request real-time price data for the asset held by the custodian. The fulfill function is called by Chainlink once the requested price data is available.

The verifyProofOfReserve function compares the recorded quantity of the asset held by the custodian with the real-time price data obtained from Chainlink to verify that the assets held by the custodian are backed by real-life assets.

It is important to note that this sample code is for educational purposes only and should not be used in production without proper testing and auditing. Additionally, this code assumes the use of the Kovan network and a specific Chainlink oracle and job ID, which may need to be updated for use on other networks or with different oracles.

Conclusion

In conclusion, implementing Proof of Reserve for real-life assets can provide increased assurance to investors that their assets are held securely. However, it is important to ensure that all regulatory requirements are met and that legal risks are carefully considered when implementing Proof of Reserve for real-life assets.