Getline-Network / getline

Distributed P2P Lending System
https://getline.in
Apache License 2.0
9 stars 6 forks source link

[getline.ts] Abstract permils away #30

Open ritave opened 6 years ago

ritave commented 6 years ago

Smart Contract gets interest permils due to technical reasons - no support for floats. But that doesn't mean we should expose permils to other developers. Suggestion -> use BigNumbers in API where possible instead of interestPermil and assert when trying to create a loan with too many decimals in it.

It's a leaky abstraction but most of the time it's better to have it then not.