The belief that a hacked DeFi contract can empty your whole wallet is wrong: this article shows how deposits and approvals set your actual exposure. An attacker can take funds held in an exploited protocol. Tokens still in your wallet are exposed only when the attacker can abuse an active permission granted to the affected spender. A swap you made in the past does not, by itself, give every contract access to every asset you own.
People often see a protocol’s name in both their swap history and an exploit report, then assume their wallet was part of the loss. The useful distinction is where the assets sat when the attack happened: in a liquidity pool, or at your address. A completed swap and a liquidity deposit create different exposures.
KyberSwap is a decentralized exchange aggregator that finds token swap routes across supported liquidity sources and networks. A cross-chain swap can help you identify the network supplying the input token; any approval to inspect belongs to a particular token and spender on that network. The app’s name alone does not tell you which contract address your wallet permitted to spend.
ERC-20 approvals limit what a compromised spender can take
An ERC-20 allowance gives one spender permission to move a specified amount of one token from your address. The token contract records the owner, spender and remaining amount. When that spender calls transferFrom, the token contract checks the allowance and reduces it by the amount moved. Without that permission or a transfer you sign, the spender cannot simply take ERC-20 tokens from your wallet. This is the mechanism described in the ERC-20 contract documentation.
The exact spender address matters more than the brand shown in a wallet interface. Approval for token A to contract X gives contract X no allowance for token B or for contract Y. An allowance on one network is separate from allowances on another. The chain’s native coin, such as ETH on Ethereum, has no ERC-20 allowance for a contract to use through transferFrom. A wrapped version, such as WETH, is an ERC-20 token and can have one.
Say you hold 600 USDC and have an illustrative remaining allowance of 1,000 USDC for a vulnerable spender. If an attacker can make that spender call transferFrom, it can take all 600 USDC now; the unused allowance could expose USDC you receive later. An unlimited approval likewise exposes your entire current balance of that token and future balances until you revoke or reduce it. The allowance sets the ceiling, while your available balance sets what can leave immediately.
That permission is a possible route into a wallet, not a description of every protocol exploit. In the November 2023 KyberSwap Elastic incident, attackers drained liquidity from affected pools. The operator’s postmortem identifies liquidity providers as the affected users. People who had merely swapped were not drained from their wallets by that pool exploit. An LP had assets inside the pools; a plain swapper’s completed trade had already returned its output to their wallet.
NFT approvals use a different scope. Calling setApprovalForAll authorizes an operator to move every NFT you own in that collection, rather than granting a numeric ERC-20 allowance. Review that operator separately from fungible token spenders. A phishing site may try to obtain such an approval or persuade you to sign a fresh transfer; that is a different route from an attacker exploiting liquidity already deposited in a pool.
Revocation changes the permission, not the wallet balance. In the illustrative USDC case, a successful revoke changes the vulnerable spender’s allowance from 1,000 to zero. Your 600 USDC remains in the wallet, and an unrelated spender’s allowance stays as it was. Funds already deposited in a pool also stay deposited: revoking a wallet approval does not retrieve them. You may need to approve again before making another transaction with that spender.
Related questions about approvals and pool funds
How do I check which token approvals I have?
Use Revoke.cash or the Etherscan Token Approval Checker to list permissions for your address. Select the network where you used the protocol, then read each row’s token, approved spender address and remaining allowance. Review NFT operator approvals too. Compare the spender address with the contract named in the incident; a familiar token symbol or app label is not enough. Connect the wallet to revoke an unused approval, confirm the transaction, and verify that the displayed allowance becomes zero. Repeat on other networks where you have used DeFi.
Is revoking an approval worth the gas?
Revoking an unused or unlimited approval is usually worth considering when the token balance is valuable or you no longer trust the spender. Each onchain revoke costs network gas, which varies with the chain and current demand. Weigh that cost against the amount the spender can still pull, including tokens you may receive later. You can also reduce an allowance to an amount needed for a planned transaction. Disconnecting a website from your wallet does not change an onchain allowance; the approval must be changed onchain.
Are my liquidity pool funds safe if a protocol is hacked?
Liquidity pool deposits are exposed to faults in the contracts holding and accounting for them. If an exploit drains a pool, revoking a separate wallet approval cannot restore the pool’s assets. Look up your position and the protocol’s incident details to establish whether your pool was affected. Then inspect your wallet approvals as a separate step: a pool loss concerns deposited funds, while an active allowance concerns tokens still at your address. Those two states can coexist, and each needs its own answer.