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

Petite Pewter Orangutan - TellerV2::constructor is not calling __Pausable_init() which will interrupt contract's pause functionality #70

Open
sherlock-admin2 opened this issue Dec 10, 2024 · 0 comments

Comments

@sherlock-admin2
Copy link

Petite Pewter Orangutan

High

TellerV2::constructor is not calling __Pausable_init() which will interrupt contract's pause functionality

Summary

TellerV2::constructor is not calling __Pausable_init() which will interrupt contract's pause functionality

Root Cause

No response

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

If you don't call __Pausable_init() in the constructor, the Pausable functionality won't be initialized. This means that the Pausable modifier won't work as intended

PoC

TellerV2::constructor

    function initialize(
        uint16 _protocolFee,
        address _marketRegistry,
        address _reputationManager,
        address _lenderCommitmentForwarder,
        address _collateralManager,
        address _lenderManager,
        address _escrowVault,
        address _protocolPausingManager
    ) external initializer {
        __ProtocolFee_init(_protocolFee);

@>      //__Pausable_init();

        require(
            _lenderCommitmentForwarder.isContract(),
            "LCF_ic"
        );
        lenderCommitmentForwarder = _lenderCommitmentForwarder;

        require(
            _marketRegistry.isContract(),
            "MR_ic"
        );
        marketRegistry = IMarketRegistry(_marketRegistry);

        require(
            _reputationManager.isContract(),
            "RM_ic"
        );
        reputationManager = IReputationManager(_reputationManager);

        require(
            _collateralManager.isContract(),
            "CM_ic"
        );
        collateralManager = ICollateralManager(_collateralManager);

       
       
        require(
            _lenderManager.isContract(),
            "LM_ic"
        );
        lenderManager = ILenderManager(_lenderManager);


         

         require(_escrowVault.isContract(), "EV_ic");
        escrowVault = IEscrowVault(_escrowVault);




        _setProtocolPausingManager(_protocolPausingManager);
    }

Mitigation

Uncomment the __Pausable_init()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant