You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
sherlock-admin opened this issue
May 23, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
The USSD Contract doesn't have the redeem function, which is responsible for providing a collateral for an equal amount of USSD.
Vulnerability Detail
The documentation of USSD(White-Paper) it explicity states that.
If there is positive DAI balance in the collateral, USSD contract can provide DAI for equal amount of USSD in return (that would be burned, contracting supply).
At any given time, USSD can be minted using DAI as collateral at 1-to-1 ratio, expanding total USSD supply.
Ability to mint and redeem USSD for DAI could serve as incentives to re- balance the coin when this is economically viable (covering the gas expenses).
Although this was just a simple mistake that could be made by anyone, an expection of the redeem function was made, but the implemention of the mintForToken function was made in the USSD contract,
The reasons why there should be a redeem function, is all stated in the docs, below is a snippet of one.
These methods also could be used to help USSD recover in negative scenarios: if USSD value falls below 1 DAI and there are less than 1 DAI reserves per USSD to refill the reserves allowing the USSD to recover it's price by reducing supply (at the expense of the agent performing that).
The exemption of a redeem function has both economical and protocol based logic effects, as stated in the WhitePaper.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
shealtielanz
high
The
USSD
contract doesn't have any mechanism forRedeeming
.Line of code
Summary
The
USSD
Contract doesn't have theredeem
function, which is responsible for providing acollateral
for an equal amount ofUSSD
.Vulnerability Detail
The documentation of
USSD
(White-Paper) it explicity states that.Although this was just a simple mistake that could be made by anyone, an expection of the
redeem
function was made, but the implemention of themintForToken
function was made in theUSSD
contract,Impact
The reasons why there should be a
redeem
function, is all stated in the docs, below is a snippet of one.The exemption of a
redeem
function has both economical and protocol based logic effects, as stated in the WhitePaper.Code Snippet
Chapter 4 Link to the Docs
https://github.com/USSDofficial/ussd-contracts/blob/f44c726371f3152634bcf0a3e630802e39dec49c/contracts/USSD.sol#LL151C1-L167C6
Tool used
Manual Review.
Recommendation
The solution to this would be to create a mechanism for redeeming.
collateral
.a token for USSD. A dummy for how the
redeem function should look like.Remember this is a dummy and the
redeemForUSSd
and other functions it may call should be implemented correctly.Duplicate of #958
The text was updated successfully, but these errors were encountered: