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

Upgraded Q -> M from #70 [1668468349340] #517

Closed
c4-judge opened this issue Nov 14, 2022 · 2 comments
Closed

Upgraded Q -> M from #70 [1668468349340] #517

c4-judge opened this issue Nov 14, 2022 · 2 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value duplicate-139 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-judge
Copy link
Contributor

Judge has assessed an item in Issue #70 as M risk. The relevant finding follows:

Flash loan fee can be set to 100%
Contract:
https://github.com/code-423n4/2022-10-traderjoe/blob/main/src/LBFactory.sol#L474

Issue:
In setFlashLoanFee function, If Admin has set flashloan fee to 100% then user taking X amount as flashloan has to pay a fee equal to X which does not make sense

function setFlashLoanFee(uint256 _flashLoanFee) external override onlyOwner {
uint256 _oldFlashLoanFee = flashLoanFee;

    if (_oldFlashLoanFee == _flashLoanFee) revert LBFactory__SameFlashLoanFee(_flashLoanFee);

    flashLoanFee = _flashLoanFee;
    emit FlashLoanFeeSet(_oldFlashLoanFee, _flashLoanFee);
}

Recommendation:
Implement a upper bound on flashloan fee

@c4-judge c4-judge added the 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value label Nov 14, 2022
@c4-judge
Copy link
Contributor Author

GalloDaSballo marked the issue as duplicate of #139

@Simon-Busch Simon-Busch added the satisfactory satisfies C4 submission criteria; eligible for awards label Dec 5, 2022
@Simon-Busch
Copy link
Contributor

Marked this issue as Satisfactory as requested by @GalloDaSballo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value duplicate-139 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants