UptownResearch / pyTokenSpike

intial work on pyTokens
0 stars 0 forks source link

Make it obvious when a number is converted to fixed point #6

Closed alcueca closed 4 years ago

alcueca commented 4 years ago

https://github.com/UptownResearch/pyTokenSpike/blob/a71909b85e484ff565554672b0dcaacb607c6b58/dapp/contracts/pytoken.sol#L173

Probably just adding natspec comments at the top would go a long way.

aniemerg commented 4 years ago

I'm open to the best way to indicate the type of fixed point that any particular calculation is done in. I don't love the unexplained random multiplications by "short" and "long" needed to ensure that the math comes out at right level of fixed point. Open to suggestions on this.