• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Open Bazaar integration - pre-proposal

So as usual slow, intermittent progress, however today I managed to get something working that you can actually see :D

I have duplicated the Bitcoin payment wizard and started working through, adapting the minimum useful subset of features to allow a payment. I've got as far as the order total page, which is completely broken due to the complexity of introducing another cryptocurrency to convert to. I'm going to stop here for today though.

Screen Shot 2016-06-21 at 13.04.36.png Screen Shot 2016-06-21 at 13.04.44.png Screen Shot 2016-06-21 at 13.04.49.png Screen Shot 2016-06-21 at 13.05.12.png Screen Shot 2016-06-21 at 13.10.01.png

Any feedback welcome!
 
So as usual slow, intermittent progress, however today I managed to get something working that you can actually see :D

I have duplicated the Bitcoin payment wizard and started working through, adapting the minimum useful subset of features to allow a payment. I've got as far as the order total page, which is completely broken due to the complexity of introducing another cryptocurrency to convert to. I'm going to stop here for today though.

View attachment 2499 View attachment 2500 View attachment 2501 View attachment 2502 View attachment 2503

Any feedback welcome!
Do you think u can do it alone? or do u need help from someone? can we get funding for this project?
 
Do you think u can do it alone? or do u need help from someone? can we get funding for this project?

I'm going to have a go, and we'll see how far I get. I don't want to take any more for this (yet) because I have absolutely zero experience in these technologies, so this is an experiment. I would rather try to get it to the point it works usefully for at least the most basic scenario, and then we can look at funding. I'd be really pleased, if I can make a start on this, and then someone else can get a funding proposal to do the work long-haul. (Maybe me, but there are many more qualified people around, I think!)

Initially it is easier to work alone, because unless someone was sat next to me, I would probably spend more time communicating about coding than actually coding. So far, it looks like it might be easier than I feared.

I had literally just sat down to do some more as you replied, so we'll see what a few more hours achieves :D

In the long run, I'm really excited about a budget proposal keeping this alive.
 
Question: what's the best way to get DASH prices?

I have discovered that the OB server implements an API method '/api/v1/btc_price' which calls out to the following APIs:


One option is to duplicate this OB API at '/api/v1/dash_price' and call out to Dash services. Another option is to collect the BTC price and convert to DASH with some crypto service. Any thoughts?
 
Question: what's the best way to get DASH prices?

I have discovered that the OB server implements an API method '/api/v1/btc_price' which calls out to the following APIs:


One option is to duplicate this OB API at '/api/v1/dash_price' and call out to Dash services. Another option is to collect the BTC price and convert to DASH with some crypto service. Any thoughts?
I would go adding with https://poloniex.com/support/api/ and simple conversion on top of existing if you need precise Dash price or simply pull https://api.coinmarketcap.com/v1/ticker/dash/ if it's fine to have some lag. (disclaimer: I have no idea how it works inside of OB, so it's a pure guess)
 
I would go adding with https://poloniex.com/support/api/ and simple conversion on top of existing if you need precise Dash price or simply pull https://api.coinmarketcap.com/v1/ticker/dash/ if it's fine to have some lag. (disclaimer: I have no idea how it works inside of OB, so it's a pure guess)

Thanks, I will give them a go!

After working through this a bit more, I've realised that we get by far the sanest OB code if we treat Dash as an equal peer to Bitcoin. That is obviously not true in the sense that even with Dash support, Bitcoin will account for 99% of the trade. However, everything becomes nice and symmetrical inside if we have a Bitcoin and Dash version of everything, plus it allows for more easily factoring out any thing generic, rather than adding a layer of hacks on top of the existing Bitcoin code.

The way OB works currently, is that you set your shopping currency as either BTC or <some fiat currency>. I'm doing the fiat version first, it seems more useful (and perhaps ironically, easier to understand in the code, for me at least). Your OB node goes off and finds an exchange rate. If it can't find one for your currency, it sets you back to BTC (this is a complication to look at later). If it can, it displays fiat prices by BTC prices.

Because I'm making the Dash version an entirely parallel path to the existing BTC code (i.e., once you click on BUY NOW (DASH), you're off on an entirely separate code path), the simplest thing to do is plug in any price source we have for now, just to prove it works. Poloniex and CoinMarketCap both provide USD prices, so that will do for testing the initial scenario.

Later we will need a second fiat currency, as the code has a separate path for "shopper currency = store currency" and "shopper currency != store currency". Later still we can worry about items priced in BTC or DASH, and conversion between fiat.

Hope that makes sense!

Edit: Packing up for today now, nothing additional actually works, but tomorrow I will try to integrate those price APIs, and then hopefully that part will magically spring into life.
 
Hi @ashmoran, congrats on the initiative, much needed to hedge openbazaar from the risks associated to Bitcoin and at the same time enable an enourmous amount of use cases for Dash.

