ClayStack

QuantstampFiles named in the report

Quantstamp reviewed ClayStack on 26 Sep 2022: 12 findings, 0 critical; 6 marked fixed, 6 acknowledged.

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

Report hosted on certificate.quantstamp.com.

Trustblock does not review code.

Findings12

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

SeverityOpenAcknowledgedFixed
Critical000
High000
Medium000
Low066
LowBlock Timestamp ManipulationAcknowledged

Projects may rely on block timestamps for various purposes. However, it's important to realize that miners individually set the timestamp of a block, and attackers may be able to manipulate timestamps for their own purposes. If a smart contract relies on a timestamp, it must take this into account.

LowFees May Be UninitializedAcknowledged

Fees are charged when users deposit, withdraw, instantly withdraw, or make an early claim on funds. However, the only fee guaranteed to be initialized is the deposit fee. If the remaining fees remain uninitialized for any transactions, the protocol may lose out on earnings.

LowReliance on `clayTunnel` to Be Working as ExpectedAcknowledged

The `ClayManager._exchangeCsToken()` for calculating how many MATIC can be exchanged from a certain amount of csMatic tokens. This procedure totally relies on the security, correctness, and stability of `clayTunnel.getFunds()`. An incorrect rate could lead to devastating consequences.

LowReliance on Off-Chain Component to Be Working as ExpectedAcknowledged

The `UserProxy` contract is responsible for completing the process of a batch order that is specified by `batchID` in polygon, using the functions below: 1. `UserProxy.deposit()` 2. `UserProxy.withdraw()` These functions are designed and expected to be called only once by the tunnel. The tunnel is expected to guard against replay attacks. However, we note that it is outside the scope of this audit.

LowTimelock Should Allow Adequate Time for Users to ExitAcknowledged

Some functions in `ClayManager` are restricted to the `TIMELOCK_ROLE` and `TIMELOCK_UPGRADES_ROLE`. This gives users time to exit before a potentially dangerous change is applied. However, with withdrawals potentially taking several days before they can be claimed, it is important that the timelock be configured such that users have adequate time to complete their exit if they choose to do so.

LowUpgradabilityAcknowledged

Many contracts within the project are upgradeable. While this is not a vulnerability, users should be aware that the behavior of the contracts could drastically change if the contracts are upgraded. Furthermore, new vulnerabilities not present during the audit could be introduced in upgraded versions of the contract, or if contract upgrade deployments are not done correctly.

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

  • src/lib/Merkle.sol
  • src/interfaces/IDepositManager.sol
  • src/lib/ExitPayloadReader.sol
  • src/TimeLock.sol
  • src/interfaces/IClayBase.sol
  • src/RoleManager.sol
  • src/tunnel/FxBaseRootTunnel.sol
  • src/tunnel/FxBaseChildTunnel.sol
  • src/lib/RLPReader.sol
  • src/interfaces/IRoleManager.sol
  • src/interfaces/IClaimVault.sol
  • src/interfaces/IChildToken.sol
  • src/interfaces/IERC20Predicate.sol
  • src/interfaces/IClayMain.sol
  • src/interfaces/IRootChainManager.sol
  • src/UserProxy.sol
  • src/interfaces/IClayTunnel.sol
  • src/ClaimVault.sol
  • src/interfaces/IClayManager.sol
  • src/CsToken.sol
  • src/interfaces/IWETH9.sol
  • src/lib/MerklePatriciaProof.sol
  • src/interfaces/ICSToken.sol
  • src/interfaces/IFxRoot.sol
  • src/ClayManager.sol

Part of ClayStack’s security record

ClayStack
Audits4 audits by 3 firmsLast audit Jan 2024, by Nethermind Security.
Critical findingsNo open critical findingsAcross the 4 reports, 1 critical finding was reported. It is marked fixed by the firm that reported it.
Open ClayStack’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