Skip to content

Commit

Permalink
Merge pull request #25 from mountainprotocol/fix/N-01
Browse files Browse the repository at this point in the history
N-01 Fix
  • Loading branch information
mattiascaricato committed Jun 23, 2023
2 parents d548aa6 + 95cf63b commit 4606704
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/USDM.sol
Expand Up @@ -110,6 +110,10 @@ contract USDM is
* @notice Converts an amount of tokens to shares.
* @param amount The amount of tokens to convert.
* @return The equivalent amount of shares.
*
* Note: All rounding errors should be rounded down in the interest of the protocol's safety.
* Token transfers, including mint and burn operations, may require a rounding, leading to potential
* transferring at most one GWEI less than expected aggregated over a long period of time.
*/
function convertToShares(uint256 amount) public view returns (uint256) {
return (amount * _BASE) / rewardMultiplier;
Expand Down

0 comments on commit 4606704

Please sign in to comment.