All errors

Contract reverts

SafeMath: subtraction overflow


What it means

An older contract tried to subtract a larger number from a smaller one, which SafeMath blocks. In practice this is how pre-0.8 Solidity contracts say insufficient balance or insufficient allowance: the subtraction that failed was balance minus amount.

How to fix it

Treat it as a balance or allowance problem: check you hold enough of the token and that the contract is approved for the amount. The wording is just an older contract's way of saying the same thing.

Still stuck?

Paste your transaction hash and get the exact decoded reason for your failure, free.

Decode my transaction

For the full walkthrough of why transactions fail, read the complete error guide.