
Digital Asset Open Sources Its Smart Contract Language, DAML [pdf] - PDiMarzio
https://hub.digitalasset.com/hubfs/Press%20Releases/DAML_Open_Source_Press_Release_4.4.19.pdf
======
sanxiyn
Repository is at [https://github.com/digital-
asset/daml](https://github.com/digital-asset/daml)

------
squigs25
Interesting... given that this is actually in use for the Australian Stock
Exchange and the Hong Kong Exchanges, this smart contract language could
become a major player and continue to get corporate adoption, especially now
that it's open sourced.

------
oggy
The DAML landing page gives a nice overview of the unique language features:

[https://daml.com/](https://daml.com/)

Disclaimer: I work there. Very exciting to see it open-sourced!

------
jgalt212
Question: How do smart contracts handle defaults?

e.g. day1: ledger A and B strike a deal to bet on the 6M Libor fix in 3 months
time. day 91: Libor fixes much higher than expected thanks to a continually
robust IPO market and strong economy (but mostly the former.

In any event Ledger A now owes B 1,000 coins, but A only has 250 coins in its
ledger. What happens? Is a partial payment done, or because this is a smart
contract a Slack message is automagically sent to lawyers and/or collection
agents?

~~~
scrumper
Smart contracts on public blockchains solve this by committing coins to the
contract. In effect the contract is an escrow facility in which the coins are
locked up until the contract terminates.

The advantage of e.g. Ethereum blockchains is that defaults don't happen the
assets are held by the contract. The drawback is that your assets are locked
up for the duration of the contract, which is completely incompatible with how
wholesale finance operates.

DAML's genesis was in solving this problem on private ledgers used for
mediating inter-party value exchange of off-ledger assets (like dollars). To
do that, rather than having an account or asset focus, it's built around the
notion of rights, obligations, and enforcing a legally-compatible approach to
contractual consent.

That is so that, when a "workflow" (e.g. your LIBOR swap) terminates, DAML
provides a fully audited record of all the parties' agreement to be bound by
the terms and consequences of the workflow itself. All being well there's an
exchange of assets off-ledger. If things turn out badly, you go to court and
the default is worked out with the backing of a rock-solid audit trail of
affirmation (instead of a loose-leaf binder of printed emails and a dog-eared
ISDA agreement.)

(I work for DA.)

~~~
jgalt212
> Smart contracts on public blockchains solve this by committing coins to the
> contract. In effect the contract is an escrow facility in which the coins
> are locked up until the contract terminates.

So if this is true, one could never write a call option on Ethereum because
the downside risk for the writer is unbounded and you cannot put infinite
coins in escrow.

As an aside, given the escrow component, there seems to be no
credit/counterparty risk in any ETH smart contract, but for the most part if
there is not risk transfer or sharing is there really any commerce to do?

~~~
malberto
Smart contract languages look still in infancy as practical applications are
audit trails with stronger guarantees and lower operating costs. What you are
thinking of sounds like a far more advanced deal management system. Besides,
is it even possible to invent a way to trade risk in such a way that if one
party hold unbounded exposure before the trade then after the trade both
parties have bounded exposure? does it even make sense to have unbounded risks
in system that is inescapably formal and will hold a bounded amount of money
at each time? One could argue that risks that look unbounded are usually (as
in without a ledger) handled less formally (ie: state bailout,
[https://www.forbes.com/sites/jamesconca/2016/03/10/after-
fiv...](https://www.forbes.com/sites/jamesconca/2016/03/10/after-five-years-
what-is-the-cost-of-fukushima/)) (Disclaimer: I work for Bloomberg on DLIB
BLAN that is a contract language for structuring, pricing and managing exotic
derivatives, no block-chains involved)

------
ru999gol
I was reading the Wikipedia[1] article about smart contracts, I still don't
know what a smart contract is.

[1]
[https://en.wikipedia.org/wiki/Smart_contract](https://en.wikipedia.org/wiki/Smart_contract)

~~~
pmohun
Smart contracts are programs whose computation is run independently across a
large number of distributed machines, with an output that is verified using a
predetermined consensus mechanism.

They are useful is situations where an actor would benefit from altering the
result of the computation, or masking values. The primary use case that I've
seen is for escrow payments with Ether, the Ethereum blockchain's native
currency.

They trade processing speed for finality and verification of results.

------
lostmsu
Could not find what targets does it support, and are features identical
between them?

~~~
PDiMarzio
At this very moment, DAML applications run on the DA ledger. Open sourcing the
language is the first step in expanding that base. We (yes, I work at DA!)
have been working with key ledger providers and will be making additional
announcements over time - perhaps starting within the month if all goes well.

~~~
captaindiego
So is the idea that it's abstracted from the ledger, basically meaning you
have your choice of whether you would run it in some centralized ledger
secured within your company or on a more blockchainey distributed ledger on
the public internet?

~~~
stefanobaghino
Yup!

------
xiaolingxiao
Interesting, it looks a lot like Haskell. And Edward Kmett used to work there
right? Could someone comment on its relationship with Haskell and the ML
languages? Which I assume is the ML in DAML

~~~
PDiMarzio
Yes Edward was a big contributor here (full disclosure - I work at DA). A lot
of our engineers, like Edward, come from the Haskell community. DAML uses the
GHC compiler under the covers. One way to think of is is a GHC frontend that
adds the extra bits required to streamline the task of writing multipartry
contracts.

------
zoharhod
Removed!!!

~~~
Legogris
Aside from being a blatant marketing attempt, you should seriously stop
overusing hashtags like this outside of Twitter.

