PlayDapp has 2 public audit reports from CertiK; the latest is CertiK, 22 Jul 2024; no critical findings reported.
Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.
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).
Centralization Related Risks
PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗
Centralization Risks
PlayDapp - Audit · CertiK · 17 Feb 2024 · Report ↗
Initial Token Distribution
PlayDapp - Audit · CertiK · 17 Feb 2024 · Report ↗
Pausing Centralization Risks
PlayDapp - Audit · CertiK · 17 Feb 2024 · Report ↗
Deposit Record May Not Match Data
PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗
Potential Issues If `lenDestinationRecipientAddre
PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗
Users Are Allowed To Submit Data In Any Form
PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗
`_bridgeAddress` Must Be Set By Inheriting Contra
PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗
`_destinationChainID` May Be Confused With EVM `C
PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗
`burnable` Cannot Be Reversed
PlayDapp - Audit 2 · CertiK · 22 Jul 2024 · Report ↗
Newest first
| Report | Security firm | Date | Scope | Critical findings | Findings | Source |
|---|---|---|---|---|---|---|
| PlayDapp - Audit 2 | Security firm: CertiK | Date: | Scope: Files listed | None open | Findings: 1 high · 6 medium · 39 low 11 fixed · 4 acknowledged · 31 open | skynet.certik.com ↗ |
| PlayDapp - Audit | Security firm: CertiK | Date: | Scope: —Not recorded; see the report | None open | Findings: 3 high · 1 low 1 fixed · 3 open | skynet.certik.com ↗ |
Statuses are the security firm’s own, from each report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 3 | 1 | 0 |
| Medium | 0 | 3 | 3 |
| Low | 31 | 0 | 9 |
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.  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.  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.  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.  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.  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. 
Open the reportAll 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 reportIn 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 reportThe 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 reportThe `_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 reportIf 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 reportThe `uint` type is an alias for `uint256`. It is recommended to use `uint256` instead of `uint` for better readability.
Open the reportThere 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 reportWhen 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 reportThe 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`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 reportCan 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### 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 reportThere should always be events emitted in any function that updates an important state variable.
Open the reportThe 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 reportThroughout 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 reportIn `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 reportThe 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 reportThe 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 reportThe `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 reportIn `Bridge.adminRemoveRelayer()`, `_totalRelayers` is decremented. Due to potential inconsistency between `_totalRelayers` and the real number of relayers, an underflow can occur.
Open the reportIn 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 reportThe contracts `ERC721Safe` and `ERC20Safe` use `SafeMath` for `uint256`. However, no SafeMath operations are utilized in the contract.
Open the reportThe 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 reportThe 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 reportSpecific imports are recommended to be used to avoid unpredictable pollution of the namespace. For example: import {A, B, C} from "X";
Open the reportIn 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### 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 reportIn 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 reportWhen 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 reportThis temporary variable `_recipientAddress` is not used within the function `executeProposal()`.
Open the reportThe linked functions are equivalent to the compiler-generated getter functions for the respective variables.
Open the reportThe 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 reportIn 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 reportThe reports name a repository or files. Open a report to see its scope.
Trustblock holds 2 public audit reports for PlayDapp, dated 17 Feb 2024 to 22 Jul 2024. The latest is by CertiK (“PlayDapp - Audit 2”).
CertiK wrote the 2 reports Trustblock holds for PlayDapp.
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.
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.
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.
<head><script src="https://widget.trustblock.run/project-widget.min.js" defer></script></head><body><divdata-tb-project-widgetdata-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