Skip to content

Conversation

@sug0
Copy link
Collaborator

@sug0 sug0 commented Jul 1, 2025

Describe your changes

Requires #4722 to be deployed in production alongside/before this PR, otherwise the client code of Osmosis swaps will be broken

  • Added ability to confirm/reject trades in the SDK, based on the returned pool route and slippage
  • Compute minimum output from slippage percentage when shielding the output of the trade
  • Reworked the SDK/CLI args, to remove the need of providing an Osmosis REST API RPC endpoint (a default one is used)
  • Added default slippage percentage of 0.5%, when it is unspecified in the CLI/SDK
  • Made the SDK always compute the min output of the trade, based on the /quote endpoint of Osmosis SQS
  • Fixed a bug with Cosmos SDK chains not being able to parse the bech32m encoding of the MASP address (requires Allow bech32 encoding of MASP address in shielded receive middleware #4722)

Checklist before merging

  • 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-docs repo
    • Relevant PR if applies:
  • If this PR affects services such as namada-indexer or namada-masp-indexer, a corresponding PR is opened in that repo
    • Relevant PR if applies:

@sug0 sug0 marked this pull request as draft July 1, 2025 13:24
@github-actions github-actions bot added the breaking:api public API breaking change label Jul 1, 2025
@sug0 sug0 force-pushed the tiago/min-output-amount-from-slippage branch from 9de1fe6 to f4339f4 Compare July 1, 2025 16:26
@sug0 sug0 force-pushed the tiago/min-output-amount-from-slippage branch from f4339f4 to b39f897 Compare July 2, 2025 10:35
@sug0 sug0 marked this pull request as ready for review July 3, 2025 10:30
@sug0 sug0 requested review from batconjurer, grarco and tzemanovic July 3, 2025 10:31
tzemanovic added a commit that referenced this pull request Jul 16, 2025
* origin/tiago/min-output-amount-from-slippage:
  Changelog for #4723
  Encode Osmosis swap receivers in compat mode
  Test compat taddr serialization
  Encode taddrs in compat mode with bech32
  Improve thread join err msg
  Compute min output amount from TWAP
@tzemanovic tzemanovic merged commit 6f5d048 into main Jul 17, 2025
42 of 61 checks passed
@tzemanovic tzemanovic deleted the tiago/min-output-amount-from-slippage branch July 17, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants