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

Rework shielded action refund #3620

Closed
grarco opened this issue Aug 13, 2024 · 0 comments · Fixed by #3646
Closed

Rework shielded action refund #3620

grarco opened this issue Aug 13, 2024 · 0 comments · Fixed by #3646

Comments

@grarco
Copy link
Contributor

grarco commented Aug 13, 2024

Currently we handle refunds for MASP over IBC transaction by letting the client construct the refund shielding transaction and embedding it in the IBC packet. This, unfortunately, has a problem when it comes to a failure (or timeout) in the IBC transaction involving an asset which is subject to MASP incentives. In this case we'll need to run the refund shielding action but the MASP VP requires the asset to be correctly epoch (i.e. to refer to the current MASP epoch): this is done so that malicious users cannot backdate their assets and extract more rewards than due.

The issue is that the refund transaction is built at the same time (epoch) of the ibc transaction: if Namada crosses a MASP epoch in between the construction of these transactions and the actual refund than the refund will be invalidated and there will be no way for the original source of the transaction to get their tokens back.

We should apply the logic suggested by @cwgoes and support only transparent refunds: this will sidestep this issue altogether, while simplifying the logic. At the same time, this solution doesn't raise any concern with regards to privacy since we can use a disposable address as the target of the refund.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants