To learn a bit about ethereum, I thought I'd code up a simple loan contract. I added a few simple properties for any loan, and I immediately ran into problems.
contract Loan
{
address lender;
address borrower;
uint amount;
???? interestRate;
...
}
What type do I use for the interest rate? Looking at the solidity types documentation, the primitive types include Boolean and multiple kinds of integers. There is no primitive for decimal numbers.
Without decimal numbers, how do I calculate the interest?
The Solidity changelog shows that fixed point types will be included in version 0.3.0 which is in development.