When I called a script on the mainnet, the transaction failed and was reverted. However, the input UTXO has not been returned and disappeared from my wallet.
My understanding is that when a transaction is reverted, everything should return to the state prior to the execution except for gas fees.
Why is this happening, and is there a way to recover my assets?
@rishabhkeshan
Thank you for your reply and the reference link.
I understand that, unlike EVM, reverting a transaction does not necessarily mean returning to the pre-execution state, though I still feel it is not intuitive behavior.
In my case, it seems that not specifying Output Change was the root cause.
Does this mean that the input assets were burned and lost forever?
The lost amount is not small, and I hope there is a way to recover them
Fuel Explorer
Hey @Shikimi just to understand more on this, did this happen while interacting with Mira dapp or were you executing your own scripts?
@rishabhkeshan
I executed a script via Rust SDK. The script itself was cloned from Mira’s official repository (github). Transaction failed since I had missing contract_id, and another mistake was missing output changes for ezETH.
@rishabhkeshan
Any update on this?
What I would like to know is:
- Have my coins been burned and lost, or are they still somewhere in limbo?
The loss of 16 ezETH is not a negligible amount. - Why is it possible to execute a transaction that results in the complete loss of InputCoin without any safeguard? If an unused coin disappears when there is no OutputChange corresponding to the InputCoin, then OutputChange should be a requirement and validated before execution.
The contract was correct, and the script was also legitimate. I lost all my coins just because I misconfigured one parameter. In other blockchains, misconfigured parameter simply results in a transaction failure, it would not cost more than gas fees.
I attempted to swap just 0.1 ezETH, but I ended up losing 16 ezETH. It’s hard to accept.
ANY UPDATES?
It seems like only phishing scammers are looking at this thread.
Hey sir,
we’re looking into it internally and will get back to you asap @Shikimi
Hey @Shikimi ,
Thanks for your patience.
After reviewing the transaction, it appears the ezETH was lost because a change output wasn’t specified in your custom transaction code. Without this, any unused funds in the transaction were burned automatically, meaning they’re unfortunately permanently lost and can’t be recovered on-chain.
Here’s a quick breakdown of what happened:
-
Custom Code Execution: While you used Mira’s script, it was run through a custom Rust code rather than Mira’s pre-built version. Since a change output wasn’t included in your script, any unspent tokens in the transaction were burned. This is a potential risk when working with custom logic on mainnet.
-
Change Output Handling: The Rust SDK typically handles change outputs for standard transactions. However, for fully custom transactions where inputs and outputs are set manually like this one, it’s necessary to add a change output or use a helper like
adjust_for_fee
to ensure any remaining funds are returned.
In the future, test your logics on Testnet first or with smaller amounts first to help avoid similar issues.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.