My goal is to calculate a 2% interest rate against a loan denominated in DAI.
uint256 loanAmount = 500 * 10 ** 18 // $500 in USD
function calculateInterest( uint256 _loanAmount) public view returns (uint256) {
return 2 / _loanAmount;
}
However, when I execute the function, the value i get is 0
Any idea what I'm doing wrong?