Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 1.08 KB

038.md

File metadata and controls

26 lines (17 loc) · 1.08 KB

yy

medium

Unlimit supply cap for token in USSD.sol.

Summary

There is no max supply cap for token in this contract.

Vulnerability Detail

The function mintForToken does not have access control, everyone such as Alice can use the function keep mint an excessive amount of coins, then leading to inflation and devaluation of the token. Even the calculateMint function provide a limit on how much tokens can be minted per transaction.

However, it does not prevent inflation or devaluation from excessive minting, especially if the user has a large amount of asset token.

Impact

No prevention for inflation or devaluation from excessive minting, especially if the user has an enormous amount of asset token.

Code Snippet

https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L151 https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#LL169C5-L174C1

Tool used

Manual Review

Recommendation

Rate limiting or maximum supply cap for the stablecoin could be considered to protect the stablecoin's value.