I suppose at first you're learning the code base and kind of duplicating things or perhaps you've already thought of what's really needed, to abstract the payment layer with generic interfaces which then have their specific implementations, to first refactor whatever is for Bitcoin in a concrete implementation, and then copy/paste and start hacking away the specifics of Dash on the 2nd one (or viceversa)

Is that the path you're taking already, or plan on taking? (I hope you're not making a Dash only client, as that would basically split the network into bitcoin sellers and dash sellers, when in reality what this should do is just let anyone pay in the currency of their preference, and I hope fiat is to be available in one of those implementations, as most people in the world use fiat.)
 
Hi @ashmoran, congrats on the initiative, much needed to hedge openbazaar from the risks associated to Bitcoin and at the same time enable an enourmous amount of use cases for Dash.

I suppose at first you're learning the code base and kind of duplicating things or perhaps you've already thought of what's really needed, to abstract the payment layer with generic interfaces which then have their specific implementations, to first refactor whatever is for Bitcoin in a concrete implementation, and then copy/paste and start hacking away the specifics of Dash on the 2nd one (or viceversa)

Is that the path you're taking already, or plan on taking? (I hope you're not making a Dash only client, as that would basically split the network into bitcoin sellers and dash sellers, when in reality what this should do is just let anyone pay in the currency of their preference, and I hope fiat is to be available in one of those implementations, as most people in the world use fiat.)
I' d be comfortable with a dash only OB to begin with anyway. Its sounds easier. Create a MVP and then think about multiple cryptos after that.
 
Dash on openbazaar would be a totally cool concept! I'm not so sure having 2 different openbazaars would be though? Why not just make 1 openbazaar accept other coins to increase the amount of people you can sell too? WHy split it up?

:rolleyes:
 
I' d be comfortable with a dash only OB to begin with anyway. Its sounds easier. Create a MVP and then think about multiple cryptos after that.

I see, the problem with that is that you split the network and you end up with very little products and buyers. The smart thing to do is to use the network effect and have all products available. On your settings you'd just have multiple wallets, one (or many) for each cryptocurrency.

I think this is what'll happen, like 99% I'm sure this is what will happen. It'd be better that you joined the OpenBazaar slack room and met the team, that way you won't waste your time.
Otherwise you might as well call it "DashBazaar" and have a tiny network and have everybody who installs it ask you how to keep both stores synchronized, seems like a nightmare from the seller perspective, and a useless app from the buyer side.
 
I see, the problem with that is that you split the network and you end up with very little products and buyers. The smart thing to do is to use the network effect and have all products available. On your settings you'd just have multiple wallets, one (or many) for each cryptocurrency.

I think this is what'll happen, like 99% I'm sure this is what will happen. It'd be better that you joined the OpenBazaar slack room and met the team, that way you won't waste your time.
Otherwise you might as well call it "DashBazaar" and have a tiny network and have everybody who installs it ask you how to keep both stores synchronized, seems like a nightmare from the seller perspective, and a useless app from the buyer side.
I think that route was already explored. I dont think the OB guys are up for adding dash.

I see were u are coming from. Ideally it would all be included under the one OB.
 
I think you misunderstand them.

They will not add it themselves, they just want these kinds of contributions from interested parties, they're way to busy to add alt-coin support.
They'd love to see it, specially as Bitcoin will get more congested, we'll need other blockchains to transact, but if some alt-coin project wants to be in, that project has to put the effort and collaborate. if the alt-coin project doesn't want to waste their time, IMO, this is the way it has to be done for the reasons explained before.
 
I suppose at first you're learning the code base and kind of duplicating things or perhaps you've already thought of what's really needed, to abstract the payment layer with generic interfaces which then have their specific implementations, to first refactor whatever is for Bitcoin in a concrete implementation, and then copy/paste and start hacking away the specifics of Dash on the 2nd one (or viceversa)

Is that the path you're taking already, or plan on taking? (I hope you're not making a Dash only client, as that would basically split the network into bitcoin sellers and dash sellers, when in reality what this should do is just let anyone pay in the currency of their preference, and I hope fiat is to be available in one of those implementations, as most people in the world use fiat.)

The path I'm taking is to start by duplicating everything inside OB that is Bitcoin-specific, and make it work for Dash. This has the advantage that the initial Dash code becomes independent of the Bitcoin code and can evolve separately. If this works we can then look at a payment abstraction, as there is an enormous amount of duplication between the two, but this would be a big architectural change for OB, and the OB team would need to decide the direction that goes in.

I definitely don't want a separate OB network just for Dash, and I think everyone here is agreed on this point.

/u/CryptoCollectibles spotted this thread and posted it on Reddit. He also agrees with our strategy, to quote from a comment in that thread:

