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

A compromised or malicious owner of StableToken can mint any amount of the stable coins. #309

Closed
code423n4 opened this issue Dec 16, 2022 · 3 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/StableToken.sol#L38

Vulnerability details

Impact

Detailed description of the impact of this finding.
A compromised or malicious owner of StableToken can mint any amount of the stable coins.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
.
A compromised or malicious owner of StableToken can mint any amount of the stable coins as follows:

  1. Call function setMinter(badMinter, true) so that badMinter becomes a legal minter;
  2. badMinter calls mintFor(attackerA, amount) to get amount of stable coins
  3. attackerA then use the amount of stable coins to trade and get back other stable coins that are safe and popular in the market.
  4. repeat the above until the whole system is drained of other liquidity.

Tools Used

Remix

Recommended Mitigation Steps

Set the minters in the constructor only during deployment. If new minters are needed, then use a proxy pattern to upgrade.

@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 16, 2022
code423n4 added a commit that referenced this issue Dec 16, 2022
@c4-judge
Copy link
Contributor

GalloDaSballo marked the issue as duplicate of #383

@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

2 participants