Bytemasons - Multistrategy Vault

CertiKFiles named in the report

CertiK reviewed Byte Masons - Reliquary (Bytemasons - Multistrategy Vault) on 8 Nov 2022: 24 findings, 0 critical; 9 marked fixed, 3 acknowledged, 12 open.

No open critical findings
Open the reportOpen Byte Masons - Reliquary’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings24

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High020
Medium010
Low1209
LowDeclaration Naming ConventionOpen

The linked declarations do not conform to the [Solidity style guide](https://solidity.readthedocs.io/en/v0.7.3/style-guide.html#naming-conventions) with regards to its naming convention. Particularly: - `camelCase`: Should be applied to function names, argument names, local and state variable names, modifiers - `UPPER_CASE`: Should be applied to `constant` variables - `CapWords`: Should be applied to contract names, struct names, event names and enums

LowHardcoded `UniswapV2Pair`Address Is Used in `initOpen

The `initialize()` function of **ReaperStrategyTombMai** contract defines a ERC20 token hardcoded address as `0x45f4682B560d4e3B8FF1F1b3A38FDBe775C7177b`. The hardcoded address belongs to UniSwapV2Pair as can be confirmed in [FTMScan Explorer](https://ftmscan.com/address/0x45f4682B560d4e3B8FF1F1b3A38FDBe775C7177b#code) ```solidity=60 __ReaperBaseStrategy_init(_vault, 0x45f4682B560d4e3B8FF1F1b3A38FDBe775C7177b, _strategists, _multisigRoles); ```

LowMissing Emit EventsOpen

In Solidity, the functions that write or update the status of sensitive state variables should emit descriptive events as notifications.

LowMissing Input ValidationOpen

When calculating the conversion between assets and shares, the input amount is not validated. Affected functions are: ```solidity=51 function convertToShares(uint256 assets) ``` ```solidity=66 function convertToAssets(uint256 shares) ``` Input data of public and external functions should always be verified.

LowPool ID Can Be Declared ConstantOpen

During the definition of **ReaperStrategyTombMai** contract, the `poolId` variable is defined as follows: ```solidity=49 uint256 public poolId; ``` However, the `poolId` is set to be 2 in function `initialize()` and not modified at any point of the code, so could be declared as constant.

LowPotential Initialization By FrontrunnerOpen

There is the risk that attackers could become the unintended administrators of deployed contracts. The initialization of `ReaperBaseStrategyv4` based contracts, including inherited contract, can only be done by calling function `__ReaperBaseStrategy_init()`. In theory, hackers and automatic bots can monitor the transaction of new contract deployment and front-run contracts with a similar transaction to initialize it. As a consequence, the frontrunner will become the unintended administrator of the contract and will be to control upgrades.

LowPotential Sandwich AttackOpen

The functions `IUniswapV2Router02(_router).swapExactTokensForTokensSupportingFeeOnTransferTokens()` and `IUniswapV2Router02(TOMB_ROUTER).addLiquidity()` in the aforementioned lines are executed without setting restrictions on slippage, which would make the swapping and liquidity-adding processes sensitive to price fluctuation from the DEX. In this case, it would be vulnerable to potential sandwich attacks, and thus the project might suffer unexpected losses.

LowSilent Failure on Function `_swap()`Open

In **ReaperStrategyTombMai** the function `_swap()` is declared as follows: ```solidity=133 function _swap( uint256 _amount, address[] memory _path, address _router ) internal { if (_path.length < 2 || _amount == 0) { return; } IERC20Upgradeable(_path[0]).safeIncreaseAllowance(_router, _amount); IUniswapV2Router02(_router).swapExactTokensForTokensSupportingFeeOnTransferTokens( _amount, 0, _path, address(this), block.timestamp ); } ``` This function silently fails when: 1. Input path contains less than two elements 2. Swap amount is zero In the previous two conditions, the caller won't be notified that the swap failed and the execution will continue as if the call to `_swap()` succeeded. An example of a malicious call could be crafted as: ```solidity function doSwap(uint256 _debt) public { _debt = 0; _swap(_debt, tombToMaiPath, TOMB_ROUTER); } ```

LowUnlocked Compiler VersionOpen

The contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

LowUnused Return ValueOpen

The return value of an external call is not used as a function return nor `require()` function check. ```solidity=162 IUniswapV2Router02(TOMB_ROUTER).addLiquidity( lpToken0, lpToken1, lp0Bal, lp1Bal, 0, 0, address(this), block.timestamp ); ```

Show 2 more
LowUnused VariableOpen

The variable `PERCENT_DIVISOR` is declared but the current code logic doesn't use it. ```solidity=15 uint256 public constant PERCENT_DIVISOR = 10_000; ```

LowVariable Can Be InlinedOpen

The variables `numStrategists` and `numRoles` can be inlined since no more references to them are found in the code.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (11)

  • contracts/interfaces/IUniswapV2Router01.sol
  • contracts/ReaperVaultV2.sol
  • contracts/interfaces/IUniswapV2Router02.sol
  • contracts/interfaces/IMasterChef.sol
  • contracts/interfaces/IVault.sol
  • contracts/interfaces/IERC4626Functions.sol
  • contracts/interfaces/IStrategy.sol
  • contracts/ReaperStrategyTombMai.sol
  • contracts/interfaces/IERC4626Events.sol
  • contracts/abstract/ReaperBaseStrategyv4.sol
  • contracts/ReaperVaultERC4626.sol

Part of Byte Masons - Reliquary’s security record

Byte Masons - Reliquary
Audits2 audits by 1 firmLast audit Nov 2022, by CertiK.
Critical findingsNo open critical findingsAcross 2 reports.
Open Byte Masons - Reliquary’s security record

Security firm

CertiK

1,045 projects reviewed · 1,376 reports · latest May 2025

See CertiK’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us