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

Unconstrained Fees #76

Closed
code423n4 opened this issue Dec 12, 2022 · 4 comments
Closed

Unconstrained Fees #76

code423n4 opened this issue Dec 12, 2022 · 4 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate-377 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/Trading.sol#L952-L969

Vulnerability details

Impact

An admin may set unconstrained fees for opening and closing trades in the Trading.sol smart contract, in the setFees function.
An admin mistakenly (or deliberately, maliciously) might add a fee that is very large, which will lead to users loosing money using the trading platform, also the admin might set a fee higher than 100% which will make the trading contract unusable since transactions will be reverted.

Proof of Concept

https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/Trading.sol#L952-L969

Tools Used

Manual Review

Recommended Mitigation Steps

Add relevant checks and constrains before setting the fees, especially dao and burn fees.

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Dec 12, 2022
code423n4 added a commit that referenced this issue Dec 12, 2022
@TriHaz
Copy link

TriHaz commented Dec 23, 2022

Duplicate of #15

@c4-judge
Copy link
Contributor

GalloDaSballo marked the issue as duplicate of #514

@c4-judge
Copy link
Contributor

GalloDaSballo marked the issue as duplicate of #377

@c4-judge
Copy link
Contributor

GalloDaSballo marked the issue as satisfactory

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Jan 22, 2023
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 bug Something isn't working duplicate-377 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

3 participants