I recall like weeks ago seeing and even messaging someone from Shapeshift on the Slack, I am hoping for integration in some way from that, but it is nice seeing the Dash users doing this, smarter than what I have seen other coins attempt, which is directly try to compete with OB. We all use crypto currencies, we all need to get along.
So I think we are going in the right direction. I will try to catch someone in Slack and see how we may be able to work together. On that note, my schedule right now is a bit all over the place, and I'm living in CET and I may struggle to speak to anyone in US time zones. So if anyone is able to speak to the OB team when they're available that would be a big help to coordinate this.
 
Great work @ashmoran. Perhaps you could team up with a core developer or another community member to start a project? Maybe even stick a proposal in. I think this would be extremely useful in expanding the dash ecosystem.
 
@halso Do you mean team up with a core developer from Dash or OB?

(Minor) updates:

I just sent links to my repos to one of the OB team on Slack who asked for it. Also, /u/Chris_Pacia replied on Reddit to tell me that the Go server which is destined to replace the current Python one is around 65% complete. Personally I believe it's better to get it working in Python first and re-do it in Go later, because I judge the value of getting this out sooner is worth more than the cost of doing it twice. Plus it means getting to practice on a codebase that will eventually be killed, and the second implementation of anything always turns out to be better code.

No progress at all since I last posted here due to moving and then immediately going away for a week. From next Monday I will have 6+ weeks of uninterrupted spare time to work on this. AT LAST :D
 
Real DASH prices are now working!

Screen Shot 2016-07-15 at 12.53.51.png

Prices are being pulled from https://api.coinmarketcap.com/v1/ticker/dash/ This feed only has USD prices, so right now, this means it only works if the item is listed in USD and the buyer is shopping in USD.

The patches are on GitHub, for the client changes and the server changes. (The default branch in each repo is dash_payments.)

It took me quite a while to get this working because I discovered I'd been lucky with my previous wifi connections, and I was able to develop this with the buyer and store server processes running on my laptop. But that broke when I started developing using my laptop tethered with my phone for internet access. So I'm now renting a small VPS in Romania from FlokiNET (they accept dash!) and I can leave the test store running.

The item can be found on the testnet at ob://ff03f88376555544b329487339ce8d1cd99ad989/listing/f6f2a91745ea001c52bd8384a39bdddc4c752761

This is only a small step along the way, but it has really renewed my motivation seeing this working today. I don't have any obstacles to working on OB regularly now, so hopefully next week will see some substantial progress, fingers crossed.
 
Real DASH prices are now working!

View attachment 2569

Prices are being pulled from https://api.coinmarketcap.com/v1/ticker/dash/ This feed only has USD prices, so right now, this means it only works if the item is listed in USD and the buyer is shopping in USD.

The patches are on GitHub, for the client changes and the server changes. (The default branch in each repo is dash_payments.)

It took me quite a while to get this working because I discovered I'd been lucky with my previous wifi connections, and I was able to develop this with the buyer and store server processes running on my laptop. But that broke when I started developing using my laptop tethered with my phone for internet access. So I'm now renting a small VPS in Romania from FlokiNET (they accept dash!) and I can leave the test store running.

The item can be found on the testnet at ob://ff03f88376555544b329487339ce8d1cd99ad989/listing/f6f2a91745ea001c52bd8384a39bdddc4c752761

This is only a small step along the way, but it has really renewed my motivation seeing this working today. I don't have any obstacles to working on OB regularly now, so hopefully next week will see some substantial progress, fingers crossed.

Wow!! Great work. Its funny i was on OB recently chatting with their support, and we discussed OB being forked if they didn't add other alts eventually. And then you did it!

Great work @ashmoran. Whats the next step in the process? You going to keep playing with it?
 
Wow!! Great work. Its funny i was on OB recently chatting with their support, and we discussed OB being forked if they didn't add other alts eventually. And then you did it!

I can see from their perspective why support for other cryptocurrencies would be low down the list, they have a lot of work to do improving the core marketplace features, without having to worry about a multitude of payment options, especially when nobody can say which ones will be most important a year from now. But this is exactly why I think Dash is such a great fit: if this experiment turns into something functional, it might get approved as a budget proposal, and then someone can be paid to work on it, taking the burden off the OB team. (If Dash overtakes Bitcoin in usage, they'll want to maintain it themselves; in the mean time, it may be economically justified for Dash to pick up the bill.)

Great work @ashmoran. Whats the next step in the process? You going to keep playing with it?

Yep, I want to keep hacking away at this. I'll spend a few hours a day next week on it and see how close I can get to a real payment.

Also I have had a thought. I'm now paying for a VPS for this for development purposes. It's only a small €10/month server, but I paid real dash to use it. I was thinking I could put in a budget proposal to reclaim this. Is this worth doing, or is €10 so small as to be considered "spam" as a proposal? (I don't want to claim anything for development time, until I've been able to commit regularly to it for a while, and have a proof of concept up and running.)
 
Back
Top