hats-finance / Catalyst-Exchange-0x3026c1ea29bf1280f99b41934b2cb65d053c9db4

Other
1 stars 2 forks source link

Implementation contracts inherit from `openzeppelin-contracts` instead of `openzeppelin-contracts-upgradeable` #45

Open hats-bug-reporter[bot] opened 10 months ago

hats-bug-reporter[bot] commented 10 months ago

Github username: @nuthan2x Twitter username: nuthan2x Submission hash (on-chain): 0x57d808816e69c11afc16d28b236471eb09cf258fb1d89ade847eb191bb5b918b Severity: low

Description: Description\ The issue doen't affect current system, but it goes against the standard of proxy and openzeppelin contracts implementation Due to the clones proxy pattern, the implemenattion contracts should inherit from openzeppelin-contracts-upgradeable instead of openzeppelin-contracts

Attack Scenario\

abstract contract CatalystVaultCommon is
    Initializable,
    Multicall,
    ReentrancyGuard, // @audit should use reentrancy guard upgradable
    ERC20,
    ICatalystV1Vault
{
[PASS] testRe() (gas: 196304)
Logs:
  0x0000000000000000000000000000000000000000000000000000000000000001
  true
  0x0000000000000000000000000000000000000000000000000000000000000001
  ................................................
  0x0000000000000000000000000000000000000000000000000000000000000000
  true
  0x0000000000000000000000000000000000000000000000000000000000000001

Attachments

  1. Proof of Concept (PoC) File

    1. paste this gist file to test/ folder
    2. run forge t --mt testRe -vvvv
  2. Revised Code File (Optional) will post in comments section of github issue

reednaa commented 10 months ago

For this issue we would require a fix that follows the standard.

nuthan2x commented 10 months ago

Modify CatalystVaultCommon.sol as https://gist.github.com/nuthan2x/0989f4ec2bf3bd91cd3e2f25034e3a0e