Getting Rounding Right in DeFi
seceureka.com·11h·
Discuss: Hacker News
📐Interval Arithmetic
Preview
Report Post

January 2026

Rounding bugs are having a moment, and not in a good way. Bunny, Balancer (twice), Yield V2, the Solana Program Library… the list of protocols hit by rounding exploits keeps growing. This isn’t coincidence. When the same bug class shows up this frequently, it’s a sign that attackers have developed systematic methodologies and tooling to find and exploit these issues efficiently.

Most guidance on rounding boils down to one rule: “round in favor of the protocol.” But as we’ll see, that advice is necessary but nowhere near sufficient. Real protocols have complex formulas, intermediate values that get reused, and edge cases where determining the correct rounding direction is far from obvious.

This post covers why rounding goes wrong, walks through a real attack,…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help