CertiK reviewed Gala (Gala - Film) on 21 May 2024: 7 findings, 0 critical; none marked fixed.
Report hosted on skynet.certik.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 | 2 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 5 | 0 | 0 |
In the contract `GalaFilm`, the role `MINTER_ROLE` has authority over the following functions: - `mint()` - `mintBulk()` Any compromise to a `MINTER_ROLE` account may allow a hacker to take advantage of this authority and mint any amount of tokens to any address, particularly one they control. In the contract `GalaFilm`, the role `BLOCKLISTER_ROLE` has authority over the following functions: - `blocklist()` - `unBlocklist()` Any compromise to a `BLOCKLISTER_ROLE` account may allow a hacker to take advantage of this authority and block an address that should not be blocked, or unblock a malicious address during a critical period of time. In the contract `GalaFilm`, the role `DEFAULT_ADMIN_ROLE` has authority over the following functions: - `pause()` - `unpause()` - `transferAdmin()` - `grantRole()` - `revokeRole()` Any compromise to a `DEFAULT_ADMIN_ROLE` account may allow a hacker to take advantage of this authority and pause or unpause sensitive functions within the contract during a critical period of time. By default, the `DEFAULT_ADMIN_ROLE` is the admin role of all other roles and thus can also grant and revoke any role from any account, including their own, and `UPGRADER_ROLE`. All roles have the ability to renounce their own role through `renounceRole()`, potentially leaving the contract without a privileged account.
The `GalaFilm` contract inherits upgradeable contracts, indicating that it is part of an upgradeable system. The privileged role `UPGRADER_ROLE` has the authority to update the implementation contract to possess any logic. Any compromise of the privileged account could allow a hacker to exploit this authority, potentially altering the implementation contract pointed to by the proxy and thus executing malicious functionality within the implementation contract.
The following operations can be made in the cited `for` loop of the codebase: 1. The increment operation saves a small amount of gas if performed from the left (`++i`) instead of from the righthand side (`i++`). 2. The increment operation can be placed in an `unchecked` block at the end of the loop logic, since it is bounded above by the loop limit which must be a `uint256` value, avoiding overflow.
From Solidity `v0.8.4`, there are more gas-efficient ways to explain to users why an operation failed than through the use of strings. Using custom errors can significantly reduce the size of the deployed bytecode and reduce the gas cost when calls revert.
Modifier `whenNotPaused` is used both for user-facing and privileged actions. The privileged actions affected by the modifier are: - `mint()` - `mintBulk()` - `blocklist()` - `unBlocklist()` - `addMinter()` - `removeMinter()` - `addUpgrader()` - `removeUpgrader()` - `addBlocklister()` - `removeBlocklister()` - `transferAdmin()` - `grantRole()` - `revokeRole()` Please confirm that it is the intention of the team to prevent the use of each of these functions when the contract is paused.
Function `blocklist()` ensures that the address to be blocked does not possess the `MINTER_ROLE`, `UPGRADER_ROLE`, or `BLOCKLISTER_ROLE`, but the function does not prevent the `DEFAULT_ADMIN_ROLE` from being blocklisted.
Contracts `Initializable` and `ERC20Upgradeable` are already inherited implicitly through other explicit inheritances and it is not necessary to explicitly include them.
| Address | Chain | Source code |
|---|---|---|
| 0xacc3…15cd0xacc36ebdc4b394f0b03ee2bbd1a6b701c0ab15cd | Chain: Ethereum | Source code: Verified source |
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’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