You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
When a multi-hop IBC transfer takes place there's a chance that the second hop fails. If that's the case the tokens are returned to the sending chain. In a multi-hop scenario this is not always the original sending chain. That means that a user has to find which chain their assets landed on, and hope that the chain they landed on was using an address they control. This is part of the multihop design, that users designate an address on each chain that they control in order to remain in control of the funds should the multi-hop transfer fail.
Proposed Solution
Create an escrow module on each chain that is used to hold the tokens and record who the original sender was. When a transfer hop fails it is sent back to this escrow module and correlated to the original sender. In this scenario anyone can execute a "return-to-sender" message, not just the original sender who has to find their stalled transfer. Also this decreases the chance that the original sender accidentally uses an address they don't control (or keeps them from having to create an account they control in the first place).
Sketched solution
on initial receipt of IBC transfer
parse sender and final destination
create an ID of the transfer if the equivalent doesnt' already exist in IBC
store the ID with information about amount and original sender and a boolen set to false in a keeper
get module based account for escrow tracking
create the second hop transfer packet from the escrow tracking module based account
if the second hop succeeds delete the transfer ID from the keeper
if the second hop fails mark the boolean as true for that ID
create a message type that checks whether any transfer ID with boolean true exists (can be targeted or general)
this message will create an outgoing IBC transfer back to the original sender and can be executed by anyone (or automatically in endblocker)
The text was updated successfully, but these errors were encountered:
Problem
When a multi-hop IBC transfer takes place there's a chance that the second hop fails. If that's the case the tokens are returned to the sending chain. In a multi-hop scenario this is not always the original sending chain. That means that a user has to find which chain their assets landed on, and hope that the chain they landed on was using an address they control. This is part of the multihop design, that users designate an address on each chain that they control in order to remain in control of the funds should the multi-hop transfer fail.
Proposed Solution
Create an escrow module on each chain that is used to hold the tokens and record who the original sender was. When a transfer hop fails it is sent back to this escrow module and correlated to the original sender. In this scenario anyone can execute a "return-to-sender" message, not just the original sender who has to find their stalled transfer. Also this decreases the chance that the original sender accidentally uses an address they don't control (or keeps them from having to create an account they control in the first place).
Sketched solution
The text was updated successfully, but these errors were encountered: