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

MadSisyphus - notDelegated modifier prevents AssetFactory::deploySwapAssets and AssetFactory::deployLv to be used #253

Closed
sherlock-admin3 opened this issue Sep 10, 2024 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. Reward A payout will be made for this issue

Comments

@sherlock-admin3
Copy link

sherlock-admin3 commented Sep 10, 2024

MadSisyphus

Medium

notDelegated modifier prevents AssetFactory::deploySwapAssets and AssetFactory::deployLv to be used

Summary

AssetFactory.sol is a UUPSUpgradeable implementation contract that should be used via an ERC-1967 proxy. However, the notDelegated modifier prevents the deploySwapAssets and deployLv functions to be called via the proxy.

Vulnerability Detail

The AssetFactory.sol contract implements OpenZeppelin's UUPS (Universal Upgradeable Proxy Standard). It serves as the implementation contract which should be called by an ERC-1967 proxy using delegatecall. The notDelegated modifier prevents the deploySwapAssets and deployLv functions to be called via the proxy, and thus makes core functionalities of the protocol unusable.

Impact

New swap assets (Depeg Swap and Cover Token) and new liquidity vault tokens cannot be deployed. This is a severe limitation to the functioning of the protocol.

Code Snippet

https://github.com/sherlock-audit/2024-08-cork-protocol/blob/main/Depeg-swap/contracts/core/assets/AssetFactory.sol#L144

https://github.com/sherlock-audit/2024-08-cork-protocol/blob/main/Depeg-swap/contracts/core/assets/AssetFactory.sol#L179

Tool used

Manual Review

Recommendation

Remove the notDelegated modifiers from AssetFactory::deploySwapAssets and AssetFactory::deployLv

Duplicate of #185

@github-actions github-actions bot added Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. labels Sep 14, 2024
@sherlock-admin3 sherlock-admin3 changed the title Dandy Cider Urchin - notDelegated modifier prevents AssetFactory::deploySwapAssets and AssetFactory::deployLv to be used MadSisyphus - notDelegated modifier prevents AssetFactory::deploySwapAssets and AssetFactory::deployLv to be used Sep 25, 2024
@sherlock-admin3 sherlock-admin3 added the Reward A payout will be made for this issue label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant