Ichi

QuantstampFiles named in the report

Quantstamp reviewed ICHI on 30 Apr 2021: 29 findings, 0 critical; 21 marked fixed, 8 acknowledged.

No open critical findings
Open the reportOpen ICHI’s security record

Report hosted on certificate.quantstamp.com.

Trustblock does not review code.

Findings29

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

SeverityOpenAcknowledgedFixed
Critical000
High004
Medium013
Low0714
MediumPrivileged Roles and OwnershipAcknowledged

Smart contracts will often have `owner` variables to designate the person with special privileges to make modifications to the smart contract. In particular: 1. Owners of `Arbitrary` strategy contracts can transfer any tokens anywhere. It is also expected that they will retrieve underlying positions manually before `_closeAllPositions` is invoked. 1. When a user mints oneTokens, they can provide both collateral and member tokens, however when redeeming, only collateral tokens may be obtained. It must be ensured by the contract owner and underlying strategy that assets are used in a principle-preserving way. If the owner/strategy does not preserve the principle, the initial holders will indeed receive a 1-to-1 value exchange until the collateral reserve is depleted. Holders that redeem last will find themselves with _valueless oneTokens_ that cannot be redeemed anymore - not even at the minting ratio of 90%. 1. Owners of `OneTokenV1` can set redemption and minting fees up to 100%.

Low`maxOrderVolume` is always `INFINITE`Acknowledged

In the function `getMintingRatio4`, `maxOrderVolume` is set to `INFINITE` in all paths. It is not clear if this is correct or not.

Low`setStrategyAllowance` misses funds that are currently deployedAcknowledged

The `setStrategyAllowance` functions computes the current holdings as the balance of the strategy contract: `IERC20(token).balanceOf(a.strategy);`. This does not include the holdings that are already used in a different contract as part of the strategy. This is also susceptible to being front-run with a transaction that moves the funds to a different contract in the strategy but as strategy funds are controlled by governance, this will most likely not be an issue.

LowClone-and-OwnAcknowledged

The clone-and-own approach involves copying and adjusting open source code at one's own discretion. From the development perspective, it is initially beneficial as it reduces the amount of effort. However, from the security perspective, it involves some risks as the code may not follow the best practices, may contain a security vulnerability, or may include intentionally or unintentionally modified upstream libraries.

LowStub volatility valuesAcknowledged

The volatility of any Uniswap pair is reported as zero, even though price fluctuations may exist.

LowUnclear volatility computation in composite oraclesAcknowledged

The function `read` states that "volatility is calculated by the final oracle". It is not clear why this is only a function of the volatility of the final oracle. If there is volatility in each of the interim tokens, this would influence the resulting `amountOut`.

LowUnclear why `init` may be called multiple timesAcknowledged

The docstring for `init` indicates that "a strategy is dedicated to exactly one oneToken instance and must be re-initializable". It is not clear why it must be re-initializable, given that it is dedicated to a `oneToken` that cannot change.

LowUnlocked PragmaAcknowledged

Every Solidity file specifies in the header a version number of the format `pragma solidity (^)0.4.*`. The caret (`^`) before the version number implies an unlocked pragma, meaning that the compiler will use the specified version _and above_, hence the term "unlocked".

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 (69)

  • contracts/oracle/uniswap/UniswapOracleSimple.sol
  • contracts/_uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol
  • contracts/_uniswap/lib/contracts/libraries/Babylonian.sol
  • contracts/interface/IERC20Extended.sol
  • contracts/lib/AddressSet.sol
  • contracts/_openzeppelin/utils/Address.sol
  • contracts/testToken/Token9.sol
  • contracts/interface/IController.sol
  • contracts/OneTokenFactory.sol
  • contracts/_uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol
  • contracts/interface/IOneTokenFactory.sol
  • contracts/OneTokenProxy.sol
  • contracts/_openzeppelin/proxy/ProxyAdmin.sol
  • contracts/mintMaster/legacy/Incremental.sol
  • contracts/interface/IICHICommon.sol
  • contracts/oz_modified/ICHIInitializable.sol
  • contracts/_uniswap/v2-core/contracts/UniswapV2Factory.sol
  • contracts/testToken/DummyMintMaster.sol
  • contracts/testToken/CollateralToken.sol
  • contracts/mintMaster/MintMasterCommon.sol
  • contracts/testToken/Token18.sol
  • contracts/testToken/TestOracle.sol
  • contracts/controller/ControllerCommon.sol
  • contracts/_openzeppelin/math/SafeMath.sol
  • contracts/interface/IICHIOwnable.sol
  • contracts/_uniswap/v2-core/contracts/libraries/UQ112x112.sol
  • contracts/strategy/arbitrary/Arbitrary.sol
  • contracts/_openzeppelin/proxy/UpgradeableProxy.sol
  • contracts/testToken/TestMintMaster.sol
  • contracts/oz_modified/ICHIERC20Burnable.sol
  • contracts/interface/IOneTokenV1Base.sol
  • contracts/_openzeppelin/utils/Context.sol
  • contracts/oz_modified/ICHIOwnable.sol
  • contracts/_openzeppelin/proxy/Proxy.sol
  • contracts/_uniswap/v2-core/contracts/libraries/UniSafeMath.sol
  • contracts/interface/IMintMaster.sol
  • contracts/common/ICHICommon.sol
  • contracts/testToken/MemberToken.sol
  • contracts/interface/IStrategy.sol
  • contracts/_uniswap/lib/contracts/libraries/FullMath.sol
  • contracts/interface/IOracle.sol
  • contracts/common/ICHIModuleCommon.sol
  • contracts/interface/IModule.sol
  • contracts/OneTokenProxyAdmin.sol
  • contracts/testToken/TestController.sol
  • contracts/oracle/pegged/ICHIPeggedOracle.sol
  • contracts/interface/IOneTokenV1.sol
  • contracts/strategy/nullStrategy/NullStrategy.sol
  • contracts/interface/InterfaceCommon.sol
  • contracts/_uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol
  • contracts/_openzeppelin/token/ERC20/IERC20.sol
  • contracts/_uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol
  • contracts/testToken/SetTest.sol
  • contracts/_openzeppelin/proxy/TransparentUpgradeableProxy.sol
  • contracts/version/v1/OneTokenV1.sol
  • contracts/oz_modified/ICHIERC20.sol
  • contracts/_uniswap/v2-periphery/contracts/libraries/UniswapSafeMath.sol
  • contracts/_openzeppelin/token/ERC20/SafeERC20.sol
  • contracts/oracle/composite/ICHICompositeOracle.sol
  • contracts/_uniswap/lib/contracts/libraries/BitMath.sol
  • contracts/_uniswap/v2-core/contracts/UniswapV2Pair.sol
  • contracts/oracle/OracleCommon.sol
  • contracts/controller/null controller/NullController.sol
  • contracts/Migrations.sol
  • contracts/_openzeppelin/access/Ownable.sol
  • contracts/testToken/Token6.sol
  • contracts/version/v1/OneTokenV1Base.sol
  • contracts/strategy/StrategyCommon.sol
  • contracts/_uniswap/lib/contracts/libraries/FixedPoint.sol

Part of ICHI’s security record

ICHI
Audits1 audit by 1 firmLast audit Apr 2021, by Quantstamp.
Critical findingsNo open critical findingsIn 1 report.
Open ICHI’s security record

Security firm

Quantstamp

236 projects reviewed · 332 reports · latest Oct 2026

See Quantstamp’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