REP-Revault-2021-12-05_1
REP-Revault-2021-12-05_1
Revault
Sept 22nd, 2021
Revault Security Assessment
Table of Contents
Summary
Overview
Project Summary
Audit Summary
Vulnerability Summary
Audit Scope
Findings
RCC-01 : No Need to Use `storage`
RCC-02 : Privileged ownership
RCC-03 : Missing Emits Events
RCC-04 : Centralized Control of Contract Upgrade
RCC-05 : Incorrect Sanity Check
RCC-06 : Potential issue on `revaReward` Amount
RCC-07 : `treasury` Can Mint Unlimited Tokens Repeatedly
RCC-08 : `treasury` could receive minted Tokens
RFR-01 : Centralized Control of Contract Upgrade
RFR-02 : Privileged ownership
RLS-01 : Unchecked Value of BEP20 `transfer()`/`transferFrom()` Call
RLS-02 : Check Effect Interaction Pattern Violated
RLS-03 : Privileged ownership
RLS-04 : Functions Should Be Declared External
RLS-05 : Missing Emit Events
RSP-01 : No Need to Use `storage`
RSP-02 : `vRevaToken` not Burned
RSP-03 : Privileged ownership
RSP-04 : Centralized Control of Contract Upgrade
RSP-05 : Functions Should Be Declared External
RSP-06 : No Upper Limit For `earlyWithdrawalFee`
RSP-07 : Missing Emit Events
RTC-01 : Variable could be declared as `constant`
RTC-02 : Delegation Not Moved Along With `transfer()`
RTC-03 : Functions Should Be Declared External
RTC-04 : Privileged ownership
RTC-05 : Missing Emit Events
Revault Security Assessment
Appendix
Disclaimer
About
Revault Security Assessment
Summary
This report has been prepared for Revault to discover issues and vulnerabilities in the source code of the
Revault project as well as any contract dependencies that were not part of an officially recognized library. A
comprehensive examination has been performed, utilizing Static Analysis and Manual Review techniques.
Testing the smart contracts against both common and uncommon attack vectors.
Assessing the codebase to ensure compliance with current best practices and industry standards.
Ensuring contract logic meets the specifications and intentions of the client.
Cross referencing contract structure and implementation against similar smart contracts produced
by industry leaders.
Thorough line-by-line manual review of the entire codebase by industry experts.
The security assessment resulted in findings that ranged from critical to informational. We recommend
addressing these findings to ensure a high level of security standards and industry practices. We suggest
recommendations that could better serve the project from the security perspective:
Overview
Project Summary
Platform BSC
Language Solidity
Codebase https://github.com/Revault-network/backend/tree/master/contracts
Commit 63b680150606d291840c14fb0674747afd7cb886
Audit Summary
Key Components
Vulnerability Summary
Critical 1 0 0 0 0 1
Major 18 0 0 1 0 17
Medium 1 0 0 0 0 1
Minor 9 0 0 0 0 9
Informational 11 0 0 0 0 11
Discussion 0 0 0 0 0 0
Revault Security Assessment
Audit Scope
Findings
Critical 1 (2.50%)
Major 18 (45.00%)
40 Medium
Minor
1 (2.50%)
9 (22.50%)
Total Issues
Informational 11 (27.50%)
Discussion 0 (0.00%)
Gas Optimization,
RCC-01 No Need to Use storage Minor Resolved
Language Specific
Centralization /
RCC-02 Privileged ownership Major Resolved
Privilege
Centralization /
RCC-04 Centralized Control of Contract Upgrade Major Resolved
Privilege
Centralization /
RCC-08 treasury could receive minted Tokens Major Resolved
Privilege
Centralization /
RFR-01 Centralized Control of Contract Upgrade Major Resolved
Privilege
Centralization /
RFR-02 Privileged ownership Major Resolved
Privilege
RLS-02 Check Effect Interaction Pattern Violated Volatile Code Major Resolved
Centralization /
RLS-03 Privileged ownership Major Resolved
Privilege
Gas Optimization,
RSP-01 No Need to Use storage Minor Resolved
Language Specific
Centralization /
RSP-03 Privileged ownership Major Resolved
Privilege
Centralization /
RSP-04 Centralized Control of Contract Upgrade Major Resolved
Privilege
Centralization /
RTC-04 Privileged ownership Major Resolved
Privilege
Gas Optimization,
RTK-01 Use revert Instead of require Informational Resolved
Coding Style
Centralization /
RTK-02 Privileged ownership Major Resolved
Privilege
Revault Security Assessment
RUP-01 Interfaces imported but not used Volatile Code Informational Resolved
Gas Optimization,
RVC-01 No Need to Use storage Minor Resolved
Language Specific
Centralization /
RVC-04 Centralized Control of Contract Upgrade Major Resolved
Privilege
Centralization /
RVC-06 Privileged ownership Major Resolved
Privilege
Centralization /
RVC-07 No Upper Limit For Profit Distribution Major Resolved
Privilege
Description
The storage property is mainly used for modifying storage variables, reading storage variables will cost
more gas.
Recommendation
We recommend removing storage property if there are no storage variables updated.
Revault Security Assessment
Description
The owner of contract RevaStakingPool has the permission to:
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multisignature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
"The function that affects the status of sensitive variables should be able to emit events as notifications to
[fixme].
setRevaPerBlock()
setRevault()
setTreasury()
Recommendation
Consider adding events for sensitive actions, and emit them in the aforementioned functions.
Revault Security Assessment
Description
The contract owner can upgrade the contract without the community's commitment. If an attacker
compromises the account, he can change the implementation of the contract and drain tokens from the
contract.
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multi-signature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
Function updateRevaultRewards is called by notifyDeposited and notifyWithdrawn , if there are more
than two transactions calling notifyDeposited or notifyWithdrawn to deposit/withdraw the same token,
transactions after the first transaction will not update tokenInfo , because block.number ==
tokenInfo.lastRewardBlock is true, updateRevaultRewards function will return before updating
tokenInfo .
Recommendation
We advise the client to fix it.
Alleviation
Fixed in commit hash ef02495eb5748ffdbeed23f8afc6aed2e23101c7 by removing tokenInfo.tvlBusd
update logic.
Revault Security Assessment
Description
In function updateRevaultRewards , totalRevaultTvlBusd and tokenInfo.tvlBusd depend on the return
value of zap.getBUSDValue , which may be manipulated by hackers, so they can get more reve tokens.
Recommendation
If a project requires price references, it needs to be caution of flash loans that might manipulate token
prices. To minimize the chance of happening, we recommend the client to consider following according to
the project's business model:
1. Use Time-Weighted Average Price (TWAP). The TWAP represents the average price of a token over a
specified time frame. If an attacker manipulates the price in one block, it will not affect too much on
the average price.
2. If the business model allows, restrict the function caller to be a non-contract/EOA address.
3. Flash loans only allow users to borrow money within a single transaction. If the contract use cases
allowed, force critical transactions to span at least two blocks.
Alleviation
Fixed in commit hash ef02495eb5748ffdbeed23f8afc6aed2e23101c7 by removing tokenInfo.tvlBusd
update logic.
Revault Security Assessment
Description
treasury can repeatedly call claimTreasuryReward to mint as many tokens as they want because
Recommendation
We advise to use checks-effects-integrates patten to update lastTreasuryRewardBlock .
Alleviation
Team: The function mint does not trigger callback, so checks-effects-integrates are not required.
Revault Security Assessment
Description
treasury could receive minted tokens by calling function claimTreasuryReward .
Recommendation
We advise the client to explain this design because users need to know where tokens go.
Alleviation
Team: As part of REVA tokenomics (https://revaultnetwork.medium.com/revaults-token-economics-
e9bef267d9d2), the revault DAO treasury must be able to receive tokens (10% of the total supply). The
treasury will be under multisig control, and eventually in the hands of the community just like all the other
contracts until the community handover.
Revault Security Assessment
Description
The contract owner can upgrade the contract without the community's commitment. If an attacker
compromises the account, he can change the implementation of the contract and drain tokens from the
contract.
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multi-signature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
The owner of contract RevaFeeReceiver has the permission to:
1. call addRecipient to approve any address to take all revaToken from this contract.
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multisignature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Volatile Code Minor contracts/reva/RevaLpStakingPool.sol (revault): 123, 128, 153, 158, 169 Resolved
Description
"The linked transfer() / transferFrom / approve invocations do not check the return value of the function
call which should yield a true result in case of proper ERC-20 implementation.
Recommendation
It is recommended to use SafeBEP20.
Description
Hackers may manipulate the pool.lpToken contract, so there is a potential re-entrancy issue. The external
call/transfer and storage manipulation sequence must follow a checks-effects-interactions pattern to avoid
re-entrancy attacks. For example:
Function deposit()
Function withdraw()
Function emergencyWithdraw()
Recommendation
We advise the client to use checks-effects-interactions pattern AND add ReentrancyGuard . checks-
effects-interactionsLINK [ReentrancyGuard](https://github.com/OpenZeppelin/openzeppelin-
contracts/blob/master/contracts/utils/ReentrancyGuard.sol
Revault Security Assessment
Description
The owner of contract RevaStakingPool has the permission to:
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multisignature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
Functions that are never called internally within the contract should have external visibility. For example,
emergencyWithdraw , add , and set .
Recommendation
We recommend changing the visibility of the aforementioned functions to external.
Revault Security Assessment
Description
The function that affects the status of sensitive variables should be able to emit events as notifications to
users.
setRevaPerBlock()
Recommendation
Consider adding events for sensitive actions, and emit them in the function.
Revault Security Assessment
Description
The storage property is mainly used for modifying storage variables, reading storage variables will cost
more gas.
Recommendation
We recommend removing storage property if there is no storage variables updated.
Revault Security Assessment
Description
vRevaToken minted in deposit and burned in withdraw , but not burned when users call withdrawEarly ,
emergencyWithdraw or emergencyWithdrawEarly .
Recommendation
We advise to burn vRevaToken in these aforementioned functions. .
Revault Security Assessment
Description
The owner of contract RevaStakingPool has the permission to:
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multisignature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
The contract owner can upgrade the contract without the community's commitment. If an attacker
compromises the account, he can change the implementation of the contract and drain tokens from the
contract.
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multi-signature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
Functions that are never called internally within the contract should have external visibility. For example,
emergencyWithdraw , emergencyWithdrawEarly , add , and set .
Recommendation
We recommend changing the visibility of the aforementioned functions to external.
Revault Security Assessment
Description
The owner can set the earlyWithdrawalFee when deploying the contract and there is no upper limit on
what the rate can be. In the extreme case, the rate can be as high as 100%, which means all deposited
tokens can be deducted as earlyWithdrawalFee .
Recommendation
We recommend setting an upper limit for the earlyWithdrawalFee variable.
Alleviation
The max earlyWithdrawFee is 50% of all deposited tokens.
Description
The function that affects the status of sensitive variables should be able to emit events as notifications to
users.
setRevaPerBlock()
setEarlyWithdrawalFee()
Recommendation
Consider adding events for sensitive actions, and emit them in the function.
Revault Security Assessment
Description
Variables _maxSupply could be declared as constant since it is never to be changed.
Recommendation
We recommend declaring it as constant .
Revault Security Assessment
Description
The voting power of delegation is not moved from token sender to token recipient along with the
transfer() and transferFrom .
Recommendation
We advise to invoke _moveDelegates() in transfer and transferFrom functions.
Alleviation
Delegation feature is removed from RevaToken contract.
Revault Security Assessment
Gas Optimization Informational contracts/reva/RevaToken.sol (revault): 27, 34, 40, 46, 52, 57 Resolved
Description
Functions that are never called internally within the contract should have external visibility. For example,
mint , setTreasury , setRevaStakeFeeReceiver , setRevaLpStakeFeeReceiver , setBurnFee , and
setMinter .
Recommendation
We recommend changing the visibility of the aforementioned functions to external.
Revault Security Assessment
Centralization / Privilege Major contracts/reva/RevaToken.sol (revault): 34, 40, 46, 52, 57 Resolved
Description
The owner of contract RevaToken has the permission to:
So every Reva Token transfer transaction , up to 3% of the transferred amount Reva Token will be
transferred to different receivers, up to 1 of the transferred amount Reva Token will be burned
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multisignature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Deployed a Gnosis multi sig :
https://bscscan.com/address/0x98bc7b818e148f46a35f8a767e8d5ef7f1152193 Timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#code
Revault Security Assessment
Coding Style Informational contracts/reva/RevaToken.sol (revault): 34, 40, 46, 52, 57 Resolved
Description
"The function that affects the status of sensitive variables should be able to emit events as notifications to
[fixme].
setTreasury()
setRevaStakeFeeReceiver()
setRevaLpStakeFeeReceiver()
setBurnFee()
setMinter()
Recommendation
Consider adding events for sensitive actions, and emit them in the aforementioned functions.
Revault Security Assessment
Description
In function transfer and transferFrom , require statement can be replaced by revert .
Recommendation
we advise to use revert directly.
Description
The owner of contract vRevaToken has the permission to:
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multisignature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
Interfaces imported but not used
Recommendation
We advise to remove unused imports.
Revault Security Assessment
Description
"The linked transfer() / transferFrom / approve invocations do not check the return value of the function
call which should yield a true result in case of proper ERC-20 implementation.
Recommendation
It is recommended to use SafeBEP20.
Description
The storage property is mainly used for modifying storage variables, reading storage variables will cost
more gas.
Recommendation
We recommend removing storage property if there are no storage variables updated.
Revault Security Assessment
Control Flow, Volatile Code Minor contracts/reva/ReVault.sol (revault): 78, 96, 150, 205, 233, 161 Resolved
Description
"The linked transfer() / transferFrom / approve invocations do not check the return value of the function
call which should yield a true result in case of proper ERC-20 implementation.
Recommendation
It is recommended to use SafeBEP20.
Description
A sandwich attack might happen when an attacker observes a transaction swapping tokens or adding
liquidity without setting restrictions on slippage or minimum output amount. The attacker can manipulate
the exchange rate by frontrunning (before the transaction being attacked) a transaction to purchase one of
the assets and make profits by backrunning (after the transaction being attacked) a transaction to sell the
asset.
The following functions are called without setting restrictions on slippage or minimum output amount, so
transactions triggering these functions are vulnerable to sandwich attacks, especially when the input
amount is large:
zap.zapInTokenTo
Recommendation
We recommend setting reasonable minimum output amounts, instead of 0, based on token prices when
calling the aforementioned functions.
Alleviation
Team: We will be providing a disclaimer that no minReturn param is accepted in this version,
slippage/frontrunning is a possibility for larger amounts.
Revault Security Assessment
Description
The contract owner can upgrade the contract without the community's commitment. If an attacker
compromises the account, he can change the implementation of the contract and drain tokens from the
contract.
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multi-signature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
These external functions don't have reentrancy issues from its code logic, but it calls third-party vault
contracts, which may cause reentrancy issues, so it's better to add nonReentrant for safety.
Recommendation
We recommend applying OpenZeppelin ReentrancyGuard library - nonReentrant modifier for the
aforementioned function to prevent pentential reentrancy attack.
Revault Security Assessment
Centralization / Privilege Major contracts/reva/ReVault.sol (revault): 327, 336, 340, 345, 323 Resolved
Description
The owner of contract ReVault has the permission to:
Recommendation
We advise the client to carefully manage the admin account's private key to avoid any potential risks of
being hacked. In general, we strongly recommend centralized privileges or roles in the protocol to be
improved via a decentralized mechanism or via smart-contract-based accounts with enhanced security
practices, e.g. Multisignature wallets. Here are some feasible solutions that would also mitigate the
potential risk:
Time-lock with reasonable latency, i.e. 48 hours, for awareness on privileged operations;
Assignment of privileged roles to multi-signature wallets to prevent a single point of failure due to the
private key;
Introduction of a DAO/governance/voting module to increase transparency and user involvement.
Alleviation
Owner changed to timelock:
https://bscscan.com/address/0x30ec49ef0243c00cf133a133e745c3957d4e28bc#readContract
Description
The contract owner can set profit distribution parameters profitToReva=PROFIT_DISTRIBUTION_PRECISION
and profitToRevaStakers=0 or profitToReva=0 and
profitToRevaStakers=PROFIT_DISTRIBUTION_PRECISION , which means 100% of the profit will be
Recommendation
We recommend setting an upper limit for both profitToRevaStakers and profitToReva .
Alleviation
There could be 50% maximum distruted to vault.
Description
The function that affects the status of sensitive variables should be able to emit events as notifications.
setProfitToReva()
setProfitToRevaStakers()
Recommendation
Consider adding events for sensitive actions, and emit them in the function.
Revault Security Assessment
Description
ReVault is an upgradeable contract, there are initial values in field declarations.
Recommendation
We recommend setting all initial values in an initializer function.
Revault Security Assessment
Appendix
Finding Categories
Centralization / Privilege
Centralization / Privilege findings refer to either feature logic or implementation of components that act
against the nature of decentralization, such as explicit ownership or specialized access roles in
combination with a mechanism to relocate funds.
Gas Optimization
Gas Optimization findings do not affect the functionality of the code but generate different, more optimal
EVM opcodes resulting in a reduction on the total gas cost of a transaction.
Logical Issue
Logical Issue findings detail a fault in the logic of the linked code, such as an incorrect notion on how
block.timestamp works.
Control Flow
Control Flow findings concern the access control imposed on functions, such as owner-only functions
being invoke-able by anyone under certain circumstances.
Volatile Code
Volatile Code findings refer to segments of code that behave unexpectedly on certain edge cases that may
result in a vulnerability.
Language Specific
Language Specific findings are issues that would only arise within Solidity, i.e. incorrect usage of private or
delete.
Coding Style
Coding Style findings usually do not affect the generated byte-code but rather comment on how to make
the codebase more legible and, as a result, easily maintainable.
The "Checksum" field in the "Audit Scope" section is calculated as the SHA-256 (Secure Hash Algorithm 2
with digest size of 256 bits) digest of the content of each file hosted in the listed source repository under
The result is hexadecimal encoded and is the same as the output of the Linux "sha256sum" command
against the target file.
Revault Security Assessment
Disclaimer
This report is subject to the terms and conditions (including without limitation, description of services,
confidentiality, disclaimer and limitation of liability) set forth in the Services Agreement, or the scope of
services, and terms and conditions provided to you (“Customer” or the “Company”) in connection with the
Agreement. This report provided in connection with the Services set forth in the Agreement shall be used
by the Company only to the extent permitted under the terms and conditions set forth in the Agreement.
This report may not be transmitted, disclosed, referred to or relied upon by any person for any purposes,
nor may copies be delivered to any other person other than the Company, without CertiK’s prior written
consent in each instance.
This report is not, nor should be considered, an “endorsement” or “disapproval” of any particular project or
team. This report is not, nor should be considered, an indication of the economics or value of any
“product” or “asset” created by any team or project that contracts CertiK to perform a security
assessment. This report does not provide any warranty or guarantee regarding the absolute bug-free
nature of the technology analyzed, nor do they provide any indication of the technologies proprietors,
business, business model or legal compliance.
This report should not be used in any way to make decisions around investment or involvement with any
particular project. This report in no way provides investment advice, nor should be leveraged as investment
advice of any sort. This report represents an extensive assessing process intending to help our customers
increase the quality of their code while reducing the high level of risk presented by cryptographic tokens
and blockchain technology.
Blockchain technology and cryptographic assets present a high level of ongoing risk. CertiK’s position is
that each company and individual are responsible for their own due diligence and continuous security.
CertiK’s goal is to help reduce the attack vectors and the high level of variance associated with utilizing
new and consistently changing technologies, and in no way claims any guarantee of security or
functionality of the technology we agree to analyze.
The assessment services provided by CertiK is subject to dependencies and under continuing
development. You agree that your access and/or use, including but not limited to any services, reports,
and materials, will be at your sole risk on an as-is, where-is, and as-available basis. Cryptographic tokens
are emergent technologies and carry with them high levels of technical risk and uncertainty. The
assessment reports could include false positives, false negatives, and other unpredictable results. The
services may access, and depend upon, multiple layers of third-parties.
ALL SERVICES, THE LABELS, THE ASSESSMENT REPORT, WORK PRODUCT, OR OTHER MATERIALS,
OR ANY PRODUCTS OR RESULTS OF THE USE THEREOF ARE PROVIDED “AS IS” AND “AS
Revault Security Assessment
AVAILABLE” AND WITH ALL FAULTS AND DEFECTS WITHOUT WARRANTY OF ANY KIND. TO THE
MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, CERTIK HEREBY DISCLAIMS ALL
WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE
SERVICES, ASSESSMENT REPORT, OR OTHER MATERIALS. WITHOUT LIMITING THE FOREGOING,
CERTIK SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT, AND ALL WARRANTIES ARISING FROM
COURSE OF DEALING, USAGE, OR TRADE PRACTICE. WITHOUT LIMITING THE FOREGOING, CERTIK
MAKES NO WARRANTY OF ANY KIND THAT THE SERVICES, THE LABELS, THE ASSESSMENT REPORT,
WORK PRODUCT, OR OTHER MATERIALS, OR ANY PRODUCTS OR RESULTS OF THE USE THEREOF,
WILL MEET CUSTOMER’S OR ANY OTHER PERSON’S REQUIREMENTS, ACHIEVE ANY INTENDED
RESULT, BE COMPATIBLE OR WORK WITH ANY SOFTWARE, SYSTEM, OR OTHER SERVICES, OR BE
SECURE, ACCURATE, COMPLETE, FREE OF HARMFUL CODE, OR ERROR-FREE. WITHOUT LIMITATION
TO THE FOREGOING, CERTIK PROVIDES NO WARRANTY OR UNDERTAKING, AND MAKES NO
REPRESENTATION OF ANY KIND THAT THE SERVICE WILL MEET CUSTOMER’S REQUIREMENTS,
ACHIEVE ANY INTENDED RESULTS, BE COMPATIBLE OR WORK WITH ANY OTHER SOFTWARE,
APPLICATIONS, SYSTEMS OR SERVICES, OPERATE WITHOUT INTERRUPTION, MEET ANY
PERFORMANCE OR RELIABILITY STANDARDS OR BE ERROR FREE OR THAT ANY ERRORS OR
DEFECTS CAN OR WILL BE CORRECTED.
WITHOUT LIMITING THE FOREGOING, NEITHER CERTIK NOR ANY OF CERTIK’S AGENTS MAKES ANY
REPRESENTATION OR WARRANTY OF ANY KIND, EXPRESS OR IMPLIED AS TO THE ACCURACY,
RELIABILITY, OR CURRENCY OF ANY INFORMATION OR CONTENT PROVIDED THROUGH THE
SERVICE. CERTIK WILL ASSUME NO LIABILITY OR RESPONSIBILITY FOR (I) ANY ERRORS, MISTAKES,
OR INACCURACIES OF CONTENT AND MATERIALS OR FOR ANY LOSS OR DAMAGE OF ANY KIND
INCURRED AS A RESULT OF THE USE OF ANY CONTENT, OR (II) ANY PERSONAL INJURY OR
PROPERTY DAMAGE, OF ANY NATURE WHATSOEVER, RESULTING FROM CUSTOMER’S ACCESS TO
OR USE OF THE SERVICES, ASSESSMENT REPORT, OR OTHER MATERIALS.
ALL THIRD-PARTY MATERIALS ARE PROVIDED “AS IS” AND ANY REPRESENTATION OR WARRANTY
OF OR CONCERNING ANY THIRD-PARTY MATERIALS IS STRICTLY BETWEEN CUSTOMER AND THE
THIRD-PARTY OWNER OR DISTRIBUTOR OF THE THIRD-PARTY MATERIALS.
THE SERVICES, ASSESSMENT REPORT, AND ANY OTHER MATERIALS HEREUNDER ARE SOLELY
PROVIDED TO CUSTOMER AND MAY NOT BE RELIED ON BY ANY OTHER PERSON OR FOR ANY
PURPOSE NOT SPECIFICALLY IDENTIFIED IN THIS AGREEMENT, NOR MAY COPIES BE DELIVERED TO,
ANY OTHER PERSON WITHOUT CERTIK’S PRIOR WRITTEN CONSENT IN EACH INSTANCE.
NO THIRD PARTY OR ANYONE ACTING ON BEHALF OF ANY THEREOF, SHALL BE A THIRD PARTY OR
OTHER BENEFICIARY OF SUCH SERVICES, ASSESSMENT REPORT, AND ANY ACCOMPANYING
Revault Security Assessment
MATERIALS AND NO SUCH THIRD PARTY SHALL HAVE ANY RIGHTS OF CONTRIBUTION AGAINST
CERTIK WITH RESPECT TO SUCH SERVICES, ASSESSMENT REPORT, AND ANY ACCOMPANYING
MATERIALS.
FOR AVOIDANCE OF DOUBT, THE SERVICES, INCLUDING ANY ASSOCIATED ASSESSMENT REPORTS
OR MATERIALS, SHALL NOT BE CONSIDERED OR RELIED UPON AS ANY FORM OF FINANCIAL, TAX,
LEGAL, REGULATORY, OR OTHER ADVICE.
Revault Security Assessment
About
Founded in 2017 by leading academics in the field of Computer Science from both Yale and Columbia
University, CertiK is a leading blockchain security company that serves to verify the security and
correctness of smart contracts and blockchain-based protocols. Through the utilization of our world-class
technical expertise, alongside our proprietary, innovative tech, we’re able to support the success of our
clients with best-in-class security, all whilst realizing our overarching vision; provable trust for all
throughout all facets of blockchain.