Web3 Security Series: Can funds mistakenly transferred to other blockchains be recovered? | Bee Network
An EOA (Externally Owned Account) is what we commonly refer to as a regular wallet address that is directly controlled by a private key or mnemonic phrase.
Prerequisites for asset recovery:
You have transferred your assets to an EOA address. You possess the private key or mnemonic phrase for this target EOA address. (This is usually another wallet address of your own, or a friend’s address that they are willing to cooperate). The target chain is an EVM-compatible chain.Methods to recover assets:
The holder of the private key to the receiving EOA address can directly withdraw funds on the target blockchain.
2. Scenario 2: The receiving address is the contract.This is one of the most desperate scenarios. Because the smart contract’s address is not generated by the private key, no one owns the smart contract’s private key and therefore cannot control the contract in the same way they control the EOA. Furthermore, if the contract does not have a pre-written rescue function to handle “accidentally transferred assets,” the mistakenly transferred funds may be permanently locked in the contract, and no one can retrieve them.
However, in some cases, there is indeed a glimmer of hope. Next, we will construct a scenario where ETH is locked on the Ethereum mainnet, and then explain how to rescue the funds.
2.1. Scene IntroductionIn summary, this scenario involves a user intending to invoke a contract on the Sepolia testnet to transfer ETH into the contract for token minting. However, during the transaction initiation, an incorrect connection was made to the mainnet, resulting in the ETH being locked in the mainnet contract. The specific scenario construction process is as follows:
1. On the Ethereum Sepolia testnet, the project team (EOA) deployed an implementation contract . Assume the main function of this contract is for users to deposit ETH to mint corresponding Aटोकनs, with code similar to the “mintTokens” function. Assume the deployment address is A. Note that there is no function in A that allows direct ETH withdrawal.
2. On the Ethereum Sepolia testnet, the project team (EOA) deployed a factory contract . This contract’s function is to deploy a proxy contract pointing to the implementation contract (as shown in the function “deployProxyByImplementation”) using minimal proxy contracts (Clones) based on the provided implementation contract address and salt. Assume the deployment address is B. Here, we call the “deployProxyByImplementation” function, passing the implementation contract A address as `_implementation`, to deploy a proxy contract pointing to A at address C.
3. A user wants to mint ATokens on the Sepolia testnet by transferring ETH. The user initiates a call to the proxy contract C. Normally, proxy contract C would further call the “mintTokens” function, which implements contract A, to complete the user’s operation. However, during the call, the user incorrectly connects to the Ethereum mainnet. Consequently, the user directly transfers ETH to address C on the Ethereum mainnet. At this point, no contract is deployed on address C on the Ethereum mainnet, and no one owns the private key for address C. Therefore, the user’s funds are temporarily locked in address C on the mainnet.
2.2. Key Knowledge PointsBefore introducing the specific rescue plan, let’s first introduce some basic knowledge points needed for rescue.
2.2.1. create & create2
`create` and `create2` are two common ways to deploy contracts in Solidity.
When deploying a contract using the `create` function, the contract address is determined by the address of the transaction initiator and the account’s transaction count (nonce), and is unrelated to the contract’s content. When deploying a contract using create2, the calculation of the contract address no longer depends on the transaction initiator’s nonce, but is related to the following four parameters. 0xff The contract address for creating a new contract. The obfuscation value (salt) used as a parameter The creation bytecode (init_code) of the contract to be created.2.2.2. Minimal Agent Contracts (Clones)
https://docs.openzeppelin.com/contracts/4.x/api/proxy#clonesMinimal proxy contracts, also known as clone contracts, are based on the idea of deploying a proxy contract with extremely low cost (Gas) that points to a specified implementation contract. In a clone contract, the proxy contract can be deployed using either the `create` or `create2` method. For example, deploying a proxy contract using the `cloneDeterministic` function employs the `create2` method.
In the “cloneDeterministic” function, the bytecode of the created proxy contract is very short, in the format: “0x363d3d373d3d3d363d735af43d82803e903d91602b57fd5bf3″. The address of the implementation contract is directly hard-coded into the bytecode, and all calls to the proxy contract are delegated to the implementation contract.
As can be seen from the “cloneDeterministic” function, it uses the create2 method to create a proxy contract. The address of the created proxy contract is related to the address of the contract creator, the salt, the address of the implementing contract, and a fixed string of bytecode, but it is unrelated to the bytecode of the implementing contract.
2.3. Rescue PlanNext, we’ll explain how to rescue a user’s ETH held in the mainnet C address. The main idea is to deploy contract code on the Ethereum mainnet C address to take over the address and extract the ETH. The specific steps are as follows:
1. Deploy a factory contract on the mainnet with the same address B as on the testnet. The reason for needing the same factory contract address is that when subsequently calling “cloneDeterministic” to deploy the proxy contract, the address calculation of the proxy contract is related to the factory contract address. By examining the transaction deploying the factory contract on the Sepolia testnet, obtain the nonce of the deployer (project address) in this transaction. On the mainnet, advance the nonce of the project owner’s (EOA) address to the nonce before deploying the factory contract. Then deploy the factory contract on the mainnet. Since the deployer’s address and nonce are the same as the deployment transaction on the testnet, the factory contract address deployed on the mainnet will also be B.
2. Deploy the implementation contract on the mainnet at the same address A as on the testnet. As mentioned in the #Minimum Proxy Contract (Clones)# section, deploying a proxy contract using the “cloneDeterministic” function of the Clones contract calculates the proxy contract address. The calculated proxy contract address depends on the input parameter `salt` and the implementation contract address, but is independent of the implementation contract’s bytecode. Therefore, we only need to deploy one contract on address A; the specific content of the contract does not affect the calculation of the proxy contract address. We can then directly deploy a contract with ETH extraction functionality on address A, as shown in the code below.
On the testnet, implementation contract A is deployed by the project owner’s address (EOA). Therefore, the address of implementation contract A is only related to the transaction initiator and its nonce. Thus, by observing the transactions that deploy implementation contract A on the testnet, finding the relevant nonce, pushing the project owner’s address (EOA) on the mainnet to the specified nonce, and then deploying implementation contract A, you can proceed.
3. Deploy a proxy contract on the mainnet at the same address C as the testnet. Observe the transactions of the proxy contract C deployed on the testnet, obtain the salt information, and call the “deployProxyByImplementation” function of the factory contract B, passing the address of the implementation contract A and the salt as parameters. This will deploy the proxy contract at address C on the mainnet.
4. The mainnet proxy contract C is invoked to withdraw funds. The project address (EOA) calls the withdraw function of proxy contract C, specifies the recipient of funds, successfully withdraws the frozen ETH from proxy contract C, and then returns it to the relevant user.
2.4. SummaryAs can be seen from the above rescue plan, the funds can only be recovered if many conditions are met simultaneously, such as the contract deployer’s relevant nonce on the target chain not being used, the contract trapping the funds having a withdrawal function or being able to deploy a withdrawal function in various ways (the contract can be upgraded or a proxy such as Clones can be used, etc.).
Therefore, everyone must be extremely careful when trading, meticulously verifying each transaction before interacting with the contract. Before engaging with the contract, you can use ZAN’s AI SCAN vulnerability scanning tool to check its security. If your funds are accidentally locked, don’t panic; you can contact ZAN’s contract security audit team to try and help you recover your funds.
This article was written by Cara ( @Cara6289 ) ZAN टीम (X खाता) @zan_team ) & AntChain OpenLabs (X account @AntChainOpenLab ).
यह लेख इंटरनेट से लिया गया है: Web3 Security Series: Can funds mistakenly transferred to other blockchains be recovered?Recommended Articles # विश्लेषण# इथेरियम# टोकन# टूल# वेब3© 版权声明सरणी 上一篇 Has Bitcoin's four-year cycle failed? 下一篇 Weekly Editor's Picks (November 15-21) 相关文章 Bitget Wallet Research Institute: A Review of the OpenClaw and Moltbook Incidents, from the AI Social Narrative to the Vision of an Agent Economy 6086cf14eb90bc67ca4fc62b 8,599 2 नयाEnding Zero-Sum Games: In-Depth Research Report on Web3 Incentive Engineering and Odyssey Behavioral Dynamics 6086cf14eb90bc67ca4fc62b 4,175 1 The story of Brother Machi’s “zeroing out”: His account peaked at nearly $60 million, vanishing in 47 days. 6086cf14eb90bc67ca4fc62b 20,049 गर्मEthereum’s AI Transformation Moment: What Projects Are Worth Watching Under the ERC-8004 Standard? 6086cf14eb90bc67ca4fc62b 9,114 1 PI Coin Plummets 24%: Is Seller Fatigue Signaling a Rebound? झांगमिंग लुओ 836,685 502 CoinEx Research August 2025 Monthly Report: Double All-Time HighRecommended Articles 6086cf14eb90bc67ca4fc62b 23,008 कोई टिप्पणी नहीं टिप्पणी करने के लिए आपको लॉगिन होना होगा! तुरंत लॉगइन करें कोई टिप्पणी नहीं... Bee.com दुनिया का सबसे बड़ा Web3 पोर्टल भागीदारों कॉइनकार्प बिनेंस कॉइनमार्केटकैप कॉइनगेको कॉइनलाइव कवच बी नेटवर्क ऐप डाउनलोड करें और वेब3 यात्रा शुरू करें सफेद कागज भूमिकाएँ सामान्य प्रश्न © 2021-2026. सर्वाधिकार सुरक्षित।. गोपनीयता नीति | सेवाओं की शर्तें बी नेटवर्क ऐप डाउनलोड करें और वेब3 यात्रा शुरू करें दुनिया का सबसे बड़ा Web3 पोर्टल भागीदारों CoinCarp Binance CoinMarketCap CoinGecko Coinlive Armors सफेद कागज भूमिकाएँ सामान्य प्रश्न © 2021-2026. सर्वाधिकार सुरक्षित।. गोपनीयता नीति | सेवाओं की शर्तें खोज खोजइनसाइटऑनचेनसामाजिकसमाचार उत्तर: एयरड्रॉप शिकारी डेटा विश्लेषण क्रिप्टो हस्तियाँ ट्रैप डिटेक्टर हिन्दी English 繁體中文 简体中文 日本語 Tiếng Việt العربية 한국어 Bahasa Indonesia اردو Русский हिन्दी智能索引记录
-
2026-03-02 10:03:28
综合导航
成功
标题:Kev Adams et Franck Dubosc, interview cool & décalée pour le Monde de Dory
简介:La rédaction de Be a rencontré Franck Dubosc et Kev Adams po
-
2026-03-02 10:38:30
综合导航
成功
标题:CCS - The Premier Online Skate Shop for Skateboards & Skate Gear
简介:CCS is your go-to retailer for skaters of all levels. Shop a
-
2026-03-02 10:06:19
综合导航
成功
标题:How PIP is Different than the others. - PIP
简介:How We Do what We Do at PIP.
-
2026-03-02 14:14:26
教育培训
成功
标题:[合集]学生游记作文
简介:在平平淡淡的学习、工作、生活中,大家或多或少都会接触过作文吧,作文根据体裁的不同可以分为记叙文、说明文、应用文、议论文。
-
2026-03-02 10:37:55
视频影音
成功
标题:逆袭从签到神级姐姐开始第15集红豆剧场_在线播放[高清流畅]_爽文短剧
简介:爽文短剧_逆袭从签到神级姐姐开始剧情介绍:逆袭从签到神级姐姐开始是由内详执导,内详等人主演的,于2025年上映,该都市讲
-
2026-03-02 13:53:35
游戏娱乐
成功
标题:小黑花花果冻泡泡堂,小黑花花果冻泡泡堂小游戏,4399小游戏 www.4399.com
简介:小黑花花果冻泡泡堂在线玩,小黑花花果冻泡泡堂下载, 小黑花花果冻泡泡堂攻略秘籍.更多小黑花花果冻泡泡堂游戏尽在4399小
-
2026-03-02 13:08:43
综合导航
成功
标题:Columella (4-70). The Reader's Biographical Encyclopaedia. 1922
简介:Columella (4-70). The Reader
-
2026-03-02 13:54:51
职场办公
成功
标题:财务记账凭证通用表格模板-果果圈模板
简介:办公模板,财务记账凭证通用表格模板
-
2026-03-02 10:30:11
综合导航
成功
标题:Color Me Girlsplay - Play The Free Mobile Game Online
简介:Color Me Girlsplay - click to play online. Join our Girlspla
-
2026-03-02 10:25:30
综合导航
成功
标题:Humans and machines: Ethical collaborations in evaluation ICF
简介:ICF leverages ethical AI in EU evaluations to enhance data a
-
2026-03-02 10:39:54
综合导航
成功
标题:James Mullen Fish & Richardson
简介:In his work as a patent litigator, James Mullen advocates fo
-
2026-03-02 12:48:30
综合导航
成功
标题:铭记历史 珍视和平_600字_作文网
简介:观《纪念抗日战争胜利70周年大阅兵》有感 观看了纪念抗日战争胜利70周年大阅兵,心里不仅为了国家的强盛而自豪最重要的是,
-
2026-03-02 10:27:33
综合导航
成功
标题:Star Wars Jedi: Survivor - PlayStation Universe
简介:Get the absolute latest Star Wars Jedi Survival news, review
-
2026-03-02 12:51:29
教育培训
成功
标题:(优选)一件快乐的事作文15篇
简介:在学习、工作乃至生活中,大家或多或少都会接触过作文吧,作文根据写作时限的不同可以分为限时作文和非限时作文。那么问题来了,
-
2026-03-02 12:31:23
教育培训
成功
标题:沈阳的作文600字
简介:在日常生活或是工作学习中,大家总免不了要接触或使用作文吧,借助作文可以提高我们的语言组织能力。你知道作文怎样写才规范吗?
-
2026-03-02 13:08:05
电商商城
成功
标题:MERCURY MW306R怎么样 - 京东
简介:京东是专业的MERCURY MW306R网上购物商城,为您提供MERCURY MW306R价格图片信息、MERCURY
-
2026-03-02 10:16:27
教育培训
成功
标题:三年级作文7篇(经典)
简介:在学习、工作、生活中,大家都不可避免地会接触到作文吧,作文是通过文字来表达一个主题意义的记叙方法。怎么写作文才能避免踩雷
-
2026-03-02 06:37:06
综合导航
成功
标题:二年级作文300字【范例10篇】
简介:在我们平凡的日常里,说到作文,大家肯定都不陌生吧,作文是经过人的思想考虑和语言组织,通过文字来表达一个主题意义的记叙方法
-
2026-03-02 12:36:03
综合导航
成功
标题:不甘示弱!伊朗亮钻地弹模拟打击美军达夫拉基地,美军如坐针毡 战机 阿联酋 武器装备_网易订阅
简介:不甘示弱!伊朗亮钻地弹模拟打击美军达夫拉基地,美军如坐针毡,美军,伊朗,演习,战机,阿联酋,钻地弹,弹道导弹,武器装备,
-
2026-03-02 10:38:08
综合导航
成功
标题:NJ Devil Mascot Visits New Jersey Devils
简介:Book NJ Devil to visit your seat during a Devils home game a
-
2026-03-02 13:51:33
综合导航
成功
标题:Body Care Products - Cruelty-Free Vegan Products by Deepika Padukone – 82°E
简介:Discover our best body care products, powered by our unique
-
2026-03-02 10:21:18
教育培训
成功
标题:马仰人翻的意思解释_马仰人翻是什么意思-雄安文学网
简介:马仰人翻是什么意思?雄安文学网为您提供马仰人翻的意思解释、拼音、近反义词,以及马仰人翻成语接龙,供成语爱好者参考学习用。
-
2026-03-02 12:25:33
数码科技
成功
标题:无线网卡插电脑上没反应怎么办 快速解决方法大全-驱动人生
简介:无线网卡是连接电脑与无线网络的设备,但有时候我们会遇到无线网卡插上电脑后没有任何反应的情况。下面为您介绍解决无线网卡插电
-
2026-03-02 12:17:44
综合导航
成功
标题:关于压岁钱的作文:压岁钱感恩作文 篇51_600字_作文网
简介:春节,是我国最盛大的节日。也是我最期待的节日。因为,在春节里,我会收到好多好多的压岁钱。记得那年三十的前一夜,一想到马上
-
2026-03-02 14:11:21
综合导航
成功
标题:Wace (c. 1110-c. 1175). Library of Literary Criticism. 1901-05
简介:Wace (c. 1110-c. 1175). Charles Wells Moulton, ed. Library o
-
2026-03-02 12:33:31
综合导航
成功
标题:Let’s ignite Canada’s next era of economic growth PwC Canada
简介:How government leaders can boldly advance Canada’s prosperit
-
2026-03-02 12:32:06
教育培训
成功
标题:骄傲的作文400字
简介:导读:作文简介,在一个安静祥和的小村庒的一座房屋里,忽然传来了一幅画和一枝铅笔的争吵。画说:“我那么美丽,怎么能待在 如
-
2026-03-02 09:58:15
综合导航
成功
标题:DVO NEWSLETTER January, 2013
简介:HomeCook
-
2026-03-02 10:34:04
综合导航
成功
标题:2014+ Polaris RZR Front Speakers MTX - Serious About Sound®
简介:Fully assembled front speaker pods with integrated RGB light
-
2026-03-02 10:32:34
综合导航
成功
标题:Assemani. The Reader's Biographical Encyclopaedia. 1922
简介:Assemani. The Reader