Closed sherlock-admin4 closed 8 months ago
1 comment(s) were left on this issue during the judging contest.
WangAudit commented:
works as intended
Escalate According to Sherlock rules
Escalate According to Sherlock rules
When external-admin=restricted, issues related to these external admins affecting a protocol (being audited) by updating the external protocol parameters is a valid issue
The escalation could not be created because you are not exceeding the escalation threshold.
You can view the required number of additional valid issues/judging contest payouts in your Profile page, in the Sherlock webapp.
the-first-elder
medium
Maintainer can Cause a denial of service when calling UpdateXYZ function
Summary
According to the protocol, encountering accidental parameters that lead to adverse states in a contract or transaction is considered a valid issue. The function UpdateXYZ is responsible for adjusting the validity status and supply limits of a specified token.
Vulnerability Detail
Within the function, parameters
maxLimit
andminLimit
are utilized to denote the maximum supply and minimum limit of a token through internal accounting. If a token (tokenA) undergoes an update with a maxLimit value less than its total supply, any attempt to initiate a swap against it in swapAndSend or convertToEXYZ will consistently result in reversion, as evidenced by line and thisPoc
Impact
function call
swapAndSend
andconvertToEXYZ
against token A would always revertCode Snippet
https://github.com/sherlock-audit/2024-02-telcoin-platform-audit-update/blob/main/telcoin-contracts/contracts/stablecoin/StablecoinHandler.sol#L243
Tool used
Manual Review
Recommendation
Implement a conditional statement to ensure that maxLimit is always greater than or equal to the total supply.