[0.25 XMR Bounty] [Proposal] Control websocket for receiving a price feed and pushing logging events #571
Replies: 4 comments 9 replies
-
Thanks for the proposal, interesting brain stimulation! To clarify a few things, you would like to achieve:
Correct? For achieving (1) we need some standardized way to tell the ASB what price to use. Doable, but requires some more though. Would be great if you could define your ideas in a bit more depth - we would also be very happy about contributions. Our team is currently busy with working on maker discovery. |
Beta Was this translation helpful? Give feedback.
-
Yes exactly. I want to use a custom price feed and be able to process the log output more efficiently. I think it would be enough for now to let the ASB listen for messages on a websocket, which then internally updates the current XMR / BTC price. For the sake of simplicity, I would suggest using a very simple JSON protocol. Something like:
In order to be more future-proof and customizable it would be useful to request the exact amount of XMR that the provider is willing to trade for a given amount of BTC. This way, a provider could set higher fees for smaller trades and lower fees for larger trades, or set a fixed fee to be added to each trade. But I think that could be added at a later date and the very simple mechanism outlined above would suffice for now. I still have to get familiar with Rust as I haven't used it before, but I'll try to implement it myself. Of course, I wouldn't mind if someone else wanted to take it upon themselves. |
Beta Was this translation helpful? Give feedback.
-
We have decided to introduce a bounty of 0.25 XMR for this issue, for anyone who implements this before someone from the COMIT team or us implements it. Will be paid out after the pull request is approved. If you want to contribute to the growth of BTC and XMR atomic swaps and help the decentralization of Monero, start working on this and open a pull request once you are done. |
Beta Was this translation helpful? Give feedback.
-
Hi @cimble-code , thanks for posting this feature request and adding the bounty, we would love to see contributions :) When reading your initial description my initial first thought were that you are describing two different features:
Your latest message made me think otherwise though. So instead of focusing on the solution I would prefer if you could describe the actual use case you would like to solve. My current understanding is that you would like to have fine granular control over swap requests, e.g. it should be possible to react to a trader asking for a quote based on the amount she wants to swap. This would allow the ASB to have different rates for smaller or bigger amounts. |
Beta Was this translation helpful? Give feedback.
-
I think it might be useful to allow the ASB operator to specify a custom control websocket URL. The ASB could then connect to this websocket to receive a custom price feed and send logging events (swap started, bitcoin was locked by peer, xmr was redeemed, ...). The custom webserver could then execute some action based on that information (for example calling an API to buy back the sold XMR) . I think it would greatly ease the integration of the ASB into existing infrastructure of exchanges.
Beta Was this translation helpful? Give feedback.
All reactions