An exact allowance approves only the tokens one swap needs instead of the maximum possible amount. If the spender later turns malicious or gets compromised, it can take at most what is left. Use exact amounts whenever the DEX or your wallet allows it, check the amount in the TX Decoder before signing and clean up leftovers in the TRONSEC Approvals Monitor.
What the amount in approve() really means
On TRON, approve(spender, amount) sets how many units of a token the spender may move from your wallet. An unlimited approval uses the largest number the contract accepts, so there is effectively no cap. Drainer contracts always ask for it, because a single signature lets them take your future deposits too, without you being present.
Fake sites often disguise this with friendly labels such as "Enable swap" or "Activate trading" while the transaction underneath requests the maximum USDT amount. The label on the button tells you nothing; the amount in the transaction tells you everything. Background on why unlimited approvals are so dangerous is in unlimited TRC-20 approvals.
How to approve only the amount you are swapping
There are three practical ways to keep an allowance small:
- Use the exact option in the DEX if it offers one, so the approval equals the trade size.
- Edit the amount in your wallet if the signing screen lets you change it. Set it to the swap amount instead of the default maximum.
- Approve, swap, then revoke when neither option is available. The leftover allowance is removed with one click in the Approvals module.
Whatever you choose, check the actual amount before confirming. If the interface hides it, paste the transaction into the TRONSEC TX Decoder: it shows the spender and flags unlimited values. The fields are explained in how to read an approve transaction.
When a large but finite allowance is acceptable
Reputable routers and aggregators sometimes ask for a large finite allowance to save you fees on repeated trades. That can be reasonable if the spender is the verified contract you actually use and you trade often. The exposure is still bigger than an exact approval, so it only makes sense on an active trading wallet, not on a wallet that holds savings.
- An unlimited approval is a convenience for the protocol, never a requirement on your first visit.
- An exact approval caps the possible damage at the size of one trade.
- Some routers still request large allowances by default, so always read the amount.
Off-chain "permit" style signatures are rare on TRON. If a dApp asks you to sign a message that grants spending rights, treat it with the same caution as an on-chain approve; see signMessage phishing.
Should you revoke the router after a one-off swap?
If you do not plan to trade again soon, yes. The official SunSwap router is a public, well-known contract, so a leftover allowance to it is lower risk than one to an unknown spender. It still widens your attack surface: if you ever sign on a phishing clone that routes through a look-alike contract, or a protocol component is compromised, an open allowance is what gets used.
Revoking takes a minute in the Approvals Monitor and you can approve the exact amount again next time. If you are unsure whether a spender really is the router, compare the full address as described in SunSwap vs unknown spenders.
Read both prompts in an approve-then-swap flow
On a first visit, a legitimate DEX shows two transactions: the approve and then the swap. Read both. Check that the approve amount matches the trade and that the swap actually follows. Phishing flows often stop after the approve and drain the wallet later. The whole sequence is described in the DEX allowance lifecycle.
A treasury policy that blocks unlimited approvals
For companies and OTC desks, the simplest rule is also the most effective: no unlimited approvals on custody wallets or settlement hot wallets, ever. DeFi activity happens on separate wallets with exact allowances and a limited balance, and every leftover approval is revoked at the end of the day.
- Keep a written list of approved spenders for each operational wallet.
- Review the list against the Approvals Monitor every week.
- Treat any unlimited approval found on a custody wallet as an incident.
How to structure those wallets is covered in cold and hot wallet separation.
Frequently asked questions
Do exact approvals stop all drainers?
They limit how much you can lose through that spender. A malicious unlimited approval signed in another session is still dangerous, so audit all spenders regularly.
How do I set an exact approval amount on SunSwap?
Use the exact-amount option if the interface offers it, or edit the amount in your wallet's signing screen. If neither is possible, approve, swap and then revoke the leftover allowance.
Are permit-style signatures used on TRON?
Less often than on Ethereum. If a dApp asks you to sign an off-chain permit or message, read it as carefully as an on-chain approve.
Is an unlimited approval to the official SunSwap router safe?
It is lower risk than one to an unknown spender, but not risk-free. Revoke it when you are not actively trading.
Exact or unlimited for active traders?
Traders can accept a bit more friction with exact approvals, or use larger allowances on a dedicated trading wallet and revoke on a fixed schedule.