julian1 / issues

0 stars 0 forks source link

smart contracts #1

Open julian1 opened 9 years ago

julian1 commented 9 years ago

repository state can be files, mongodb, amazon s3 etc. in memory.

but we need to be able to hive off a subset/snapshot of state and have those. hmmnn not sure if possible.


transactional - read/write in isolation. and the result is commit or rollback.


use a digest comparison - like angular view projection on the resources.


instead of genesis allocation we would have genesis contract.

shouldn't be account not user. since user may have multiple accounts. or even 'party'.

/account/genesis

/home/genesis/k


structure, like a rest resource (sk (smart contract) then uses rest-like verbs to manipulate.

urls like url values are json, verbs are get,post,update

/home/name/k /home/name/public-keys /home/account/keys/ecdsa... /home/name/k/asset/x /home/name/feed /home/name/k/asset/asks /home/name/k/asset/bids

or

/feed/name/feed ? /k/name/instance/version

/time/seconds - run every second... /time/minutes/10 /time/hours /time/now or /time/immediately <- if not already included?

actually we need an alias like llinux /home that can be used


http://szabo.best.vwh.net/contractlanguage.html http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.14.7885 http://lambda-the-ultimate.org/node/3922

julian1 commented 9 years ago

There are so many advantages to a DSL over a imperative simulation that it's hard to know where to start. With a DSL, contract descriptions could be stored in a repository. Contracts could be searched for in that repository in semantically interesting ways. Contracts could have analyses run on them that were unknown at the time of contract creation. Analyses and reports could be run over groups of contracts ("Show me our counterparty risk against Lehman for the Dec CDOs.") Repositories of contracts could be published to regulatory agencies, allowing systemic risks to actually be analyzed in real-time ("How bad off are we if Lehman goes down?").

Requiring an imperative implementation results in a bunch of useful one-off tools, at best. Requiring a declarative specification results in an ecosystem.

julian1 commented 9 years ago

The combinators represent a sufficient model of a sufficient variety of financial instruments to have wide applicability.

The combinators have the property that, given the execution model of their environment (Haskell, in this case), they are guaranteed to terminate.