Closed giansalex closed 2 years ago
Awesome! Can you open source the contract code and link it here? That's an important part of the bounty. :slightly_smiling_face:
Awesome! Can you open source the contract code and link it here? That's an important part of the bounty. slightly_smiling_face
Still waiting on contract code. :upside_down_face:
Did you do any custom modifications to the Osmosis node?
@VitalyVolozhinov I think he just created a custom Osmosis IBC module that returns price info from the GAMM module. This is a great start, but isn't a representative example of how this would be done in production, given upcoming updates to Osmosis.
Osmosis will soon have cosmwasm bindings for interacting with the AMM. So the Osmosis price fetching logic should be implemented as a cosmwasm contract instead of an IBC module.
Additionally, fetching regular spot price can be easily manipulated, and shouldn't be used in production. The Osmosis team is working on making a more secure TWAP oracle that can be leveraged in cosmwasm contracts.
@JakeHartnell , this is the source code https://github.com/giansalex/cw-osmo-price
Contract address on Uni Testnet:
Re @verminator23's comment, is this using a custom IBC module? Has that been merged? If not where is the code for that? Would this work with mainnet Osmosis and Juno chains?
@JakeHartnell , this is the source code https://github.com/giansalex/cw-osmo-price Contract address on Uni Testnet:
Re @verminator23's comment, is this using a custom IBC module? Has that been merged? If not where is the code for that? Would this work with mainnet Osmosis and Juno chains?
I believe it's not possible to query data over IBC yet from CosmWasm to a Module. I think we have to wait for ICA to be implemented in Osmosis and Juno chains to complete these bounties correctly.
@JakeHartnell, the challenge is with a custom IBC module, do you need anything else?
@JakeHartnell, the challenge is with a custom IBC module, do you need anything else?
Has that module been merged into Osmosis? :upside_down_face:
This needs to work with mainnet Juno and mainnet Osmosis.
but will osmosis accept a custom module? and if they don't accept it, these challenges are unviable.
but will osmosis accept a custom module? and if they don't accept it, these challenges are unviable.
Worth a shot. Can work out a custom payout with @dimiandre if they are unviable. Part of the reason the bounties are high is that there are lots of pieces.
I was also working on the swap challenge, and i was able to get it to work.
The only thing that would be missing is to integrate the ibc module in osmosis, but that is out of my reach.
Can you give it your best effort? At least submit a PR and link it here?
If anything, it's an important path for discussion. If they are against adding IBC modules for these things, and want to go purely the CosmWasm route then we have our answer.
Definitely an awesome job. Can you share access to the code?
And as jake said would be a big plus if you can provide a PR to osmosis repository, then we can help communicating with osmosis community to take this on mainnet.
For bounty payments maybe we can split in phases
ok, i will prepare the pull request
For osmosis mainnet, i need to wait for cosmwasm or IBC queries
For osmosis mainnet, i need to wait for cosmwasm or IBC queries
Saw this. Thanks for the investigation, we're going to do a partial payout for this as it's blocked. Still this was very helpful. :pray:
I am sharing the Swap module used in another example, it's an IBC module as @JakeHartnell suggested at some point, based on the middleware approach, passed all ibc-transfer tests. https://github.com/disperze/ibc-osmo/tree/master/x/intergamm
There is also a branch for liquidity pool https://github.com/disperze/ibc-osmo/tree/pools
Testnet:
osmos: https://osmosis-ibc.web.app/
juno contract: juno1wnx2pe5k8gzd7h2phm7xkg5fxqp380kf8tx50nzlxvzg66hksx8q558ujn
This pr is to share a demo between JUNO UNI testnet and custom osmosis node (gamm IBC).
IBC channel
Demo