SafeMath not completely used in yield source contracts
Some arithmetic operations in yield source contracts do not use the SafeMath library, which could allow integer underflow or overflow. An attacker could potentially exploit this to disrupt the yield sources.
Submitted by shw, also found by cmichel
SafeMath is not completely used at the following lines of yield source contracts, which could potentially cause arithmetic underflow and overflow:
Recommend using the SafeMath library functions in the above lines.
asselstine (PoolTogether) confirmed and disagreed with severity:
While the arithmetic ceiling is quite high, if an overflow occurred this would significantly disrupt the yield sources. I’d qualify this issue higher as
2 (Med Risk).
I agree with the sponsor’s risk evaluation. Increasing to medium.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the developers omitted SafeMath in certain arithmetic operations, leaving them vulnerable to integer overflow/underflow.
Impact
If an overflow occurred, it could significantly disrupt the yield sources, though the arithmetic ceiling is quite high.
What the attacker needed
None
The fix
The recommendation is to use SafeMath library functions in the identified lines.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
SafeMath is a set of functions that prevent numbers from wrapping around when they get too big or too small. Without it, a calculation could produce an unexpected result, which might break the contract or be abused.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.