Compound Interest
Fixed-point compound interest calculation0x00000000000000000000000000000000000000CC~500+ gas
Compare PSC precision (18 decimals) with JavaScript floating-point: A = P × (1 + r)n
Enter values and click Calculate to compare results
Why It Matters
Solidity lacks native exponentiation. Libraries like ABDKMath are gas-heavy. This precompile performs A = P x (1 + r)^n efficiently in Go.
Interface
Input: principal(32) | rate(32) | periods(32) = 96 bytes Output: finalAmount(32) // Rate is scaled by 1e18 // 5% = 0.05 x 1e18 = 50000000000000000