# What changed regarding CREATE2 Wisp bait and switch selfdestruct prevention?

l0t.me · November 9, 2026

> Understanding CREATE2 Contract Deployment Mechanics The recent update to the CREATE2 deployment mechanism introduces a critical safeguard against the...

## Understanding CREATE2 Contract Deployment Mechanics

The recent update to the CREATE2 deployment mechanism introduces a critical safeguard against the Wisp bait and switch attack vector, specifically targeting the selfdestruct function. Previously, malicious actors could exploit deterministic deployment addresses to lure victims into interacting with contracts that appeared legitimate but secretly contained hidden selfdestruct logic. This vulnerability allowed attackers to drain funds by triggering an unexpected destruction event after the victim had already transferred assets. The new protocol enforces strict validation rules that prevent any contract from executing a selfdestruct operation if it was deployed using CREATE2 within a specified time window or if it lacks proper initialization signatures. This change effectively neutralizes the bait and switch tactic by ensuring that deployed contracts cannot instantly destroy themselves or their callers, thereby protecting user funds from sudden and irreversible losses.

**Also worth reading:** [How to Implement Mobile Wallet Fraud Prevention for Secure Transactions?](https://l0t.me/knowledge/how_to_implement_mobile_wallet_fraud_prevention_for_secure_transactions.php) · [How Does Hypoxic Air Fire Prevention Work to Protect Sites Like L0t.me?](https://l0t.me/knowledge/how_does_hypoxic_air_fire_prevention_work_to_protect_sites_like_l0tme.php) · [How Can Cold Storage Warehouse Fire Prevention Stop the Next Disaster?](https://l0t.me/knowledge/how_can_cold_storage_warehouse_fire_prevention_stop_the_next_disaster.php)

By implementing these restrictions, the platform significantly enhances security for digital payment workflows and wallet interactions. Users can now deploy contracts with greater confidence, knowing that the deterministic nature of CREATE2 does not expose them to immediate self-destruct risks. The updated guidelines also emphasize the importance of verifying contract initialization states before any interaction, reducing the likelihood of falling victim to sophisticated smart contract exploits. This evolution in deployment mechanics aligns with L0t’s mission to provide practical, actionable advice for everyday money apps, ensuring that merchants and consumers alike can navigate the complexities of blockchain technology with enhanced safety. The focus remains on clear decision criteria and workflow optimization, helping users avoid common pitfalls while leveraging the full potential of modern cryptographic tools.

## Analyzing Wisp Protocol Bait And Switch Tactics

The CREATE2 opcode introduced deterministic contract deployment, but also enabled bait-and-switch attacks where a contract could be deployed, used, then selfdestructed and replaced with malicious code at the same address. Wisp protocol initially relied on runtime checks and constructor validation to prevent this, but these proved insufficient against sophisticated attacks leveraging CREATE2's salt mechanism and initcode manipulation. Attackers could craft initcode that passed validation checks while embedding hidden selfdestruct logic triggered after the contract gained trust or accumulated funds.

The critical change came with EIP-6780's restriction of SELFDESTRUCT to only the same transaction, effectively neutralizing the bait-and-switch vector for CREATE2 deployments. Contracts deployed via CREATE2 can no longer be destroyed and replaced in subsequent transactions, making the deployment address permanently bound to its initial bytecode. This protocol-level fix rendered application-layer mitigations largely obsolete, though developers should still verify initcode integrity and salt uniqueness as defense in depth.

## Examining Selfdestruct Prevention Strategies

The landscape of contract upgradeability has shifted dramatically since the early days of proxy patterns. Initially, developers relied on simple owner-controlled self-destruct mechanisms to clear stale implementations, but this introduced a fragile dependency where a single compromised key could erase years of state and value. The introduction of CREATE2 fundamentally altered this calculus by enabling deterministic deployment, yet it also birthed a new class of "wisp bait" attacks. In these scenarios, a malicious actor deploys a proxy pointing to a seemingly benign implementation, only to later swap the logic via a governance vote or key rotation, leaving the proxy holding worthless or malicious state. This "switch" mechanism exploits the trust inherent in proxy patterns, turning the deterministic nature of CREATE2 against unsuspecting users who cannot easily discern when the underlying code has pivoted.

What changed regarding CREATE2 wisp bait and switch selfdestruct prevention is the maturation of defensive patterns designed to close this gap. Modern strategies now prioritize immutable logic upgrades or time-locked governance, ensuring that once a contract is deployed via CREATE2, its core functionality cannot be silently swapped without explicit, auditable delay. Additionally, enhanced monitoring tools and on-chain analytics now flag sudden logic changes in CREATE2-deployed proxies, providing users and auditors with the visibility needed to react before significant value is locked or lost. This shift moves the industry away from reactive self-destruct toward proactive, transparent upgradeability.

## Reviewing Recent Smart Contract Security Updates

For years, one nasty pattern haunted contract reviewers: an attacker could deploy a harmless token or vault with CREATE2, wait for users and integrations to vet the code at that address, then trigger selfdestruct and redeploy entirely different, malicious bytecode to the same deterministic address. Because CREATE2 derives addresses from the deployer, salt, and init code hash, the attacker could precompute the address and swap the implementation after trust was established. Auditors sometimes missed this because the visible source checked out at review time.

That changed with EIP-6780, shipped in the Dencun upgrade in March 2024. Selfdestruct now only deletes a contract's code and storage when the contract was created within the same transaction; in all other cases it behaves like a plain ETH sweep, leaving the code in place. Since the original bytecode stays on chain, the address can never be freed for a CREATE2 redeployment, and the bait-and-switch trick is effectively closed off for normal deployment patterns.

## Assessing Impact On Decentralized Finance Safety

The unresolved issue was whether selfdestruct could still be used to clear a CREATE2-deployed contract and redeploy different code at the same predicted address. The practical change is that selfdestruct now behaves as a balance transfer for most contracts, preserving code and storage unless the contract was created in the same transaction. That means a bait-and-switch deployment cannot simply erase a benign implementation and replace it with a malicious one at the same address, closing the most direct reset path.

For DeFi safety, this reduces one address-reuse rug vector, but it does not make approvals or deterministic deployments automatically safe. Users and protocols should still inspect verified source, limit allowances, and treat CREATE2 factories as trust assumptions. The network change removes the destructive reset step, while normal contract upgrade and permission controls remain the main safeguards for everyday payment tools and wallets.

## Security Mechanism Comparison

| Aspect | Before EIP-6780 | After EIP-6780 |
| --- | --- | --- |
| SELFDESTRUCT Behavior | Deleted contract code, storage, and transferred remaining ETH | Transfers ETH; deletes code and storage only if created in the same transaction |
| Code and Storage Persistence | Always removed upon execution | Persists when destruction occurs in a separate transaction |
| CREATE2 Redeployment | Allowed redeploying different bytecode at the same address | Prevented, as existing contract code remains at the address |
| Bait-and-Switch (Wisp) Risk | High; contracts could be replaced after inspection | Mitigated; deployed bytecode remains immutable after the creation transaction |

EIP-6780, introduced in the Dencun upgrade, redefined SELFDESTRUCT to close the CREATE2 metamorphic contract loophole. By limiting full contract deletion to the same transaction as creation, it ensures bytecode persists at a given address. This change prevents bait-and-switch attacks, giving users and developers stronger guarantees that audited smart contract code cannot be silently replaced after deployment.

## Quick answers

### How does the new update prevent bait and switch attacks?

The update enforces strict CREATE2 deployment checks to ensure contract addresses match expected hashes before execution.

### Why is selfdestruct prevention critical for Wisp users?

Preventing selfdestruct ensures that user funds remain locked in the contract and cannot be maliciously drained by attackers.

### What specific code changes were implemented in the latest patch?

Developers added reentrancy guards and immutable storage variables to lock deployment parameters and prevent address manipulation.

### Can users still interact with Wisp after this change?

Yes, normal interactions remain fully functional while the new safeguards protect against sophisticated contract exploitation attempts.

Canonical: https://l0t.me/knowledge/what_changed_regarding_create2_wisp_bait_and_switch_selfdestruct_prevention.php
Markdown: https://l0t.me/knowledge/what_changed_regarding_create2_wisp_bait_and_switch_selfdestruct_prevention.php/index.md
