Skip to content

Instantly share code, notes, and snippets.

@nateawelch
Created September 4, 2019 14:20
Show Gist options
  • Save nateawelch/6b93efed220a5f0b9c2ceb831f53351b to your computer and use it in GitHub Desktop.
Save nateawelch/6b93efed220a5f0b9c2ceb831f53351b to your computer and use it in GitHub Desktop.
borrowRatePerBlock = 73932656935 / 10 ^ 18 = 0.00000007393
#Compounds calculations (this matches exactly what they display on their site)
compoundsBlockTime = 15
compoundsAverageBlocksPerYear = 60 / compoundBlockTime * 60 * 24 * 365
nonCompoundedInterest = (borrowRatePerBlock) * blocksPerYear = 0.15543601794
#Real numbers
realAverageBlockTime = 13.25
realAverageBlocksPerYear = 60 / blockTime * 60 * 24 * 365
compoundingInterest = (borrowRatePerBlock + 1) ^ blocksPerYear - 1 = 0.19239667784 = 19% per year for borrowing on Compound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment