DECA

CertiKFiles named in the report

CertiK reviewed Fastex (DECA) on 18 Jan 2024: 29 findings, 0 critical; 23 marked fixed, 6 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings29

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

SeverityOpenAcknowledgedFixed
Critical000
High202
Medium104
Low3017
HighCentralization Related RisksOpen

In the contract `Casino` the role `OWNER_ROLE` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/fa9f9b3bfd2049c3a8c63d796f0da50d/diagrams/centralization_Casino-Casino-OWNER_ROLE.svg) Any compromise to the `OWNER_ROLE` account may allow the hacker to take advantage of this authority and - Withdraw owner profit to arbitrary addresses - Migrate to a new fabric contract - Withdraw instantly from player channels - Add/Set available games - Lock/Unlock FastChannel and partner - Transfer `OWNER_ROLE` to other address In the contract `FastChannelV3Fabric` the role `CasinoSigner` has authority over the following functions: - serverStep() - updateStateAsUser() - updateGameStateAsUser() - updateStateAsServer() Any compromise to the `CasinoSigner` account may allow the hacker to take advantage of this authority and modify the game states inside of the fabric contract. In the contract `BaseGame` the role `Owner` has authority over the following functions: - setBetProperties() Any compromise to the `Owner` account may allow the hacker to take advantage of this authority and modify the `minBet`, `maxBet` and `maxWin`.

HighIneffective Signature DesignOpen

The functions `updateStateAsServer()` and `updateGameStateAsServer()` should only be accessible to the backend server according to their naming. While in the current implementation, these two functions enable the player to choose the signer of the signature, who can create arbitrary messages. For instance, the signer could collude with the channel player and sign an incorrect `balanceChange_`, allowing the player channel to receive more assets from the casino contracts than intended through the function `_changeBalanceByFC()`. Besides, the signer can manipulate the internal game states using the `updateGameStateAsServer()` function, which could potentially facilitate cheating. For instance, they could increase the `freeSpinStateIndex` to obtain additional free spin opportunities. ```solidity=267 function updateStateAsServer( address channelAddress_, uint256[] memory gameNonces_, int256 balanceChange_, uint32 newNonce_, bytes memory sSign_, address signerAddress_, bytes memory uSign_) public { require(recoverSigner(signerAddress_, uSign_) == V3Channels[channelAddress_].player, 'Error: Wrong signature for setting signer'); require(V3Channels[channelAddress_].nonce + NONCE_JUMP <= newNonce_, 'Error: New nonce should be higher than existing one'); require(recoverSigner(channelAddress_, gameNonces_, balanceChange_, newNonce_, sSign_) == signerAddress_, 'Error: Wrong signature'); V3Channels[channelAddress_].nonce = newNonce_; V3Channels[channelAddress_].nonceList = gameNonces_; _changeBalanceByFC(channelAddress_, balanceChange_); emit ServerUpdatedState(channelAddress_, balanceChange_, newNonce_); } ```

MediumPotential risks in `withdraw()` functionOpen

The current withdraw function provides a 3-hour window (defined by FRZ_HRS) for the casino contract to update its internal states. We would like to understand if it's possible for the casino to fail to update the states within this timeframe, potentially allowing users to withdraw an incorrect amount of assets from the channel.

LowMissing Emit EventsOpen

There should always be events emitted in the sensitive functions that are controlled by centralization roles.

LowMissing Unit-test FileOpen

We did not find any unit test files, and there is no `test` folder in the project. ``` js npm test ./test/[fileName].js. Will test all functions in that file ```

LowOut of Scope DependencyOpen

Contracts in this project are serving as the underlying entities to interact with the backend `Casino server` and privileged role `signer`. The scope of the audit treats out-of-scope entities as black boxes and assumes their functional correctness. However, in the real world, these entities can be compromised and this may lead to lost or stolen assets.

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

  • contracts/games/BaseGame.sol
  • contracts/games/slots/ChangingReelsFreeSpinScatterWildCard.sol
  • contracts/games/slots/FreeSpin.sol
  • contracts/games/slots/FlamingFruits.sol
  • contracts/games/slots/LuckyBell20.sol
  • contracts/games/slots/Double.sol
  • contracts/games/HiLo.sol
  • contracts/games/slots/SlotLibrary.sol
  • contracts/games/slots/UltraHot.sol
  • contracts/games/slots/MagicTreasuresOfEgypt.sol
  • contracts/games/slots/Spin.sol
  • contracts/games/videoPokers/JacksOrBetter.sol
  • contracts/games/slots/BlazingHot.sol
  • contracts/FastChannelV3.sol
  • contracts/games/videoPokers/VideoPoker.sol
  • contracts/games/videoPokers/AllAmerican.sol
  • contracts/games/videoPokers/TensOrBetter.sol
  • contracts/games/slots/DiamondRush.sol
  • contracts/FastChannelV3Fabric.sol
  • contracts/games/slots/Wheel.sol
  • contracts/games/videoPokers/PokerHandUtils.sol
  • contracts/games/slots/DiamondFlash.sol
  • contracts/games/slots/BaseSlot.sol
  • contracts/games/slots/LosApaches.sol
  • contracts/games/slots/Bonus.sol
  • contracts/games/Ogwil.sol
  • contracts/Casino.sol
  • contracts/games/videoPokers/BonusPoker.sol
  • contracts/games/videoPokers/DoubleDoubleBonus.sol

Part of Fastex’s security record

Fastex
Audits4 audits by 2 firmsLast audit Jan 2024, by CertiK.
Critical findingsNo open critical findingsAcross the 4 reports, 1 critical finding was reported. It is marked fixed by the firm that reported it.
Open Fastex’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

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