-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a transfer module account as an intermediary address for forwards #6561
Comments
adding needs discussion here, we have an either or we should take care of deciding on (probably requiring some investigation) |
I recommend we switch to a module account. In SDK v0.50, bank keeper's The simplifications I'm doing in #6558 would benefit from the ability to use |
I also think module account is the right choice here because it will reduce the risk that we get that forwarding address logic wrong. And the SDK has this functionality built in for exactly these kinds of use cases: https://docs.cosmos.network/main/build/modules/bank#module-accounts |
Yes we should use SDK module accounts (for forwarding escrow) 👍 Context on why transfer doesn't use module accounts already is that transfer was developed before module accounts was a feature. Migrating all escrow addresses is quite sensitive (and not necessarily beneficial given that the current construction is safe). But this historical baggage should not inform our current decisions when possible. We also use module accounts in ics29 |
Did some extra thinking about needing to create isolated buckets based on the hop port/channel, but it doesn't seem to provide any security benefits. Transfer escrow addresses being indexed by destination port/channel is useful since it creates fault tolerance. If connection to chainB goes malicious, chainB cannot steal funds in escrow for chainC Given that the only funds moving through the forward address go through the normal transfer logic, I don't see how a malicious chain could generate some sequence of steps to steal from funds deposited through the forward address. In addition, funds should never be stored in the forward address after the transfer message completes execution. When receiving a packet, tokens are either unescrowed or minted to the forwarding address which will then either escrow or burn. Upon refunds, tokens are either unescrowed or minted to the forwarding address, which will then either be escrow or burned when reversing to the original sender. |
Closed by #6688 |
Reference code:
ibc-go/modules/apps/transfer/types/keys.go
Lines 86 to 97 in efcfa5d
Surfaced during internal walkthrough of ics20 v2 forwarding (commit efcfa5d)
For Admin Use
The text was updated successfully, but these errors were encountered: