Each user may deposit assets to the protocol and mint DecentralizedStableCoin (DSC) token.
DSC token is ERC-20 burnable token that may be used as usual ERC-20.
As DSC token is standard ERC-20 token, it may be transferred to other users via transfer/transferFrom function and used in any DeFi or any other activity.
DSC token price is pegged to 1 USD, current mint/burn mechanism must protect it from any possible fluctuation. But it won't actually protect DSC.
Current contract implementation allows DSC burning only for user's who previously mint DSC, as their value stored in s_collateralDeposited mapping.
Possible impact:
DSC will cost much higher then 1 USD. If some actor gets significant amount of DSC from open market, DSC minters will be forced to pay extra cost to get back their 2 USD collateral from protocol. Effectively move DSC price up to 1.99 USD
DSC will cost much lower then 1 USD. DSC bought on open market or received in other way may not be redeemed and users may be discourage to use it and lower the demand and thus price for DSC.
Observation, foundry unit test
Result - underflow as we are trying to divide redeem amount from zero
Contract must be updated to allow direct DSC exchangeable to collateral assets.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.