PlayDapp audit reports

Ethereum, Polygon (POS)playdapp.comGitHub

PlayDapp has 2 public audit reports from CertiK; the latest is CertiK, 22 Jul 2024; no critical findings reported.

Critical findings
No open critical findings
Across 2 reports.
Open the latest report
Your label, live
Get the label for your site

Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.

Open findings across every firm38

Statuses are the security firms’ own

38 findings are still open or acknowledged in the firms’ reports: 4 high, 3 medium, 31 low (34 open, 4 acknowledged).

High
4
Medium
3
Low
31
  • High Acknowledged

    Centralization Related Risks

    PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗

  • High Open

    Centralization Risks

    PlayDapp - Audit · CertiK · 17 Feb 2024 · Report ↗

  • High Open

    Initial Token Distribution

    PlayDapp - Audit · CertiK · 17 Feb 2024 · Report ↗

  • High Open

    Pausing Centralization Risks

    PlayDapp - Audit · CertiK · 17 Feb 2024 · Report ↗

  • Medium Acknowledged

    Deposit Record May Not Match Data

    PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗

  • Medium Acknowledged

    Potential Issues If `lenDestinationRecipientAddre

    PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗

  • Medium Acknowledged

    Users Are Allowed To Submit Data In Any Form

    PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗

  • Low Open

    `_bridgeAddress` Must Be Set By Inheriting Contra

    PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗

  • Low Open

    `_destinationChainID` May Be Confused With EVM `C

    PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗

  • Low Open

    `burnable` Cannot Be Reversed

    PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗

All 38 open and acknowledged findings

Audits2

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
PlayDapp - Audit 2Security firm: CertiKDate: Scope: Files listedNone openFindings: 1 high · 6 medium · 39 low
11 fixed · 4 acknowledged · 31 open
skynet.certik.com ↗
PlayDapp - AuditSecurity firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 3 high · 1 low
1 fixed · 3 open
skynet.certik.com ↗

Findings50

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

SeverityOpenAcknowledgedFixed
Critical000
High310
Medium033
Low3109
HighCentralization RisksPlayDapp - Audit · CertiK · 17 Feb 2024Open

In the contract `Ownable` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-cc19-e4699f00-803f-cfc01d64dbfe/diagrams/centralization_Ownable-Ownable-_owner.svg) In the contract `AccessControl` the role `_role` has authority over the functions shown in the diagram below. Any compromise to the `_role` account may allow the hacker to take advantage of this authority, grant or revoke roles to any users. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-cc19-e4699f00-803f-cfc01d64dbfe/diagrams/centralization_AccessControl-AccessControl-_role.svg) In the contract `AccessControl` the role `account` has authority over the functions shown in the diagram below. Any compromise to the `account` account may allow the hacker to take advantage of this authority. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-cc19-e4699f00-803f-cfc01d64dbfe/diagrams/centralization_AccessControl-AccessControl-account.svg) In the contract `PDA` the role `PAUSER_ROLE` has authority over the functions shown in the diagram below. Any compromise to the `PAUSER_ROLE` account may allow the hacker to take advantage of this authority, pause and unpause the contract. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-cc19-e4699f00-803f-cfc01d64dbfe/diagrams/centralization_PDA-PDA-PAUSER_ROLE.svg) In the contract `PDA` the role `SNAPSHOT_ROLE` has authority over the functions shown in the diagram below. Any compromise to the `SNAPSHOT_ROLE` account may allow the hacker to take advantage of this authority and create snapshots. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-cc19-e4699f00-803f-cfc01d64dbfe/diagrams/centralization_PDA-PDA-SNAPSHOT_ROLE.svg) In the contract `PDA` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and grant roles to other users. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-cc19-e4699f00-803f-cfc01d64dbfe/diagrams/centralization_PDA-PDA-_owner.svg)

Open the report
HighInitial Token DistributionPlayDapp - Audit · CertiK · 17 Feb 2024Open

All of the `PDA` tokens are sent to the `_owner`. This is a centralization risk because the `_owner` can distribute tokens without obtaining the consensus of the community. Any compromise to the `_owner` address may allow a hacker to steal and sell tokens on the market, resulting in severe damage to the project.

Open the report
HighPausing Centralization RisksPlayDapp - Audit · CertiK · 17 Feb 2024Open

In the contract `PDA.sol`, the `PAUSER_ROLE` has the authority to update the status of the `_paused` and further pause/resume the functionality of the token transfers. Any compromise to the private key of the `PAUSER_ROLE` may allow hackers to take advantage of this authority and allow/prevent user access to token transfer functionalities.

Open the report
Low`_bridgeAddress` Must Be Set By Inheriting ContraPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The variable `_bridgeAddress` is used in the `_onlyBridge` modifier, which is used with functions in the `HandlerHelpers` contract. However, it is not set in the constructor and does not have a setter function. Thus, it must be set by any contracts that inherit it.

Open the report
Low`_destinationChainID` May Be Confused With EVM `CPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The `_destinationChainID` is a unique identifier for a chain. The comments state that it is the `ChainID`, however, for example, a `CHAIN_ID` on an EVM chain can exceed the `type(uint8).max` so that this identifier must represent a number the protocol associates to each chain it supports.

Open the report
Low`burnable` Cannot Be ReversedPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

If a token is set to be burnable on accident or the token revokes the ability for the bridge to mint/burn, then there is no functionality to reverse the operation. As such, the token will not be able to be used with the same handler contract. If the token is to be supported then it may require the deployment of a new handler.

Open the report
LowChange `uint` to `uint256`PlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The `uint` type is an alias for `uint256`. It is recommended to use `uint256` instead of `uint` for better readability.

Open the report
LowCommented Out CodePlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

There is functionality that is commented out throughout the codebase. We assume that this code is to be omitted, however, it may accidentally be left commented out.

Open the report
LowConsider Removing Recipient From Locking FunctionPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

When locking ERC20 or ERC721 tokens, they should always be transferred to the safe, which is `address(this)`. As such the `recipient` parameter can be removed and the logic can be hardcoded to send tokens to `address(this)`.

Open the report
LowDiscussion On Daily And Transactional LimitsPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The relayers provide a centralization risk, that if a `_relayerThreshold` of the relayers are compromised, then all funds can be stolen. A recommended mitigation is to implement transactional and daily limits for each token. These can be used to prevent the loss of all funds in such a scenario and can be set individually for each token.

Open the report
Show 10 more
LowFunction Can Be Modified With `pure` Or `view`PlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

`GenericHandler._onlyBridge()` and `HandlerHelpers._onlyBridge()` do not require modifying the contract state, nor do they need to receive Ether. However, these functions are not labeled with `pure` or `view` modifiers.

Open the report
LowLogic May Be Simplified Depending On Intended SupPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

Can you please provide the intended chains that you plan to support? In particular, do you plan on supporting chains whose addresses utilize different numbers of bytes? If the bridge is designed to only interact with specific chains, then some logic may be able to be simplified.

Open the report
LowMissing ChecksPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

### HandlerHelpers - The function `setResource()` does not check that `_resourceIDToContractAddress[resourceID]` and `_contractAddressToResourceID[contractAddress]` are not already set. - The function `setBurnable()` does not check if `_burnList[contractAddress]` is already true. ### GenericHandler - The function `setGenericResource()` does not check that `_resourceIDToContractAddress[resourceID]`, `_contractAddressToResourceID[contractAddress]`, ` _contractAddressToDepositFunctionSignature[contractAddress]`, and `_contractAddressToExecuteFunctionSignature[contractAddress]` are not already set. - The functions `deposit()` and `executeProposal()` make a low level call to the `contractAddress`. While these are set via privileged roles, these contracts may self destructor or be set accidentally to EOA's, in which case the low level call will return true without executing any functionality. We recommend adding a check that the `contractAddress` is a contract. ### GenericERC20NativeHandler - The function `setGenericResource()` does not check that `_resourceIDToContractAddress[resourceID]`, `_contractAddressToResourceID[contractAddress]`, ` _contractAddressToDepositFunctionSignature[contractAddress]`, and `_contractAddressToExecuteFunctionSignature[contractAddress]` are not already set. - The functions `deposit()`, `depositWithPermit()`, and `executeProposal()` make a low level call to the `contractAddress`. While these are set via privileged roles, these contracts may self destructor or be set accidentally to EOA's, in which case the low level call will return true without executing any functionality. We recommend adding a check that the `contractAddress` is a contract. ### Bridge - The function `adminChangeRelayerThreshold()` does not check that the input `newThreshold` is greater than or equal to some minimum. In particular, the threshold should always be at least one, as a proposal must be proposed (which yields one yes vote). - The function `adminSetTrustedHandlers()` does not check if the input `_handlerAddress` already has the role. - The function `adminChangeFee()` does not check that the input `newFee` is within some bounds. In particular, if a fee should always be charged the input should be greater than zero and the fee may not want to exceed a theoretical maximum amount. - In the `Bridge.executeProposal()` function, the potential expiration of a proposal is not checked. If `proposal._status == ProposalStatus.Passed` and `block.number - proposal._proposedBlock > _expiry`. A relayer can decide to execute a proposal or cancel it.

Open the report
LowMissing Emit EventsPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

There should always be events emitted in any function that updates an important state variable.

Open the report
LowMissing License IdentifiersPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The linked files do not include an SPDX license identifier. We recommend adding a license identifier to clarify how users are able to use the source code. See [https://spdx.org/licenses/](https://spdx.org/licenses/) for details.

Open the report
LowMissing/Incomplete NatSpecPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

Throughout the codebase there are NatSpec comments included for some functions but not all. Throughout the handler contracts, the `resourceID` is a parameter, but not included in the NatSpec comments.

Open the report
LowOptimization in `Bridge.executeProposal()`PlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

In `Bridge.executeProposal()`, the following checks: ```solidity=505 require(proposal._status != ProposalStatus.Inactive, "proposal is not active"); require(proposal._status == ProposalStatus.Passed, "proposal already transferred"); ``` are both checking the status of a proposal, since a proposal cannot be `Inactive` and `Passed` the first **require** statement is redundant. Moreover, a proposal not passed can be `Inactive`, `Active`, `Executed` or `Cancelled`, therefore the error message `"proposal already transferred"` is not always accurate.

Open the report
LowOutdated Openzeppelin VersionPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The contract `ERC721MinterBurnerPauser` utilizes Openzeppelin's library v3.0.0, which is outdated. Outdated versions are not as well maintained and miss the new optimizations, features, and security enhancements included in the more recent versions version.

Open the report
LowOutdated Solidity VersionPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The highlighted files use solidity version 0.6.4. Outdated versions might contain security issues and miss the new features and security enhancements included in the recent solidity version.

Open the report
LowPermit Parameter DecodingPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The `uint8 v`, `bytes32 r`, and `bytes32 s` parameters for permit functions are encoded in the input data for deposits. However, when `abi.decode()` is used, they are first decoded as `uint256` values and then recast as their respective types when used in the external call to `permit()`. Since `abi.encode()` pads parameters to 32 bytes, this should not create any issues, however, it decreases the readability of the codebase when they can be directly decoded to their respective types.

Open the report
Show 10 more
LowPotential Underflow/OverflowPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

In `Bridge.adminRemoveRelayer()`, `_totalRelayers` is decremented. Due to potential inconsistency between `_totalRelayers` and the real number of relayers, an underflow can occur.

Open the report
LowRedundant CheckPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

In the contract `Bridge.sol`, when a proposal is created in `voteProposal()`, `dataHash` is provided as input, and the `proposal` is then created as: ```solidity=427 _proposals[nonceAndID][dataHash] = Proposal({ _resourceID : resourceID, _dataHash : dataHash, _yesVotes : new address[](1), _noVotes : new address[](0), _status : ProposalStatus.Active, _proposedBlock : block.number }); ``` Therefore everytime the following check is made: ```solidity require(dataHash == proposal._dataHash, "datahash mismatch"); ``` it will pass because `dataHash == proposal._dataHash` is always true.

Open the report
LowSafeMath Is UnusedPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The contracts `ERC721Safe` and `ERC20Safe` use `SafeMath` for `uint256`. However, no SafeMath operations are utilized in the contract.

Open the report
LowSafeMath Used For OZ Library And ContractPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The contract `SafeMath` is a stripped down version of OpenZeppelin's `SafeMath` library, that is used in the `Bridge.sol` file. However, the `SafeMath` library is also imported and used in other contracts. As they have the same name, this can cause confusion.

Open the report
LowSolidity Style Guide Is Not FollowedPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The codebase does not follow the [Solidity Style Guide](https://docs.soliditylang.org/en/latest/style-guide.html#). For example variables and functions to not follow the naming conventions for non-external facing variables and functions. In addition, the order of functions is not followed where view and pure functions should be put in the end of a grouping.

Open the report
LowSpecific Imports Are Not UsedPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

Specific imports are recommended to be used to avoid unpredictable pollution of the namespace. For example: import {A, B, C} from "X";

Open the report
LowThe Surplus Native Tokens Are Not ReturnedPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

In the `payable` functions `Bridge.deposit()` and `Bridge.depositWithPermit()`, there's a validation to ensure `msg.value` meets the minimum required amount of native tokens. However, it's important to note that if `msg.value` exceeds this amount, the function currently lacks a mechanism to refund the excess. This oversight could lead to unintentional loss of funds for the caller, as any surplus in `msg.value` is not returned.

Open the report
LowTypos And InconsistenciesPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

### ERC721Safe - In the comments above the function `lockERC721()`, "custoday" should be "custody". ### Bridge - In the comments for the contract `Bridge`, "voting" is misspelled as "votiing". - The comments above the function `cancelProposal()` do not match its functionality. - In the function `voteProposal` both the storage variable reference `proposal` and `_proposals[nonceAndID][dataHash]` are used to update states of `_proposals[nonceAndID][dataHash]`. - The function `_onlyTrustedHandlers` uses the role `RELEASE_ETH_FUND_ROLE` which does not match its naming. ### Handler Contracts - Throughout the handler contracts the comments include the `resourceID` in the input `data`. However, the `resourceID` is taken as a separate input.

Open the report
LowUnnecessary modifierPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

In functions `Bridge.renounceAdmin()`, `Bridge.adminSetTrustedHandlers()`, `Bridge.adminAddRelayer()`, `Bridge.adminRemoveRelayer()` the use of `onlyAdmin` modifier is redundant since the same check is made by functions inherited from `AccessControl`.

Open the report
LowUnused `_noVotes` in Struct `Proposal`PlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

When the relayers vote for the proposals through `voteProposal()`, they can only vote `yes`. The `_noVotes` field in the following struct is never used. ```solidity=30 struct Proposal { bytes32 _resourceID; bytes32 _dataHash; address[] _yesVotes; address[] _noVotes; ProposalStatus _status; uint256 _proposedBlock; } ```

Open the report
Show 4 more
LowUnused VariablePlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

This temporary variable `_recipientAddress` is not used within the function `executeProposal()`.

Open the report
LowUser-Defined GettersPlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The linked functions are equivalent to the compiler-generated getter functions for the respective variables.

Open the report
LowVariables That Could Be Declared as ImmutablePlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

The linked variables assigned in the constructor can be declared as `immutable`. Immutable state variables can be assigned during contract creation but will remain constant throughout the lifetime of a deployed contract. A big advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they will not be stored in storage.

Open the report
LowWraps In Contract Not InterfacePlayDapp - Audit 2 · CertiK · 22 Jul 2024Open

In the contract `ERC20Safe`, input addresses are wrapped in the contract `ERC20PresetMinterPauser` or `ERC20Burnable` as opposed to an interface. In the contract `ERC721Safe`, input address are wrapped in the contract `ERC721MinterBurnerPauser` as opposed to an interface.

Open the report

Contracts

No deployed address is recorded for these audits.

The reports name a repository or files. Open a report to see its scope.

The repositories and files the reports name

PlayDapp: questions

Is PlayDapp audited?

Trustblock holds 2 public audit reports for PlayDapp, dated 17 Feb 2024 to 22 Jul 2024. The latest is by CertiK (“PlayDapp - Audit 2”).

Who audited PlayDapp?

CertiK wrote the 2 reports Trustblock holds for PlayDapp.

Are there open findings in PlayDapp’s audits?

38 findings are still open or acknowledged in the firms’ reports: 4 high, 3 medium, 31 low (34 open, 4 acknowledged). No critical finding is reported. Statuses are the security firms’ own.

Show this on your site

Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.

Content

Facts

Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.

Fixed as
Language

Style

Layout
Theme
Accent
Corners

Format

Size
Date
Embed as
HTML
<head>
<script src="https://widget.trustblock.run/project-widget.min.js" defer></script>
</head>
<body>
<div
data-tb-project-widget
data-tb-project-slug="playdapp"
></div>
</body>

Paste the code where the label should appear. It uses no API credit and updates by itself.

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