CertiK reviewed FlokiFi on 14 Mar 2023: 25 findings, 0 critical; 17 marked fixed, 8 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 3 | 0 | 4 |
| Medium | 0 | 0 | 2 |
| Low | 5 | 0 | 11 |
In the contract `PaymentModuleV1`, the role `DEFAULT_ADMIN_ROLE` has authority over the following functions: - function setLPTokenProcessor(), to set the `lpTokenProcessor`. - function setPricingModule(), to set the `pricingModule`. - function setTreasury(), to set the `treasury`. In the contract `LPTokenProcessorV1`, the role `DEFAULT_ADMIN_ROLE` has authority over the following functions: - function setSellDelay(), to set the `_sellDelay`. In the contract `PricingModuleV1`, the role `DEFAULT_ADMIN_ROLE` has authority over the following functions: - function setLPTokenProcessor(), to set the `lpTokenProcessor`. - function setTokenPrice(), to set the `TOKEN_PRICE`. - function setVestedTokenPrice(), to set the `VESTED_TOKEN_PRICE`. - function setLPBasisPoints(), to set the `LP_TOKEN_BASIS_POINTS`. Any compromise to the `DEFAULT_ADMIN_ROLE` account may allow a hacker to take advantage of this authority.
In the contract `LPTokenProcessorV1`, the role `LP_ADMIN_ROLE` has authority over the following functions: - function adminWithdraw(), to withdraw any amount of the ETHs and tokens in the contract to the `LP_ADMIN_ROLE`. - function setMaxSellBatchSize(), to set the `_maxSellBatchSize`. Any compromise to the `LP_ADMIN_ROLE` account may allow a hacker to take advantage of this authority.
In the contract `VaultFactory`, the role `owner` has authority over the following functions: - function setKeyAddress(), to set the `keyNFT`. - function updatePaymentModule(), to set the `paymentModule`. Any compromise to the `owner` account may allow a hacker to take advantage of this authority.
In this project, investors could create vaults and deposit ERC20, ERC721, or ERC1155 assets in the `VaultFactory` contract, fees would be charged and these assets would be locked for a period of time, however, it is still unclear how the investors would profit from this project, and we would like the client to provide with more information about it.
A sandwich attack might happen when an attacker observes a transaction swapping tokens or adding liquidity without setting restrictions on slippage or minimum output amount. The attacker can manipulate the exchange rate by frontrunning (before the transaction being attacked) a transaction to purchase one of the assets and make profits by back running (after the transaction is attacked) a transaction to sell the asset. The following functions are called without setting restrictions on slippage or minimum output amount, so transactions triggering these functions are vulnerable to sandwich attacks, especially when the input amount is large: - `router.removeLiquidity()` - `router.swapExactTokensForETH()`
The contract is serving as the underlying entity to interact with one or more third-party protocols. The scope of the audit treats third-party entities as black boxes and assumes their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. ```solidity=20 IUniswapV2Router01 public router; ``` - The contract `LPTokenProcessorV1` interacts with third-party contract with `IUniswapV2Router01` interface via `router`.
There are several unknown implementations in `PricingModuleV1` and `Vault`. - gemstoneNFT.tokenOfOwnerByIndex - genesisNFT.tokenOfOwnerByIndex - vaultKeyContract.ownerOf The scope of the audit treats 3rd party entities as black boxes and assumes their functional correctness. However, in the real world, 3rd parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of 3rd parties can possibly create severe impacts.
The return value of an external call is not stored in a local or state variable. ```solidity=134 lpToken.approve(address(router), lpBalance); ``` --- ```solidity=137 router.removeLiquidityETH( lpToken.token1(), lpBalance, 0, 0, address(this), block.timestamp ); ``` --- ```solidity=148 router.removeLiquidityETH( lpToken.token0(), lpBalance, 0, 0, address(this), block.timestamp ); ``` --- ```solidity=159 router.removeLiquidity( lpToken.token0(), lpToken.token1(), lpBalance, 0, 0, address(this), block.timestamp ); ``` --- ```solidity=182 token.approve(address(router), tokenBalance); ``` --- ```solidity=183 try router.swapExactTokensForETH( tokenBalance, 0, path, address(this), block.timestamp ) returns (uint256[] memory /* amounts */) { } catch (bytes memory /* lowLevelData */) { } ``` --- ```solidity=179 lpToken.approve(address(router), lpTokenAmount); ``` --- ```solidity=185 router.removeLiquidityETH(lpToken.token1(), lpTokenAmount, 0, 0, address(this), block.timestamp); ``` --- ```solidity=195 router.removeLiquidityETH(lpToken.token0(), lpTokenAmount, 0, 0, address(this), block.timestamp); ``` --- ```solidity=205 router.removeLiquidity( lpToken.token0(), lpToken.token1(), lpTokenAmount, 0, 0, address(this), block.timestamp ); ``` --- ```solidity=246 token.approve(address(router), sourceAmount); ``` --- ```solidity=248 try router.swapExactTokensForETH(sourceAmount, 0, path, address(this), block.timestamp) returns ( uint256[] memory /* amounts */ ) {} catch ( bytes memory /* lowLevelData */ ) { return false; } ``` --- ```solidity=264 try router.swapExactETHForTokens{ value: ETHGained }(0, path, receiver, block.timestamp) returns ( uint256[] memory /* amounts */ ) {} catch ( bytes memory /* lowLevelData */ ) { return false; } ``` --- ```solidity=171 try gemstoneNFT.tokenOfOwnerByIndex(user, 0) returns (uint256) { return true; } catch ( bytes memory /* lowLevelData */ ) {} ``` --- ```solidity=177 try genesisNFT.tokenOfOwnerByIndex(user, 0) returns (uint256) { return true; } catch ( bytes memory /* lowLevelData */ ) {} ```
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (16)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’s auditsSomething 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