Nayms 2

QuantstampFiles named in the report

Quantstamp reviewed Nayms 2024 (Retainer) (Nayms 2) on 5 May 2023: 30 findings, 0 critical; 12 marked fixed, 16 acknowledged, 2 open.

No open critical findings
Open the reportOpen Nayms 2024 (Retainer)’s security record

Report hosted on certificate.quantstamp.com.

Trustblock does not review code.

Findings30

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

SeverityOpenAcknowledgedFixed
Critical000
High003
Medium024
Low2145
LowAllowance Double-Spend ExploitOpen

As it presently is constructed, the contract `ERC20Wrapper` is vulnerable to the [allowance double-spend exploit](https://github.com/comitylabs/openzeppelin-contracts/blob/6bd6b76d1156e20e45d1016f355d154141c7e5b9/contracts/token/ERC20/IERC20.sol#L43), as with other ERC20 tokens.

LowMissing Input ValidationOpen

It is important to validate inputs, even if they only come from trusted addresses, to avoid human error. The following functions do not have a proper validation of input parameters: 1. To enforce a maximum limit of `10000` on commission totals, add the line `require(s.tradingCommissionTotalBP <= LibConstants.BP_FACTOR, "commission total must be<=10000bp")`; 2. In `LibACL.updateRoleAssigner()` ensure that the `_assignerGroup` is actually present in the system; 3. `LibEntity._createSimplePolicy()`: the fact that `_stakeholders.roles.length == _stakeholders.entityIds.length` is not checked. The case where `number of roles > number of entityIds` would lead to an exception. However, the case `number of roles < number of entityIds` would let a simplePolicy be created with fewer assigned roles than the number of signing stakeholders. Also, as an extreme case, a policy can be created with 0 assigned roles and 0 stakeholders; 4. `LibEntity._createEntity()` does not check that the parameter `_entityAdmin` exists; 5. `LibEntity._validateSimplePolicyCreation()` does not check that the policy covers a minimum time (`maturationDate`); 6. `LibFeeRouter._updateTradingCommissionsBasisPoints()` does not check that the parameter `bp.tradingCommissionTotalBP` is within a certain minimum/maximum range (i.e. `bp.tradingCommissionTotalBP <= LibConstants.BP_FACTOR`); 7. `UserFacet.setEntity()` does not check that the parameter `_userId` is an existing user; 8. `GovernanceFacet.updateUpgradeExpiration()`: any `uint256` value from `0` to `max(uint256)` can be used; 9. `GovernanceFacet.cancelUpgrade()`: any upgrade can be canceled, even if it is expired or never existed. In that case, any typo in the parameter `id` would be uncaught; 10. `LibObject._enableObjectTokenization()`: an object can be tokenized with a `name == ""`; 11. `EntityFacet.enableEntityTokenization()`: the sysAdmin must make sure that the parameters `_name` and `_symbol` does not have any weird character that could create UX issues on the front-end; 12. `LibEntity._createSimplePolicy()`: the fact that the entity of the signing stakeholder is not the entity issuing the policy is not checked;

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

  • src/diamonds/shared/facets/DiamondLoupeFacet.sol
  • src/diamonds/nayms/libs/LibConstants.sol
  • src/diamonds/nayms/facets/ACLFacet.sol
  • src/diamonds/nayms/facets/EntityFacet.sol
  • src/diamonds/nayms/facets/SimplePolicyFacet.sol
  • src/diamonds/shared/facets/DiamondCutFacet.sol
  • src/diamonds/nayms/interfaces/IGovernanceFacet.sol
  • src/diamonds/nayms/AppStorage.sol
  • src/diamonds/shared/facets/PhasedDiamondCutFacet.sol
  • src/diamonds/nayms/interfaces/ISystemFacet.sol
  • src/diamonds/nayms/libs/LibTokenizedVaultIO.sol
  • src/diamonds/nayms/Nayms.sol
  • src/diamonds/nayms/libs/LibSimplePolicy.sol
  • src/diamonds/nayms/libs/LibEIP712.sol
  • src/diamonds/nayms/facets/TokenizedVaultFacet.sol
  • src/diamonds/nayms/libs/LibMarket.sol
  • src/diamonds/nayms/facets/GovernanceFacet.sol
  • src/diamonds/nayms/facets/MarketFacet.sol
  • src/diamonds/nayms/libs/LibAdmin.sol
  • src/diamonds/nayms/libs/LibEntity.sol
  • src/diamonds/nayms/INayms.sol
  • src/diamonds/nayms/interfaces/IEntityFacet.sol
  • src/diamonds/shared/interfaces/IDiamondCut.sol
  • src/diamonds/nayms/interfaces/ITokenizedVaultIOFacet.sol
  • src/diamonds/shared/libs/LibMeta.sol
  • src/diamonds/nayms/interfaces/ISimplePolicyFacet.sol
  • src/diamonds/nayms/InitDiamond.sol
  • src/diamonds/nayms/libs/LibHelpers.sol
  • src/diamonds/nayms/interfaces/IAdminFacet.sol
  • src/diamonds/shared/interfaces/IERC173.sol
  • src/diamonds/nayms/interfaces/FreeStructs.sol
  • src/diamonds/nayms/libs/LibNaymsToken.sol
  • src/diamonds/nayms/facets/NaymsTokenFacet.sol
  • src/diamonds/nayms/interfaces/IACLFacet.sol
  • src/utils/ReentrancyGuard.sol
  • src/diamonds/nayms/libs/LibObject.sol
  • src/diamonds/nayms/facets/UserFacet.sol
  • src/diamonds/nayms/interfaces/INaymsTokenFacet.sol
  • src/diamonds/shared/interfaces/IERC165.sol
  • src/diamonds/shared/facets/NaymsOwnershipFacet.sol
  • src/diamonds/shared/interfaces/IDiamondLoupe.sol
  • src/diamonds/nayms/facets/SystemFacet.sol
  • src/diamonds/shared/libs/LibDiamond.sol
  • src/diamonds/shared/facets/OwnershipFacet.sol
  • src/erc20/ERC20Wrapper.sol
  • src/diamonds/nayms/libs/LibTokenizedVault.sol
  • src/diamonds/nayms/facets/TokenizedVaultIOFacet.sol
  • src/erc20/IERC20.sol
  • src/diamonds/nayms/interfaces/IUserFacet.sol
  • src/diamonds/nayms/interfaces/ITokenizedVaultFacet.sol
  • src/diamonds/nayms/facets/AdminFacet.sol
  • src/diamonds/nayms/libs/LibFeeRouter.sol
  • src/diamonds/nayms/interfaces/CustomErrors.sol
  • src/diamonds/nayms/Modifiers.sol
  • src/diamonds/nayms/libs/LibACL.sol
  • src/diamonds/nayms/interfaces/IMarketFacet.sol
  • src/erc20/LibERC20.sol

Part of Nayms 2024 (Retainer)’s security record

Nayms 2024 (Retainer)
Audits3 audits by 1 firmLast audit May 2024, by Quantstamp.
Critical findingsNo open critical findingsAcross 3 reports.
Open Nayms 2024 (Retainer)’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