Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
vminkov committed Apr 16, 2023
1 parent 60b8601 commit fa9b9c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/compound/CToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ abstract contract CToken is CTokenInterface, TokenErrorReporter, Exponential, Di
if (vars.mathErr != MathError.NO_ERROR) {
return
failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED, uint256(vars.mathErr));
} else if (vars.totalSupplyNew < 10 ** decimals) {
// don't let the total supply go under 1 share to prevent inflation attacks
return fail(Error.BAD_INPUT, FailureInfo.REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED);
}

(vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);
Expand Down

0 comments on commit fa9b9c2

Please sign in to comment.