Re: how to model a contract

On 05/26/2012 03:54 AM, Michiel de Jong wrote:
> Another fork-off thread: in
> http://payswarm.com/vocabs/payswarm#Contract it states that a
> contract represents a commercial transaction. Can't i use a contract
> to describe the lending of money?

In general, you should be able to use a Contract to represent the
lending of money. After all, the definition of a commercial transaction
typically includes the lending of money, which is usually formalized in
a contract.

In PaySwarm, finalized contracts have a number of parts, typically:

1. The list of assets that are being exchanged.
2. The license under which those assets are being transferred.
3. The "listing", which is the price of the particular combination of
    license and assets.
4. The entity providing the asset(s) and the entity receiving the
    asset(s).
5. All monetary/service/good transfers associated with the exchange.
6. Signatures verifying that the asset provider and the receiver are
    in agreement to the exchange.

> sometimes i lend someone money (cash in hand, often). sometimes i buy
> something on the spot. sometimes i pay in advance, sometimes i pay
> afterwards. it looks like currently only on-the-spot purchase and
> instant payment of assets can be modeled?

On-the-spot purchase and instant payment is what we're focusing on right
now. However, since this is Linked Data, the addition of more and/or
different fields should allow you to model all of the alternative forms
you list above.

We typically use duck-typing when the situation dictates it's use. So,
for example, while we do this now (an immediate monetary transfer):

{
    "@type": "Transfer",
    "source": "http://redbankexample.com/accounts/12345#account",
    "destination": "http://greencardexample.com/accounts/54321#account",
    "amount": "8.00",
    "currency": "USD",
    "comment": "Transfer of $8.00 on 2010-10-16 at 12:34pm - Paying Jane
back for pizza last Monday"
}

There is no reason you could do this (a promise of a future transfer):

{
    "@type": ["Promise", "Transfer"],
    "source": "http://redbankexample.com/accounts/12345#account",
    "destination": "http://greencardexample.com/accounts/54321#account",
    "amount": "10.00",
    "currency": "USD",
}

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
Founder/CEO - Digital Bazaar, Inc.
blog: PaySwarm Website for Developers Launched
http://digitalbazaar.com/2012/02/22/new-payswarm-alpha/

Received on Sunday, 27 May 2012 03:39:32 UTC