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

orchestration: example dapp contract that can swap on osmosis #8863

Open
4 of 5 tasks
0xpatrickdev opened this issue Feb 5, 2024 · 0 comments
Open
4 of 5 tasks

orchestration: example dapp contract that can swap on osmosis #8863

0xpatrickdev opened this issue Feb 5, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@0xpatrickdev
Copy link
Member

0xpatrickdev commented Feb 5, 2024

What is the Problem Being Solved?

As a zoe smart contract, I'd like to be able to swap assets on an external chain. A user offers me ATOM* and wants an equivalent amount of IST** in return. I will use the Osmosis DEX to complete the swap.

  • for simplicity, we may want to start with an Osmosis-native asset like OSMO so we do not need to unwrap ATOM (ibc transfer to gaia -> ibc transfer to osmosis with hook)
    ** tangential to the above, a non-Agoric asset will need to be unwrapped going back to Agoric so we may want to test with a different scenario here as we progress.

Description of the Design

Use vat-transfer (#8624) to make a Transfer Account and execute a Swap on Osmosis using cosmwasm IBC-Hooks.

To start, the goal is to create working zoe contract that using the listed APIs. The author may want to consider future reuse of the contract and how we can expose functionality for this to become a reusable component for other dapps, a la postSvc.

Security Considerations

Scaling Considerations

Test Plan

Test with A3P and an Osmosis sim chain.

Dependencies

Preview Give feedback
  1. agoric-cosmos enhancement triaged_2024
    michaelfig
  2. 1 of 1
    0xpatrickdev
  3. automerge:no-update
    michaelfig
  4. enhancement
    turadg
  5. 0xpatrickdev

Upgrade Considerations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants