https://www.meetup.com/bitcoin-barcelona/events/236961113/?eventId=236961113&chapter_analytics_code=UA-68616111-1
What is a "Smart Contract"?
What Smart Contracts are useful for?
How to improve business processes using Smart Contracts?
2. • What is a "Smart Contract"?
• A "Smart Contract" is NOT…
• Do SCs have anything to do with Blockchain and Cryptocurrencies?
• What Smart Contracts are useful for?
• How to improve business processes using Smart Contracts?
• MarketPay/LemonPay
• Escrow Smart Contract
• UnwiredApp: Instant Messaging Smart Contract
enabling the sharing economy
3. Contracts & Computers
3
In 1958, the United States
Department of Defense launched
a computerized contract-
management system that it
dubbed Mechanization of
Contract Administration Services,
or MOCAS. Fifty-seven years
later, it’s still going.
Trillions of dollars have passed
through the computational
records in MOCAS. In its current
form the system is managing
roughly $1.3 trillion in obligations
and 340,000 contracts.
https://www.technologyreview.com/s/538966/what-is-the-oldest-computer-program-still-in-use/
4. What is a “Smart Contract"?
4
Para puristas: "La infraestructura de
los smart contracts pueden ser
implementados por registros de
recursos replicados y la ejecución de
los contratos pueden llevarse a cabo
usando árboles Merkle los cuales
funcionan mediante funciones hash
criptográficas y la replicación de
tolerancia a fallos bizantinos los
cuales son una generalización del
problema de los dos generales. Cada
nodo en la red p2p actúa como un
registro de propiedad y de
fideicomiso o garantía, ejecutando los
cambios de los titulares del contrato y
comprobando automáticamente las
reglas que impone la transacción, y
comprueba también el mismo trabajo
de los otros nodos."
https://es.wikipedia.org/wiki/Contrato_inteligente
A smart contract, also known as a
cryptocontract, is a computer program
that directly controls the transfer of
digital currencies or assets between
parties under certain conditions. A smart
contract not only defines the rules and
penalties around an agreement in the
same way that a traditional contract
does, but it can also automatically
enforce those obligations.
5. What is a “Smart Contract"? Again…
5
The concept was first proposed by Nick Szabo as
an automatism for transactions.
6. What is a “Smart Contract"? Again…
6
It is a piece of code stored
in the Blockchain and can be
called any moment by a user
having enough funds in the
form of crytocurrency, such
as Ethers.
--- Do Smart Contracts have
anything to do with Blockchain
and Cryptocurrencies?
https://etherscan.io/address/0xBe56093286038885733a66e554DD43a22a45889f
7. Blockchains allows an application developer to
create a distributed database that can be read by
anyone, but can only be written to by consensus.
A blockchain is a ledger of records arranged in data batches called blocks that use
cryptographic validation to link themselves together. Put simply, each block references
and identifies the previous block by a hashing function, forming an unbroken chain,
hence the name. 7
8. What is a “Smart Contract"? Again…
8
To run the Smart Contract
user have to pay a fee for
gas consumption in Ethers
(on Ethereum blockchain)
9. What is a “Smart Contract"? Again…
9
Solidity is the most used programming language to develop Smart Contracts
on Ethereum. LLL, Serpent, and Solidity all can be used to write contracts but
Solidity is the flagship language at the moment.
10. What is a “Smart Contract"? Again…
10
Every blockchain network node runs the code of the Smart Contract when
called. The result (deterministic) is the same for all of them.
11. What is a “Smart Contract"? Again…
11
Out of gas: when transaction cost for a Smart Contract call is higher than fees
sent, process stops and data is rollback. If you do not have the Ether to cover
all the gas requirements to complete running your code, the processing aborts
and all intermediate state changes rollback to the pre-transaction snapshot.
12. What is a “Smart Contract"? Again…
12
A Smart Contract is basically a set of if-then statements with only difference
being that they directly control real assets (cryptocurrencies and tokens).
14. • Users meet at the marketplace
• Buyer or seller can start the transaction,
introducing amount and address for
shipping.
• The counterpart is notified on his/her
mobile phone and accepts the escrow
transaction.
• Buyer can ask for instant credit.
• Seller pays the PSP fee.
• The escrow payment is released
automatically 24h after successful delivery.
• Pay-out to the seller’s account is executed
right away.
LemonPay. Designed to
facilitate the economic
transaction between
peers
14
16. Secure escrow based transactions are core to the
sharing economy: anonymity, compliance and
agile business rules for marketplaces
16
Marketplaces, e-commerce websites and mobile apps
must guarantee secure transactions between buyers and
sellers.
Marketpay covers all your operational cycle which
includes:
o Pay-in and pay-out transactions and wallet
statements.
o Agile escrow rules and payments upon delivery.
Most countries require a banking license to handle money
on behalf of third parties. Marketplaces cannot afford to
break legal and regulatory requirements and Marketpay is
the perfect partner that allows you to concentrate on your
core business.
17. Marketpay value proposition
17
Good or service is
offered on marketplace
Search is made on
listing app or
website
Deal is closed and escrow
is placed through
Marketpay
Pay-out is executed
to sellers bank
account
Delivery is confirmed
and payment is
released
19. A "Smart Contract" is NOT…
19
A Smart Contract is not a DApp, but just a part of it. A DApp consists of a user
interface (usually a mobile App or a Web page) and a backend based on a
Blockchain Smart Contract. So it is not possible to use Smart Contracts by
themselves to develop Apps nor Web sites, but you may well create a
distributed and decentralized database to feed those dummy interfaces. This
give us the advantage to perform crytocurrency operations in a smart fashion,
not to mention recording and querying data.
20. A "Smart Contract" is NOT…
20
A Smart Contract is not an Internet application: They cannot reach
information outside the blockchain. Like decentralized code they can really only
get pushes, they cannot pull. But because pushes and pulls can be inversed
this is not a crippling limitation.
- Ethereum by Henning Diedrich
21. A "Smart Contract" is NOT…
21
A Smart Contract is not "smart" nor
"contract". When Nick Szabo created the
concept of "Smart Contracts" they really were
"smart", being capable of autorun and
accomplish the job with no human intervention
(trust middle-man role). Nevertheless, current
smart contracts have no legal contractual effect.
And they are not so smart as expected due to
just being a set of if-else sentences with the
capability to transact cryptocurrency and
store/query records.
Smart contracts will use code to reshape law.
https://iohk.io/blog/smart-contracts-will-use-code-to-reshape-law/
Blockchain consortium R3 contracts global law firm Norton Rose Fulbright to
determine whether smart contracts have contractual enforceability.
https://www.finextra.com/newsarticle/29798/norton-rose-fulbright-addresses-the-legal-implications-of-smart-contracts
22. Blockchain is not going to emerge in industry as a
single platform, as was once imagined, but as a
series of different blockchain platforms designed for
different purposes.
22
https://goo.gl/5133lG Map of
decentralized transaction ledgers
BTC/XBT ETH XRP Hyperledger
# of nodes 6,000 7,000 200 200
access Open Open Permission
ed
Permissioned
blockTime 10m 14s 4s ~1ms
smartContracts Script Solidity Codius Go
23. Marketpay auditLog
Blockchain will make all kinds of transactions
transparent, more reliable, and easier to audit without
centralized processing.
23
24. LemonPay: escrows, while they can be conducted
through a central agent, are increasingly being
conducted through a smart contract on the
Ethereum blockchain controlled by several
independent agents.
24
BuyerSeller
3rd party
logistics
Smart Contract
is just a phrase
used to describe
computer code that
can facilitate the
exchange of
money, content,
property, shares,
or anything of
value.
28. What Smart Contracts are useful for?
28
To avoid record tampering and identity spoofing:
Today, we Google for everything, mostly information or products. Tomorrow, we will
perform the equivalent of "googling" to verify records, identities, authenticity, rights,
work done, titles, contracts, and other valuable asset-related processes. There will be
digital ownership certificates for everything. Just like we cannot double spend
digital money anymore (thanks to Satoshi Nakamoto’s invention), we will not be able to
double copy or forge official certificates once they are certified on a blockchain. That
was a missing piece of the information revolution, which the blockchain fixes.
https://techcrunch.com/2016/05/11/the-blockchain-is-the-new-google/
29. What Smart Contracts are useful for?
29
To cut costs:
• Blockchain technology could help the world’s largest investment banks cut their
infrastructure costs by between $8 to $12 billion a year by 2025, according to a
report by Accenture. As it creates a shared "golden record" of data that is virtually
tamper-proof, it obviates the need for reconciliation and could prove a helpful
resource for auditing.
- http://www.reuters.com/article/us-banks-blockchain-accenture-idUSKBN1511OU
• Finance-reporting costs could shrink by 70pc thanks to blockchain’s ability to
optimize data and verification. Compliance costs could plummet by up to 50pc,
thanks to "auditability". Other savings in support software for customer
engagement procedures, as well as management procedures and office
controls, could see the total saved at eight of the 10 largest investment banks top
out at $12bn.
- https://www.siliconrepublic.com/enterprise/blockchain-accenture-investment-banks
• …to cut bank infrastructure costs attributable to cross-border payments… These
costs referred here are for carrying out certain functions at the desired destination
points and at the desired authenticity, by trustworthy agents.
- https://www.finextra.com/blogposting/13580/is-blockchain-necessary
30. What Smart Contracts are useful for?
30
To develop cryptocurrency/token processes :
LaborX will serve as a decentralized marketplace where people in real-world
professions will be able to sell labor-hours to anyone. LH (Labor Hour) tokens act as
a substitute for payments enabling users to be rewarded for their work without
cryptocurrency’s signature volatility risk. LH tokens can be bought and sold by
companies to secure professional services, as well as by crypto traders who want to
hedge their earnings in a stable, inflation-proof token.
- https://cointelegraph.com/news/how-ethereum-based-uber-of-time-chronobank-could-boost-cryptocurrency-adoption
31. What Smart Contracts are useful for?
31
To raise finance fast through ICOs :
• Golem: You can rent the unused cycles of your CPU or GPU to other people so
they can use it to do work. They will pay you GNT in exchange. Alternately, if you
need to do computation and don't have a CPU or GPU that's appropriate, you can
rent those from others, and pat them in GNT.
Total created: 1,000,000,000 GNT
Funds raised: 820,000 ETH / 100% of cap
- https://golem.network/crowdfunding.html
- https://etherscan.io/address/0xa74476443119a942de498590fe1f2454d7d4ac0d
- https://coinmarketcap.com/assets/golem-network-tokens/
• MillionEther: A total of 1 million pixels are available for purchase. Advertisers can
buy as much or as little ad space as they need, with the price per pixel starting at
0.01 ETH. Early birds may want to take advantage of this offer as soon as possible,
as prices will go up as more pixels are sold.
- https://themerkle.com/millionether-smart-contract-can-change-the-world-of-advertising-for-good/
32. What Smart Contracts are useful for?
32
Be careful with blockchain ICOs!:
Companies behind these ICOs are promising
the moon and the stars, putting out polished
websites, white papers, advisory boards,
Slack channels, GitHubs, peppering with
some legalese language, and topping it with
the full dressing support enchilada they can
think of; in order to appear as legitimate, as
hard-working, as smart and as credible as
possible.
The 3 typical characteristics, team, product and market seem to have taken a
secondary position to the 3 new magical words: tokens, blockchain and
decentralization. The token is not the business model. The value proposition or utility that
is enabled by the token is the business model, and that linkage needs to be there early on.
If the direction is not right, the chosen path will not lead to a good place. A smart company
would not release more funding to itself until milestones are reached…
- http://startupmanagement.org/2017/01/23/watch-out-the-icos-are-coming/
33. What Smart Contracts are useful for?
33
To decentralize the new sharing economy:
Don Tapscott, author of "Blockchain Revolution" says that the technology underlying
Bitcoins could be used to disrupt the likes of Uber and Airbnb.
http://dontapscott.com/2016/01/could-blockchain-technology-disrupt-uber-airbnb/
34. What Smart Contracts are useful for?
34
Unfortunately, it lost around $50m after someone hacked one of the contracts. The
Ethereum Foundation then had to create a "hard fork" of its own blockchain to try and
get the money back, but some people didn’t follow along, resulting in a new Ethereum
blockchain and a Coca Cola-style Ethereum Classic. Governance-wise, it was complete
carnage.
https://nakedsecurity.sophos.com/2017/01/24/when-is-a-blockchain-not-a-blockchain/
Not so fast, buddy!
The DAO, the ill-fated organization created on
the Ethereum blockchain last year, it was
hailed as a new development in autonomous,
self-governing corporations. Instead of relying
on central parties such as lawyers,
accountants or a board for its governance
structure, it used smart contracts, which were
designed to handle things like voting and the
unlocking of funds for contractors.
35. How to improve business processes using Smart Contracts?
35
Trustless consensus: By removing middleman (disintermediation) we cut costs and
simplify business processes.
Immutability: Prior to blockchain, immutability existed in closed systems, through the
benevolence of a custodian. Bye bye to backups and data lost.
Security: No more worries about someone hacking the system. It is not possible
anymore. Just focus on keeping secret your private keys and don't lose them.
36. How to improve business processes using Smart Contracts?
36
Maybe there is not much difference for the end user between paying using VISA or
Bitcoins, or between triggering a process by calling an API or a Smart Contract. But
who knows if current systems (VISA, APIs) become deprecated and replaced by
decentralized systems (cryptocurrencies and smart contracts) in a medium-short term,
forcing us to update our business processes to avoid losing customers and partners.
Why Facebook instead of Orkut?
Why Microsoft instead of Linux? (Desktop)
Critical mass: In social dynamics, critical mass is a sufficient number of adopters of an
innovation in a social system so that the rate of adoption becomes self-sustaining and
creates further growth.
Network effect: In economics and business, a network effect (also called network
externality or demand-side economies of scale) is the effect that one user of a good or
service has on the value of that product to other people. When a network effect is
present, the value of a product or service is dependent on the number of others using it
37. UnwiredApp Smart Contract
37
http://www.hackathon.io/unwiredapp1
A Smart Contract records messages related to a given user (wallet). Messages can only
be read by the recipient (Blockchain ensures that only the recipient wallet has access to
this information). Through a mobile/web interface a user with an Ethereum wallet will be
able to read and write messages onto the Smart Contract, achieving this way a full DApp.
This same idea can be extended to guaranteed delivery messaging systems, in such a
way to make it possible to audit whether a given message has been really sent and read
by its recipient or not. Maybe Smart Cities are going to need a mechanism to make
secure in a decentralized fashion the transfer of messages among officials or even
citizens.
Pitch Video at https://www.youtube.com/watch?v=TH9Qha2Figw