Skip to content
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

fix: mint and transfer funds back to escrow account on timeout or ack error #170

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

jtieri
Copy link
Member

@jtieri jtieri commented Mar 19, 2024

Previously we were failing to mint and transfer funds back to the escrow account in the case of a timeout or acknowledgement error but were still issuing the refund back to the sending chain. For forwards that involved IBC assets that were wrapped two or more times, this would result in the escrow account balance being less than the total supply of tokens on the counterparty.

@github-actions github-actions bot added the packet-forward-middleware Label for items related to the packet forward middleware label Mar 19, 2024
@jtieri jtieri enabled auto-merge (squash) March 19, 2024 15:55
@jtieri jtieri requested review from Reecepbcups and agouin March 19, 2024 15:56
@jtieri jtieri merged commit 508e57d into main Mar 19, 2024
9 checks passed
@jtieri jtieri deleted the justin/fix-deps-v8 branch March 19, 2024 19:20
prnk28 added a commit to onsonr/sonr that referenced this pull request Oct 21, 2024
…d-middleware/v8 from 8.0.2-0.20240228211029-91e486ec4dbb to 8.0.2 (#1133)

Bumps
[github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8](https://github.com/cosmos/ibc-apps)
from 8.0.2-0.20240228211029-91e486ec4dbb to 8.0.2.

Release notes

*Sourced from*
[*github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8's
releases*](https://github.com/cosmos/ibc-apps/releases)*.*

> ## packet-forward-middleware v8.0.2
>
> ## Note
>
> This release includes the patch for the [Mandrake
vulnerability](GHSA-v8p4-qhq4-f7h8)
>
> We recommend that you upgrade to the patched version, create a new
release for your chain binary, and coordinate an upgrade with validators
as soon as reasonable.
>
> In addition to patching packet-forward-middleware, it is imperative
that you check the balances of each escrow account against the total
supply of each asset on the associated counterparty chain. Failure to
verify parity between the escrow accounts and the counterparty total
supply can result in a type of Denial-of-Service where users may not be
able to unwind their assets through your chain. You can use our [escrow
checker tool](https://github.com/strangelove-ventures/escrow-checker) or
whatever means you deem fit to validate these balances against the
counterparty total supply. If a discrepancy is found, you will need to
build an upgrade handler that mints and transfers assets to the escrow
account(s) with the discrepancy. Strangelove has provided an [example
upgrade
handler](https://gist.github.com/jtieri/0b41fa96eac44ea1c0b5de63d23aa662)
or you can see the upgrade handler used by the [Cosmos
Hub](https://github.com/cosmos/gaia/blob/0b1f3d80359709de48116baecb810c521960a575/app/upgrades/v15/upgrades.go#L360-L458).
>
> ## What's Changed
>
> * Remove gogo/protobuf replace directive in async-icq/v8 by
`@​Taztingo` in
[cosmos/ibc-apps#168](https://redirect.github.com/cosmos/ibc-apps/pull/168)
> * fix: mint and transfer funds back to escrow account on timeout or
ack error by `@​jtieri` in
[cosmos/ibc-apps#170](https://redirect.github.com/cosmos/ibc-apps/pull/170)
>
> **Full Changelog**:
<cosmos/ibc-apps@middleware/packet-forward-middleware/v8.0.1...middleware/packet-forward-middleware/v8.0.2>

Commits

* See full diff in [compare
view](https://github.com/cosmos/ibc-apps/commits/middleware/packet-forward-middleware/v8.0.2)

![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8&package-manager=go_modules&previous-version=8.0.2-0.20240228211029-91e486ec4dbb&new-version=8.0.2)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

---

Dependabot commands and options 

You can trigger Dependabot actions by commenting on this PR:

* `@dependabot rebase` will rebase this PR
* `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
* `@dependabot merge` will merge this PR after your CI passes on it
* `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
* `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
* `@dependabot reopen` will reopen this PR if it is closed
* `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
* `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
* `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
* `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
* `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packet-forward-middleware Label for items related to the packet forward middleware
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants