Tokemak

QuantstampFiles named in the report

Quantstamp reviewed Tokemak on 31 Aug 2021: 20 findings, 0 critical; 9 marked fixed, 10 acknowledged, 1 open.

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

Report hosted on certificate.quantstamp.com.

Trustblock does not review code.

Findings20

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

SeverityOpenAcknowledgedFixed
Critical000
High011
Medium010
Low188
High`_executeControllerCommand` Can be Used to Deploy or Withdraw Liquidity by AnyoneFixed

`_executeControllerCommand` is defined as a public function. This function carries a very dangerous logic, i.e., executing arbitrary transactions without any access control.

LowMissing Parameter ValidationFixed

The listed parameters are not validated properly: 1. `contracts/wallet/ZeroExTradeWallet.sol:32~33`: check newRouter and newManager against zero addresses 1. `contracts/wallet/ZeroExTradeWallet.sol:46~47`: check `signer` against zero 1. `contracts/controllers/SushiswapController.sol:25~26`: check router snd factory against zero 0. `contracts\manager\Manager.sol::_executeControllerCommand`, should check if `registeredControllers[transfer.controllerId]` is not zero. 0. `contracts\controllers\ZeroExController.sol::constructor`, should check if the input addresses are non-zeros. 0. `contracts\controllers\UniswapController.sol::constructor`, should check if the input addresses are non-zeros. 0. `contracts\pools\Pool.sol::initialize`, should check if the input addresses are non-zeros. 0. `contracts\pools\EthPool.sol::initialize`, should check if the input addresses are non-zeros.

LowPotential Precision Loss in the effectiveSecondsStakedFixed

Division takes place before multipliciation: ``` uint256 effectiveSecondsStaked = (secondsStaked.div(schedule.interval)).mul(schedule.interval); ``` This potentially leads to precision loss.

LowSchedules Cannot be ModifiedFixed

There is no possiblity to alter properties of a given schedule. It might be needed to set certain props, namely `isActive` and `isPublic`. Not being able to unset `isActive` seems to be a bigger issue. To stop deposits, the only possibilities would be **i)** to pause the contract (which would affects all schedules) or **ii)** remove the schedule of interest.

LowSome Functions do not Conform to Contract PausesFixed

The `withdraw` function in the stated contracts, unlike the deposit function, is not pausable. The same holds true for the `slash` function in the staking contract.

LowSushiswap funds are not eligible for SUSHI rewardFixed

The provided liquidity is not eligible for SUSHI rewards.

LowUnlimited Allowance for External ContractFixed

By calling the functions listed below, the allowance is set to a very large number. This could be used by external contracts that are not under admin team’s control to drain the contract, whenever the target becomes malicious, or being controlled by malicious users. 0. `contracts\controllers\SushiswapController.sol::_approve`. 0. `contracts\controllers\ZeroExController.sol::_approve`. 0. `contracts\controllers\BalancerController.sol::_approve`. 0. `contracts\controllers\UniswapController.sol::_approve`. 0. `contracts\controllers\ZeroExTradeWallet.sol::_approve`.

LowZeroExTradeWallet Accepts External Token Addresses and Triggers Untrusted CodeFixed

Both `deposit` and `withdraw` functions accept external addresses and trust them with calling transfer (safeTransfer) on them. Calling token methods on arbitrary addresses is a bad security practice. At the moment, only the manager can call these methods. Moreover, deposit does not check duplicates before adding tokens to the token list.

LowZeroExTradeWallet is Built Upon High Trust in RouterFixed

All the deposited tokens are approved with the maximum value to be pulled out by the `zeroExRouter` address.

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

  • contracts/interfaces/ILiquidityPool.sol
  • contracts/controllers/BalancerController.sol
  • contracts/interfaces/IWallet.sol
  • contracts/wallet/ZeroExTradeWallet.sol
  • contracts/manager/Manager.sol
  • contracts/pools/EthPool.sol
  • contracts/interfaces/IWETH.sol
  • contracts/pools/Pool.sol
  • contracts/rewards/Rewards.sol
  • contracts/controllers/SushiswapController.sol
  • contracts/interfaces/IStaking.sol
  • contracts/controllers/ZeroExController.sol
  • contracts/interfaces/ILiquidityEthPool.sol
  • contracts/interfaces/balancer/IBalancerRegistry.sol
  • contracts/token/Toke.sol
  • contracts/staking/Staking.sol
  • contracts/interfaces/IManager.sol
  • contracts/controllers/UniswapController.sol

Part of Tokemak’s security record

Tokemak
Audits6 audits by 2 firmsLast audit Mar 2025, by Hexens.
Critical findingsNo open critical findingsAcross the 6 reports, 2 critical findings were reported. Each is marked fixed by the firm that reported it.
Open Tokemak’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