-
Notifications
You must be signed in to change notification settings - Fork 44
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
Trading on xud without running node #1425
Comments
Good thinking (and yes, we thought about it)! Trading on OpenDEX without running a node ( They act as a remote xud node (kind-of) which traders can connect to and setup htlcs/atomic swaps through these to trade on OpenDEX. Admitted, I simplified a bit here. The reality is a bit more complicated since the atomic swap between exchange and end-user is de-coupled from the atomic swap on OpenDEX. And the end-user doesn't know anything about OpenDEX. That's necessary to make trades easy and reliable for end-users. Is that understandable? WDYT? @xVETTEx |
I think these exchanges is enough for users who want swap token A to token B, but boltz don't provide any API to market data, so it isn't useful for day traders or trading bots. They would still need to run xud node or connect ccxt api and trade through boltz. So it would be simpler to them if they could also do trading through ccxt. . |
Gotcha (finally)! Interesting idea and definitely agree, that exposing xud's api (ccxt, once we have #707 in) to the public can be useful to gain insight in what's happening in the OpenDEX network without the need to run a node. Thoughts: Offering users to actually trade through the public api would mean either
c) An idea I just had (potentially doesn't make much sense): end-user deposit = opendex atomic-swap using preimage provided by end user, that takes away/adds deposit. The idea: the user locks a rather large amount, like 5 BTC into her HTLC with the Service Provider. End-user instructs the service provider via ccxt to trade on OpenDEX based on the orderbook she sees via the ccxt api up to the amount "deposited". End user controls preimage. Now we need to find a way that with every preimage release Service Provider can only redeem the amount that was actually traded on OpenDEX from the "deposit". AAAAND drum roll we ended up with: a lightning channel. This is precisely how a lightning channel works. Let me think about this some more if there is a way to make this work with a deposit in form of one BTC lightning channel from end-user to service provider only. Conclusion: a service provider can definitely offer a |
I was just wondering if it would be possible to trade without running node.
Has anyone thought about this?
It could work like atomic swaps. When trader make order he create HTLC with node which can be spent by node by transferring tokens that trader wanted to buy to trader. Problem might be that if trader want cancel order before timelock ends, and node won't sign new state for channel. Node could still fill order until timelock ends. However I think this problem isn't impossible to solve.
Trader could maybe use Exchange Union through ccxt api.
The text was updated successfully, but these errors were encountered: