Merged
Conversation
82b94e5 to
4514cac
Compare
grarco
commented
Aug 21, 2025
Contributor
🧪 CI InsightsHere's what we observed from your CI run for a13d611. ✅ Passed Jobs With Interesting Signals
|
batconjurer
requested changes
Aug 22, 2025
crates/apps_lib/src/cli.rs
Outdated
| .def() | ||
| .help(wrap!("The amount to transfer in decimal.")), | ||
| ) | ||
| .arg(__TEST_FRONTEND_SUS_FEE.def().help(wrap!( |
Collaborator
There was a problem hiding this comment.
should we bother exposing this in the cli as it's just for testing?
Collaborator
Author
There was a problem hiding this comment.
Yes we still need to expose them to run the integration and e2e tests
Collaborator
There was a problem hiding this comment.
Is there a clever way to keep this from showing up in the cli help menu?
yito88
approved these changes
Aug 25, 2025
cc897ad to
abeb496
Compare
9072bfd to
b6de931
Compare
batconjurer
requested changes
Sep 9, 2025
crates/sdk/src/tx.rs
Outdated
| // NOTE: The frontend fee should NOT account for the masp fee | ||
| // payment amount | ||
| let sus_fee_amt = namada_token::Amount::from_uint( | ||
| validated_amount |
Collaborator
There was a problem hiding this comment.
this block of code for the percentage calculation isn't nice looking and appears in a few spots. Can we hide it in the amount module?
Collaborator
Author
There was a problem hiding this comment.
Done in 3fe86a7, but the new function does also the validation part and lives in the same module
batconjurer
approved these changes
Sep 19, 2025
d3f672b to
a13d611
Compare
3 tasks
tzemanovic
pushed a commit
that referenced
this pull request
Oct 8, 2025
mergify bot
added a commit
that referenced
this pull request
Oct 8, 2025
Frontend MASP sustainability fee (backport #4790)
3 tasks
tzemanovic
pushed a commit
that referenced
this pull request
Dec 2, 2025
mergify bot
added a commit
that referenced
this pull request
Dec 2, 2025
…pr-4790 Frontend MASP sustainability fee (backport #4790)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Adds support for an optional masp frontend providers sustainability fees. This fee is supported as both a transparent and a shielded transfer (with the exception of incoming shielding IBC packets). To support it the followings have been changed:
Shielding and (IBC) unshielding
The sdk has been extended to allow specifying the entry for this fee. This is an optional target and a percentage which will be applied to all inputs. The sdk adjusts the input amounts to account for this extra fee.
There's one limitation for the IBC unshielding case. If the transaction ultimately fails (rejected by the target chain or timed out) we refund the amount of the unshielding to a disposable address. The frontend fees are not part of this amount and do not get refunded: to support this we'd need to temporarily escrow those tokens to an internal address and finalize the fee payment only once the target chain has confirmed the transaction to be successful (this would require some protocol support and should probably be done in conjunction with #4726). On top of this, the unshielding refunds are done to a disposable transparent address from which the user might want to reshield the tokens: this would incur in another frontend fee event leading to multiple fees applied to the same overall action.
Incoming IBC shielding packets
The optional target and percentage of the fee can be passed to the
gen_ibc_shielding_transferfunction. Since IBC is limited to a single token, the asset is automatically inferred to be the same of the transfer and fees are not supported when shielding nfts. The fee amount itself will be encoded as an additional shielded output of the MASP bundle so that we can avoid the need for protocol-breaking changes.Osmosis swaps
Osmosis swaps are ultimately collapsed to the above ibc cases and so the same rules apply. In case the swap was fully shielded the frontend provider should refrain from charging a fee since this should count as a fully shielded transaction.
Checklist before merging
breaking::labelsnamada-docsreponamada-indexerornamada-masp-indexer, a corresponding PR is opened in that repo