Voluntary fees IBC middleware
Describe your changes
Closes #4944
Based on #4939 Review: https://github.com/namada-net/namada/pull/4968/files/ed70e61a6aa728c9efa2a42aca24068ebb4888b6..18eea0b7ed599f23df15713592869302a3722533
This PR reworks the now useless Osmosis Shielded Swaps IBC middleware, which was then used to transfer amounts overflowing the min output of a trade to a transparent account.
Its role is now to redirect some funds transferred to a payment address (with memoless IBC shieldings) to a transparent account, to collect IBC shielding fees.
In this PR, it is integrated with the existing Osmosis Shielded Swaps SDK functionality. In Namadillo, an IBC memo must be set when using Keplr to shield funds over to Namada. It should have the following structure:
{
"namada": {
"voluntary_fees": {
"fee_receiver": "tnam1...",
"new_received_amount": "123"
}
}
}
Where new_received_amount is the original amount minus the intended fee.
Checklist before merging
- [x] If this PR has some consensus breaking changes, I added the corresponding
breaking::labels- This will require 2 reviewers to approve the changes
- [ ] If this PR requires changes to the docs or specs, a corresponding PR is opened in the
namada-docsrepo- Relevant PR if applies:
- [ ] If this PR affects services such as
namada-indexerornamada-masp-indexer, a corresponding PR is opened in that repo- Relevant PR if applies: