Quantstamp reviewed ClayStack on 26 Sep 2022: 12 findings, 0 critical; 6 marked fixed, 6 acknowledged.
Report hosted on certificate.quantstamp.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 | 0 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 0 | 6 | 6 |
`ClayManager` is missing a call to `__UUPSUpgradeable_init()` in the `initialize()` function. Though the function may be empty, it is important to call the initializer in case this changes in future version upgrades.
Some functions do not validate their inputs, which can result in unexpected behavior by the contracts. A non-exhaustive list includes: * `ClayManager.initialize()`: Validate that `_csToken` is a non-zero address. * `ClayManager._claim()`: Validate that `claimVault` is a non-zero address. * `ClayManager.earlyClaim()`: * Validate that order exists. * Validate that `claimVault` is a non-zero address. * Validate that the order cannot be claimed through ordinary means.
Certain contracts have state variables, e.g. `TIMELOCK_UPGRADES_ROLE`, which provide certain addresses with privileged roles. Such roles may pose a risk to end-users. The `ClayManager` contract contains the following privileged roles: * `onlyProxy` modifier-guarded functions * `initialize()` -- initialize the contract's variables post-deployment. * `upgradeTo()` -- upgrade the implementation of the proxy to a new contract. * `onlyRole(CS_SERVICE_ROLE)` modifier-guarded functions * `setBridgeFee()` -- set the fee to manually trigger the bridge by user in matic * `setBridgeRequirements()` -- set the days and amounts required for bridge transfers * `setMinClaimDays()` -- set the minimum number of days to claim tokens when netted locally * `pause()` -- pause the contract * `unpause()` -- unpause the contract * `onlyRole(TIMELOCK_UPGRADES_ROLE)` modifier-guarded functions * `setTreasury()` -- set the treasury wallet * `setClaimVault()` -- set the vault to which MATIC tokens will be sent * `upgradeTo()` -- upgrade the implementation of the proxy * `_authorizeUpgrade()` -- require a certain sender to be used (when upgrading the implementation) The `CsToken` contract contains the following privileged roles: * `onlyClayMain` modifier-guarded functions * `mint()` -- mints tokens to an address, increasing the total supply * `burn()` -- burn an amount of tokens from an address, reducing the total supply The `UserProxy` contract contains the following privileged roles: * `onlyProxy` modifier-guarded functions * `initialize()` -- initialize the contract's variables post-deployment. * `upgradeTo()` -- upgrade the implementation of the proxy to a new contract. * `onlyRole(TIMELOCK_ROLE)` modifier-guarded functions * `processInsurance()` -- process insurance towards ClayMatic donation and fees * `onlyRole(TIMELOCK_UPGRADES_ROLE)` modifier-guarded functions * `setClaimVault()` -- sets the vault to which matic tokens will be sent * `setTreasury()` -- set the treasury wallet * `upgradeTo()` -- upgrade the implementation of the proxy * `_authorizeUpgrade()` -- require a certain sender to be used (when upgrading the implementation) * `onlyRole(CS_SERVICE_ROLE)` modifier-guarded functions * `pause()` -- pause the contract * `unpause()` -- unpause the contract The `ClaimVault` contract contains the following privileged roles: * `claimFunds()` requires the sender to be `clayManager`.
The `ClayManager` contract is responsible for completing the process of a batch order that is specified by `batchID` in polygon, using `ClayManager._processMessageFromRoot()`. This function is designed and expected to be called only once. However, these functions have no protection against replay attacks. Though `_processMessageFromRoot()` prevents the same `_stateId` from being used twice, it does not prevent the same `_batchId` from being passed into `_registerClaimProceeded()`. `_registerClaimProceeded()` being executed more than once for a `_batchId` is an unexpected condition and could cause negative consequences to the platform.
Most functions will return a `true` or `false` value upon success. It is important to ensure that every necessary function is checked. `UserProxy.deposit()` does not check the return value of its call to `clayMatic.deposit(amount)`.
Every Solidity file specifies in the header a version number of the format `pragma solidity (^)0.8.*`. The caret (`^`) before the version number implies an unlocked pragma, meaning that the compiler will use the specified version _and above_, hence the term "unlocked".
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (25)
236 projects reviewed · 332 reports · latest Oct 2026
See Quantstamp’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