Skip to content

Fix staking APR calculation: normalize Cosmos SDK Dec precision - #33

Merged
danvaneijck merged 1 commit into
mainfrom
claude/check-staking-apr-AqdlU
Feb 12, 2026
Merged

Fix staking APR calculation: normalize Cosmos SDK Dec precision#33
danvaneijck merged 1 commit into
mainfrom
claude/check-staking-apr-AqdlU

Conversation

@danvaneijck

Copy link
Copy Markdown
Owner

annualProvisions from the mint module is a Cosmos SDK Dec with 18 implicit decimal places, while bondedTokens is a plain integer. Dividing annualProvisions by 1e18 corrects the unit mismatch that was producing an APR of ~7.4e18% instead of ~7.4%.

https://claude.ai/code/session_01Vt7B3LtMu5azXERSWmtVE8

annualProvisions from the mint module is a Cosmos SDK Dec with 18
implicit decimal places, while bondedTokens is a plain integer.
Dividing annualProvisions by 1e18 corrects the unit mismatch that
was producing an APR of ~7.4e18% instead of ~7.4%.

https://claude.ai/code/session_01Vt7B3LtMu5azXERSWmtVE8
@vercel

vercel Bot commented Feb 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chance-staking Ready Ready Preview, Comment Feb 12, 2026 5:23am

@danvaneijck
danvaneijck merged commit fd0f2f6 into main Feb 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants