Re: Listing with multiple Currencies and Authorities

On 12/24/2012 05:51 PM, ☮ elf Pavlik ☮ wrote:
> Looking at: http://payswarm.com/wiki/PaySwarm_Design

This is a fairly old wiki page.

> I would like to ask for pointers to documentation helpful with case 
> when someone creates a *Listing* for an *Asset*:

Unfortunately, the best documentation we have out there right now is the
example code in payswarm.js:

https://github.com/digitalbazaar/payswarm.js/tree/master/examples

Specifically, here is how you can register a new key (used for digitally
signing assets and listings):

https://github.com/digitalbazaar/payswarm.js/blob/master/examples/register-new-key.js

Here is how you publish an asset for sale:

https://github.com/digitalbazaar/payswarm.js/blob/master/examples/publish-asset-for-sale.js

Here is how you purchase the published asset:

https://github.com/digitalbazaar/payswarm.js/blob/master/examples/purchase-asset.js

Keep in mind that we just updated the dev.payswarm.com site and haven't
had the time to update payswarm.js to match some of the latest code
changes. I don't think the code works right now and we need to fix that
(hopefully at some point in January 2013).

> and wants to accept multiple currencies

We only support USD at the moment. We do plan to add other fiat-backed
currencies in the future. We also plan to add alternative currencies in
the future, but those aren't supported yet.

> through multiple *Authorities*.

This is always true of PaySwarm. PaySwarm Authorities are decentralized,
any asset/listing should work with any PaySwarm Authority.

> As an example someone in such *Listing* would announce willingness to
> accept $ with few authorities but also accept something like: 
> http://www.dropis.com or any other *roll you own* currencies...

The way we've modeled this currently is that you'd create two or more
separate listings... one for each currency that you accept. The listing
is the thing that specifies the payment information. We thought it would
be simpler to just publish more than one listing rather than adding some
fairly non-trivial logic to say "we accept X, or Y, or Z" to the
listing. We can always add this feature in the future, but thought that
we'd wait to see how people use multiple currencies with assets before
adding more complexity to the listing process.

So, if you accept two different currencies, you produce 2 different
listings. The code that you'd probably find most useful starts here:

https://github.com/digitalbazaar/payswarm.js/blob/master/examples/publish-asset-for-sale.js#L123

specifically this line:

  payeeRate: price,

would be replaced with something like this:

  payeeRateType: 'com:FlatAmount',
  payeeRate: '5',
  currency: 'http://www.dropis.com/currency',

> Asking another way - which resources I should point friends who work
>  on designing currencies (ex. dropis) - so they can make them work 
> with PaySwarm?

It's a bit too early in the process for alternative currencies... we
just don't have the spare bandwidth to work on that as well as do the
commercial launch.

One of the problems with alternative currencies at present is that they
don't put food on the table for us. Fundamentally, we believe that
PaySwarm must have alternative currencies integrated at some point in
the near future, but doing so requires quite a bit of engineering effort
and if we become distracted with doing that we run the risk of
endangering the entire project (due to a money crunch that we could have
avoided had we launched a commercial service sooner).

So, I think asking the Dropis folks to start a conversation on this list
would be a good first step. Once we know what their requirements are, we
can implement the alternative currency support with more assurance that
we'll get it right. The other alt. currency that we're looking at
implementing first is Bitcoin, which we have more interest in doing
because you can exchange it for USD.

> Also in bit more visual way, looking at illustration at: 
> http://polyeconomy.info , case in the middle seams dominant nowadays,
> I look at the 3rd, IMO much more liberal case, where listings can
> have any number of currencies assigned to them :)

Yes, that's what we're trying to support via PaySwarm's alternative
currency features. It's already designed into the protocol, we just need
to implement it (which, I wildly estimate, would take between 3-6 months
to get to production). Alternative currencies are currently fighting for
engineering resources between the commercial launch and the crowdfunding
stuff (PaySwarm Payment Intents). I have a feeling that we're going to
focus on the crowdfunding stuff before the alternative currencies as
that is the most economically viable path for our company.

That said, we'd gladly welcome help on fleshing out the alternative
currency and currency mint use cases and design. The first part of that
was introduced here:

http://lists.w3.org/Archives/Public/public-webpayments/2011Dec/0017.html

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
Founder/CEO - Digital Bazaar, Inc.
blog: The Problem with RDF and Nuclear Power
http://manu.sporny.org/2012/nuclear-rdf/

Received on Sunday, 30 December 2012 16:52:02 UTC