Integrating Ethereum into OpenBazaar
EDCON 2019 · 13 Apr 2019 · 13:25
Washington Sanchez explains the work needed to add ETH and ERC-20 payments to OpenBazaar: a currency-agnostic Go wallet interface and a shared escrow contract preserving two-of-three dispute resolution. He also previews Haven, a mobile marketplace combining encrypted messaging, social features and a cryptocurrency wallet.
Speakers
Topics
From EDCON 2019, hosted by EDCON.
Transcript
so next up we have Washington Sanchez who is co core developer of open Bazaar and co-founder of ob1 and he'll be talking about integrating aetherium into open Bazaar welcome all right okay wonderful so i'm washington or dr. washer on twitter you may know me thank you for all being here on a Saturday afternoon it's a bit rough
but my the focus of my talk is upon integrating etherium into open Bazaar and it's more of a consumer application focus so let's start so some of you may not know what open Bazaar is it's it's a dab but it's an on a theory immed app and it's a decentralized marketplace where you can buy and sell goods and services for any cryptocurrency so it started in 2014 as a fork of dark market dark market was the hackathon project of the ever colorful of Mir Taqi and also worked on by members of air bits who are now called edge wallet so
after Amir said that he wasn't going to be doing anything more with with dark market brian hoffmann talked with him and and forks the project and created open bazaar so the the renamed are to open bazaar was also representative of a branding change to be a more generalized marketplace project and not so much focused on dark market well what dark market was focused on which was illicit goods and services so we worked in 2014 on open Bazaar for a year in our spare time and then we were very fortunate at the beginning of 2015 to receive venture capital funding from us V&A 16z and so what we focus on in ob1 as a company is
open Bazaar development and also building hopefully profitable consumer applications and services for our members our users so between 2014 and 15 the open bizarre experience was pretty rough you you you basically was a self-hosted store that you ran and it was very loosely connected on the peer-to-peer network there was never done dancey at all so if you turned off your computer or you know struck by lightning that's it you know nobody can access your store nobody can make any purchases it was written in Python with nothing against Python but it makes building binaries on multiple operating systems are very difficult and it was Bitcoin only especially at the time when we were
starting bitcoins dominance was really unquestioned and it had terrible discovery so we really spent a lot of time trying to make a better bet eventually we got to the point where we rebuilt open Bazaar 2.0 from the ground up and we rebuilt it using IP FS and using IP FS IP NS and Lib p2p we basically got to the stage where we had that kind of redundancy that you expect from a peer-to-peer network so now you have offline availability of data and asynchronous messaging which means that now when you create a listing or you you publish something to the network you can turn off your computer you can walk away and not only can you receive chat messages from your potential customers
but you can actually receive orders and next time you go online it pulls all of those messages from the network and you can proceed with your transaction it's written in go and the emoji fail but it's a love heart emoji because we we absolutely love go really easy to compiled binaries for other operating systems and mobile and we also created an open of third-party search specification so other people can build search now at this stage it was still Bitcoin only so 2016 still Bitcoin and then towards the end of 2017 we had a problem Bitcoin transaction fees kind of went absolutely crazy and while other people were like popping the champagne and saying this is amazing
we would like deeply troubled by the fact that you couldn't really use Bitcoin for payments especially when you're on chain fee exceeds the value of the item that you want to purchase on the network so we spent the better part of 2018 focusing on refactoring the wallet so become a multi currency wallet so in the event of like really high fees you can switch over to another currency with with lower on chain fees and so at the moment it accepts Bitcoin litecoin Z cash and Bitcoin cash just to start off with and we can support a lot more and Q 3 & 4 we started work on refactoring the wallet so that it also accepts theorem payments and 20 tokens which I'll talk about in just a sec but one thing I just wanted to
quickly show next week we'll be launching a the latest version of open Bazaar and if some of you who have used open Bazaar 2.0 for some time you may not you may have remembered that opening and fetching content from the from the network was a little bit of a slow process it took like 3060 seconds and had a high failure rate well we just finished some optimizations that increase the speed by like a hundred you know by a hundred times and the success rate of fetching content is like really great so that's coming out next week and we're also working on a web version of open Bazaar so you'll be able to run a full node in the browser so a lot of people ask us you know how much volume is up in Bazaar doing and the answer is
we don't really know I mean it's by design a decentralized and private marketplace we don't know what is being bought and so between buyers and sellers and that's a great thing but we do have some peripheral stats we know that there's about 400 to 600 new nodes on the network daily there's about 120 thousand nodes been created in total and we've just had tenth tens of thousands of listings now to the good bit which is we've forsaken the etherion community for so long and that time is over so towards lo at the end of last year we started in earnest to get aetherium integrated into open Bazaar and that really takes on two parts the first part is integrating it into the actual network like into the code and that's
refactoring the open Bazaar go server and the wallet interface to make it more currency agnostic and friendly to account based cryptocurrencies because there are very heavy dependence on you TXO cryptocurrencies the second one was to build a go aetherium wallet that was compatible with our wallet interface so we've done all that hard work it's all done and it's getting ready to be merged into master so if you do want to help us out you can head over to the github and take a look at those three open pull requests and check it out and help us but this doesn't only just help us get aetherium integrated into Azad also helps us you know get ready to to potentially accept narrow and other like
like late OOP systems which is either bitcoins lightning Network or plasma gluon shot and shouting Raiden whatever that you guys come up with that is pretty exciting so the other half of integrating a theorem in to open Bazaar has to do with the way payments are made so as a quick primer there are two ways to do payments on open Bazaar you can either do a direct transaction which is you would send your Bitcoin to a seller and you would hope that they would send you the good or service and it's only really suitable for trusted relationships or where the brand is very strong and you trust them to send that good after you say after you've made a payment but for everything else you really need an escrow payment which we call the moderated payment now in
Bitcoin we do this by using a two of three Multi signature address so the the construction is that you have a you know three three signers which is the by the seller and a third party dispute resolution agent that we call a moderator now we also have a 40-day timeout for four payments but so the way goes is that if the buyer and the seller have a successful transaction then they cooperate to release funds for multi-sig and the seller gets paid after the buyers receive the good but if there's some sort of dispute then the moderator comes into the discussion and then they side on either the buyer seller side to release the funds now in integrating aetherium NERC 20 token payments if we were to like deploy a smart contract for
every transit like every transaction that would be like grossly inefficient and expensive to do so it's far most sensible to create one standardized master smart contract that handles all of the escrow logic and state for these kinds of escrow transactions so we did that and we replicated the two of three logics so it's nice and compatible with how I've done bazaars working today and the timeout conditions and the gas costs are really cheap like relatively cheap so I think for a typical transaction at the normal rate it's about 25 cents and if you're willing to wait like a few blocks then it's only about 5 cents it's pretty good and we know that we can make that cheaper in future versions of the escrow smart contract and speaking of
future versions we've also got a registry contract that contains all the latest official versions of the escrow my contract so if we have some sort of fix or enhancement to the contract we can just push it push the address to the registry contract and every future escrow transaction with eath or ESC 20 tokens will be made with that updated contract but with our current one it's been audited by open Zeppelin and we'll be releasing the report of that I think sometime next week but if you want to take a look at the code the spec in the unit tests you can head over to open Bazaar and look in our smart contracts repository and check it out so I want to briefly talk about something we're very excited about because we think about the
future of what can we do now that we've got a theory a mini RC 20 token payments integrated into open Bazaar and I mean our vision is very much bringing decentralized money and to centralized marketplaces to you know as a consumer level app so to that end I want to show you a sneak peak of something we've been working on called Haven will it work all right yay so Haven is a mobile app it runs open Bazaar as a full node on your mobile phone so that means when you open the Haven app it will run a full open Bazaar node on your device and that node will connect to other nodes on the open
Bazaar network and you will be able to buy and sell and publish content to the network and you'll be able to buy and sell with aetherium yeah see 20 tokens like Dai I love you make Adele for making that and you also have access to some other features that we've built into open Bazaar to create Haven and this is going to be available on iOS and Android simultaneously so we're calling it a privacy focus super app and it's bringing together lots of elements we have the classical ecommerce component from open Bazaar which is the ability to buy and sell whatever you want in a censorship resistant way we also have
chat which is like everything built on top of IP FS its end-to-end encrypted we also have a decentralized social network also built on ipfs unlike all the other dissenter we're social networks you don't have to pay anything you'd have to spend gas or pay some sort of token just to express yourself so you can use the the network to advertise your listings to your potential customers or just post memes that's fine and you also have the multi currency wallet now I just want to end on talking about the wallet for one second because in our view the wallet isn't just a place where you go to send and receive funds it's also a place where we're going to have integrations
with third party services and to centralize like a theorem theorem DAPs so imagine a scenario where you know you've taken all of your eighth from I don't know selling My Little Pony memorabilia on Haven and you've gone over to the wallet and you tap on the unis swap icon and you can exchange your eath for dye directly into Haven or you can take your tokens and your eath and you know open a multi collateral CDP directly from the wallet or buy an e NS domain directly from the wallet so the the dat browser is is something that we're going to be integrating into into the wallet so basically want to end on saying that for ob1 we are absolutely
passionate about privacy and bringing like a really polished consumer application that uses cryptocurrency and bringing decentralized markets to to the wider community so we look forward to working with anybody who's developing really interesting depths that want to be integrated into Haven you can reach out to us and talk about that and we'll be publishing some more information on how to do that so thank you [Applause]