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

smbv-1923 - whenNotPaused() modifier not checked during call() which creates problem #321

Open
sherlock-admin3 opened this issue Oct 7, 2024 · 0 comments

Comments

@sherlock-admin3
Copy link
Contributor

sherlock-admin3 commented Oct 7, 2024

smbv-1923

Medium

whenNotPaused() modifier not checked during call() which creates problem

Summary

whenNotPaused() modifier not checked during call() which creates problem

Root Cause

https://github.com/sherlock-audit/2024-09-predict-fun/blob/main/predict-dot-loan/contracts/PredictDotLoan.sol#L561

Internal pre-conditions

Contract should be paused when user calls call()

External pre-conditions

No response

Attack Path

  • Let's suppose the contract is paused and at that time lender calls call() for auctioning of the loan.
  • But now as the contract is paused no one would be able to call auction() as there whenNotPaused modifier inside auction()
    function auction(uint256 loanId) external nonReentrant whenNotPaused
  • This creates problem for lender , new lender and borrower.
  • Current lender would not be able to auction the call as no one is able to call the function
  • New lender who wishes th take over loan as he thinks the collateral amount would be big in coming times would not be able to take over this loan.
  • Borrower will have no choice and would not be given chance to repay the loan as loan cannot be auctioned.

Impact

  • This creates problem for lender , new lender and borrower.
  • Current lender would not be able to auction the call as no one is able to call the function
  • New lender who wishes th take over loan as he thinks the collateral amount would be big in coming times would not be able to take over this loan.
  • Borrower will have no choice and would not be given chance to repay the loan as loan cannot be auctioned.

PoC

No response

Mitigation

Add whenNotPaused() modifier during call()

@sherlock-admin2 sherlock-admin2 changed the title Zealous Peanut Wolf - whenNotPaused() modifier not checked during call() which creates problem smbv-1923 - whenNotPaused() modifier not checked during call() which creates problem Oct 18, 2024
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