Hexncoin

Practical guide

Unlimited vs Exact-Amount Approvals

An ERC-20 approval can authorize a contract to move an exact amount or an effectively unlimited one. The two carry very different risk if the approved contract is later compromised.

Why unlimited approvals exist

An unlimited allowance avoids asking for a new approval on every trade, which is convenient but leaves that much of a token exposed to the approved contract indefinitely.

Exact-amount approvals limit exposure

An approval scoped to a specific trade limits what the contract can ever move to that amount, at the cost of a new approval transaction for the next trade.

Check what a swap is requesting

Before approving, check whether the amount requested matches the trade you intend to make rather than assuming it is scoped correctly.