The StableSwapFactory contract interacts with other contracts like StableSwapLPFactory and the deployer contracts (e.g., StableSwapTwoPoolDeployer). These contracts have functions such as createSwapLP and createSwapPair that are protected by the onlyOwner modifier, meaning only the owner of those contracts can invoke them. As a result, the StableSwapFactory contract needs the ownership of those contracts so that it will be able to call those functions.
Moreover, those contracts also implement a pausing mechanism via OpenZeppelin’s Pausable contract, allowing the owner to pause and unpause certain operations during emergency scenarios. However, the StableSwapFactory lacks the necessary functions to trigger the pauseContract and unPauseContract functions in those contracts.
Add functions to the StableSwapFactory that allow it to call the pauseContract and unPauseContract functions on the deployed contracts, ensuring full control over their pausing mechanisms.
Github username: -- Twitter username: -- Submission hash (on-chain): 0xcbef958a87b140b00599fd3e2efd567c564719226799eb3048bb3e7950ea672a Severity: low
Description: Description
The
StableSwapFactory
contract interacts with other contracts likeStableSwapLPFactory
and the deployer contracts (e.g.,StableSwapTwoPoolDeployer
). These contracts have functions such ascreateSwapLP
andcreateSwapPair
that are protected by theonlyOwner
modifier, meaning only the owner of those contracts can invoke them. As a result, theStableSwapFactory
contract needs the ownership of those contracts so that it will be able to call those functions.Moreover, those contracts also implement a pausing mechanism via OpenZeppelin’s
Pausable
contract, allowing the owner to pause and unpause certain operations during emergency scenarios. However, theStableSwapFactory
lacks the necessary functions to trigger thepauseContract
andunPauseContract
functions in those contracts.In StableSwapTwoPoolDeployer:
In StableSwapFactory:
Attachments
Add functions to the
StableSwapFactory
that allow it to call thepauseContract
andunPauseContract
functions on the deployed contracts, ensuring full control over their pausing mechanisms.