Skip to content

fix(transfer): reject slash base denoms on recv to prevent locked escrow#53

Open
notJoon wants to merge 4 commits into
allinbits:masterfrom
notJoon:fix/slash-denom-recv-send
Open

fix(transfer): reject slash base denoms on recv to prevent locked escrow#53
notJoon wants to merge 4 commits into
allinbits:masterfrom
notJoon:fix/slash-denom-recv-send

Conversation

@notJoon

@notJoon notJoon commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

OnRecvPacket minted vouchers for slashed base denoms that OnSendPacket already rejects, creating vouchers that could never be sent back and permanently locking counterparty escrow.

Commit 4b5fc7e moved slash validation from unmarshalPayload to OnSendPacket to keep refund paths permissive, but it also removed the check from the recv mint path and introduced a send/recv asymmetry.

This PR restores that symmetry by rejecting slashed base denoms in OnRecvPacket before minting. Instead of creating an unusable voucher, the recv chain returns an error acknowledgement, allowing the sender to be refunded via the existing ack-error flow.

@tbruyelle tbruyelle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check does not exists in the legacy ibc-go implementation, so it assumes that any denom with slash was rejected during the SendPacket and there is no need to check in RecvPacket.

In a sense, adding this check in RecvPacket seems legit, we should not trust the counterparty chain to adhere to the protocol. So I'm OK with this change.

I just need you to address some comments. Thanks!

Comment thread gno.land/r/aib/ibc/apps/transfer/app.gno Outdated
@notJoon notJoon requested a review from tbruyelle June 10, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants