Tokemak

QuantstampFiles named in the report

Quantstamp reviewed Tokemak on 29 Jul 2021: 10 findings, 0 critical; 4 marked fixed, 6 acknowledged; 1 more marked mitigated.

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.

SeverityOpenAcknowledgedFixedMitigated
Critical0000
High0110
Medium0100
Low0431

Marked Informational or Undetermined by the firm. Not counted as findings.

Informational`schedule.setup` Checks Always PassAcknowledged

Upon addition (`_addSchedule`) of schedules the setup property is set to true. The require statements in the `slash` and `depositFor` functions seem to be useless.

InformationalPrivileged Roles and OwnershipAcknowledged

Smart contracts will often have `owner` variables to designate the person with special privileges to make modifications to the smart contract. The owner can pause contracts and perform privileged operations. For instance, the owner can withdraw the diff of already withdrawn and initially vested tokens to the treasury. Users can lose funds if the owner account gets compromised or they go rogue.

InformationalSandwich Attacks Susceptibility in Sushiswap and Uniswap ControllersAcknowledged

> A common attack in DeFi is the sandwich attack. Upon observing a trade of asset X for asset Y, an attacker frontruns the victim trade by also buying asset Y, lets the victim execute the trade, and then backruns (executes after) the victim by trading back the amount gained in the first trade. Intuitively, one uses the knowledge that someone’s going to buy an asset, and that this trade will increase its price, to make a profit. The attacker’s plan is to buy this asset cheap, let the victim buy at an increased price, and then sell the received amount again at a higher price afterwards. In both stated contracts, `minAmountA` and `minAmountB` are provided in the `deploy` function. However, they are not checked after addLiquidity is called.

InformationalUnsafe Cycle Durations Can be SetAcknowledged

The `cycleDuration`, which is set in the `initialize` and `setCycleDuration` functions, can be set to an unsafe small value. Since miners can manipulate block numbers within a small range, the miners might be able to trigger the `completeRollover` earlier or later than the intended `cycleDuration`.

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

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

InformationalSushiswap funds are not eligible for SUSHI rewardFixed

The provided liquidity is not eligible for SUSHI rewards.

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

InformationalZeroExTradeWallet 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

240 projects reviewed · 338 reports · latest Nov 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