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

Bald Lace Cyborg - wrong logic is implemented in createMarketWithConfig(), which could revert the function #710

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

Comments

@sherlock-admin2
Copy link
Contributor

Bald Lace Cyborg

Medium

wrong logic is implemented in createMarketWithConfig(), which could revert the function

Summary

whenever enforceCreationAllowList is true and creationAllowedProfileIds is allowed , then also it will result in reverting of the function

Root Cause

https://github.com/sherlock-audit/2024-11-ethos-network-ii/blob/main/ethos/packages/contracts/contracts/EthosVouch.sol#L667C1-L685C4

/**

  • @dev Disables the allow list enforcement
  • Anyone may create a market for their own profile.
  • @param value true if profile can create their market, false otherwise.
    */
    function setAllowListEnforcement(bool value) public onlyAdmin whenNotPaused {
    enforceCreationAllowList = value;
    }

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

lets consider a scenario when enforce is set to true and user is allowed,

which means createMarket config should succeed and fucntion should go further. But here actually, when it is true it will revert.
so it will prove the comment wrong

Impact

improper functioning of create market, and not working as intended and mentioned in comments

PoC

No response

Mitigation

logic in if function should be changed for enforceAllow

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