Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA Report #139

Open
code423n4 opened this issue Aug 7, 2022 · 0 comments
Open

QA Report #139

code423n4 opened this issue Aug 7, 2022 · 0 comments
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

[L-01] Missing constructor and modifier for contracts using Initializable

Impact

OpenZeppelin recommends adding an empty constructor with the initializer modifier in order to avoid exploits.

File: contracts/proxy/MIMOProxy.sol#L12
12: contract MIMOProxy is IMIMOProxy, Initializable, BoringBatchable {

https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/proxy/MIMOProxy.sol#L12

Recommended Mitigations Steps

Add an empty constructor with the initializer modifier.

OpenZeppelin's main concern is for contracts using UUPSUpgradeable. However, I would still recommend adding it for all contracts using Initializable as an extra layer of security to avoid having to send a transaction to invoke initialize() after the contract is deployed to ensure no one else can initialize.

constructor() initializer {}

[NC-01] Remove floating pragma

Locking the pragma will make sure that the contract does not get deployed using outdated compiler versions.

File: contracts/proxy/MIMOProxy.sol
2: pragma solidity >=0.8.4;

https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/proxy/MIMOProxy.sol

File: contracts/proxy/MIMOProxyFactory.sol
2: pragma solidity >=0.8.4;

https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/proxy/MIMOProxyFactory.sol

File: contracts/proxy/interfaces/IMIMOProxyFactory.sol
2: pragma solidity ^0.8.4;

https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/proxy/interfaces/IMIMOProxyFactory.sol

File: contracts/proxy/interfaces/IMIMOProxyRegistry.sol
2: pragma solidity ^0.8.4;

https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/proxy/interfaces/IMIMOProxyRegistry.sol

[NC-02] Empty receive function

The function should revert if the intention is not to receive ether, or add a functionality for the received ether.

File: contracts/proxy/MIMOProxy.sol
38: receive() external payable {}

https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/proxy/MIMOProxy.sol#L38

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Aug 7, 2022
code423n4 added a commit that referenced this issue Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

1 participant