Possible mistake in calculating the amount to be minted for the depositor coin
dmtrbch opened this issue · comments
It's me again :) Following the tutorial I might have detected yet another mistake.
Instead of using:
uint256 mintDepositorCoinAmount = ((msg.value.mulWad(dpcInUsdPrice)) /
oracle.getPrice());
I think we should use:
uint256 mintDepositorCoinAmount = ((msg.value.mulWad(oracle.getPrice())) /
dpcInUsdPrice);
in order to calculate the amount of Depositor Coins to be minted
I guess this is directly related to my previous comment here #1 (comment), but thanks for the feedback!