Naos-Formation

QuantstampFiles named in the report

Quantstamp reviewed NAOS (Naos-Formation) on 28 May 2021: 16 findings, 0 critical; 12 marked fixed, 3 acknowledged, 1 open.

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

Report hosted on certificate.quantstamp.com.

Trustblock does not review code.

Findings16

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

SeverityOpenAcknowledgedFixed
Critical000
High000
Medium111
Low0211
MediumOracle price could be staleFixed

`Formation.sol`, `L661`: the price fetching function Chainlink API (`latestAnswer()`) has been declared deprecated by Chainlink and may be outdated. Furthermore, `latestAnswer()` was used but its return value `updatedAt` and `answeredInRound` are not checked, and therefore the data could be arbitrarily old.

Low`forceTransmute` does not check if `msg.sender` is a new userFixed

A fresh address could invoke `forceTransmute()`, in which case the bookkeeping handled by `checkIfNewUser()` will be incorrect.

Low`IsHealthy()` does not follow the spec completelyFixed

The documentation states that "A CDP is healthy if its collateralization ratio is greater than the global collateralization limit.". However, in `L59` of `CDP.sol`, it returns true if the ratio is equal as well.

Low`YearnVaultAdapter.deposit` has no access-controlFixed

If a user accidentally deposits to this contract instead of the expected `Formation` contract, they will not be credited for their funds.

LowDefault `flushActivator` amount depends on token decimalsFixed

The `constructor` sets `flushActivator = 100000 ether` with the added comment "change for non 18 digit tokens". It is not clear which tokens will be used, but if their decimal values are significantly different than 18, this amount will be too small or large.

LowGas-usage for-loop concernsFixed

1. The function `MultiSigWallet.getTransactionIds` iterates over the entire transaction history on L384, even though only transaction with indices in the range `[from, to)` are under consideration. If the wallet has a long transaction history, this may cause an unnecessary amount of storage load (`SLOAD`) operations, and the function may fail due to gas limits. Although the function is declared `view`, `web3` clients may not execute functions beyond the gas-limit, and external contracts may try to invoke the function. 2. `StakingPools._updatePools` could fail if too many pools are added.

LowIntended revert not present in `flushActiveVault()`Fixed

`Formation.sol`, `L440` states that "This function reverts if an emergency exit is active.". The intended revert is not present. Considering this is present for emergency, the lack of this revert may allow the attacker to forcefully push funds into the external protocol. If the external protocol was vulnerable and under attack, this exposes the funds in Formation to the attack as well.

LowTimeToken contract does not seem to be usedFixed

The TimeToken contract does not seem to be used in the system. It is also not present in the tests.

LowUnchecked function argumentsFixed

Some arguments in functions are not checked against zero. This leaves space for human-error and allows the arguments to be zero, which typically would simply revert, but in some cases it would result in transferring tokens to the `0x0` address and burning them. 1. `StakingPools.constructor` does not check that `_reward` is non-zero. 2. `StakingPools._token` does not check that `_token` is non-zero. 3. `Transmuter.constructor` does not check that `_NToken` and `_Token` are non-zero. 4. `Transmuter.setTransmutationPeriod` does not check that `newTransmutationPeriod` is non-zero. 5. `YearnVaultAdapter.constructor` should check that `_vault` and `_admin` are non-zero. 6. `Formation.constructor` should check that `_token` and `_xtoken` are non-zero.

LowUnlocked PragmaFixed

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".

Show 2 more
LowUnnecessary `flush()`Fixed

The purpose of `flush()` is to push the funds from `Formation` to the external protocol. Thus, it is unclear why `flush()` is activated in `withdraw()` when the specified `amount` is higher then the predefined threshold. When users withdraw more, the action tends to empty the Formation contract and there is no need to activate `flush()` at all.

LowUsing experimental ABIEncoderV2Fixed

The contracts declare the experimental feature ABIEnconderV2. As it is an experimental feature, it is more likely to include unknown bugs in the implementation.

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

  • contracts/interfaces/ICurveMetaFactory.sol
  • contracts/interfaces/IERC20Burnable.sol
  • contracts/interfaces/IYearnController.sol
  • contracts/interfaces/IMintableERC20.sol
  • contracts/interfaces/ITransmuter.sol
  • contracts/interfaces/IyVaultV2.sol
  • contracts/mocks/YearnVaultMock.sol
  • contracts/Transmuter.sol
  • contracts/MultiSigWalletWithTimelock.sol
  • contracts/StakingPools.sol
  • contracts/libraries/formation/CDP.sol
  • contracts/adapters/YearnVaultAdapter.sol
  • contracts/mocks/VaultAdapterMock.sol
  • contracts/NAOSToken.sol
  • contracts/mocks/ERC20Mock.sol
  • contracts/interfaces/IDetailedERC20.sol
  • contracts/libraries/pools/Stake.sol
  • contracts/MultiSigWallet.sol
  • contracts/libraries/pools/Pool.sol
  • contracts/NToken.sol
  • contracts/interfaces/IChainlink.sol
  • contracts/Formation.sol
  • contracts/libraries/formation/Vault.sol
  • contracts/interfaces/IYearnVault.sol
  • contracts/mocks/YearnControllerMock.sol
  • contracts/interfaces/IVaultAdapter.sol
  • contracts/libraries/FixedPointMath.sol

Part of NAOS’s security record

NAOS
Audits2 audits by 1 firmLast audit Nov 2021, by Quantstamp.
Critical findingsNo open critical findingsAcross 2 reports.
Open NAOS’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