Ethereum devcon1 in London, 27th November By Tomoaki Sato I have been to the conference, so I wrote this summary and doing presentation in Japan. The meetup name is "Smart Contract Japan". Some of the presentations are missing, or added.
Please refer these official sources also
Devcon
http://devcon.ethereum.org/
Devcon1 youtube presentations
https://www.youtube.com/user/ethereumproject
Devcon1 slides on reddit
https://www.reddit.com/r/ethereum/comments/3soym7/devcon_1_slides/
3. I’ll update conrtacts/codes running report, more
presentations/talks on devcon1
This presentation intends to inform Devcon1 presentation summary (I’ve been to)
This presentation is made from
- Presenter’s slides online
- Devcon1 on youtube https://www.youtube.com/results?search_query=devcon1
- On site, my feeling
7. IPFS
Merkle link – immutable
Key name
/ipns/{object_id}/foo/bar/baz.png
Content addr
/ipfs/{object_id}/foo/bar/baz.png
fs:/ipfs/{object_id}/foo/base/baz.png
Ipfs:/ipfs/{object_id}/foo/bar/baz.png
Eth name /eth/jbenet/foo/bar/baz.png
Key name
Content addr
8. IPFS
Content & replication model
• Speed – can be as fast as underlying network dial between efficiency and privacy.
• Explicit – Only download expilicitly reuested data do not downlload other people’s stuff
• Policies – Follows user/app content policies programmable retrieval
9. IPFS
IPFS is focusing on
IPFS is focusing on “How you address and move content in the network”
10. IPFS
IPLD is Internet of Data Structure.
Data structure linked between files by hashes.
- Markle-links – secure, immutable
- Merkle-paths - /ipfs/{object_id}/foo/bar.jpg
- Universal – URIs, URLs
- Serialization – JSON, PB, XML, RLP
- Canonical - Hashing safe
JSON => IPLD
I can’t understand Context
Without URL
Content itself tells you where
It is.
Data Analytic Graph traversal
11. IPFS
IPFS use cases
IPFS + Ethereum is
• DCDN – P2P content delivery
• Decentralized links – no authority over data
• Application data – Distribution and definition
• Package managers - apt, nix, npm, pypi
• Containers + VM - docker
• Key addresssing
• Archinving – wikipedia
12. IPFS
IPFS + Ethereum
• Off chain data – put big data, into ipfs and hash link into
ethereum (like legal record, personal data,
• Dapp data – Def & Distination
• Dapps themselves - code, assets, etc
• Swarm - chunk-based storage
• Merkle patricia - tree- rep state tree
Representing entire state tree as
Blockchain itself definition and
15. Microsoft x Ethereum
Why Ethereum ? -> Blockchain As A Service!
• “Ethereum Blockchain as a Service” provided by Microsoft Azure and
ConsenSys allows for financial services customers and partners to
play, learn, and fail fast at a low cost in a ready-made
dev/test/production environment. It will allow them to create private,
public and consortium based Blockchain environments using industry
leading frameworks very quickly, distributing their Blockchain
products with Azure’s World Wide distributed (private) platform. That
makes Azure a great Dev/Test/Production Environment for Blockchain
applications. Surrounding capabilities like Cortana Analytics (machine
learning), Power BI, Azure Active Directory, O365 and CRMOL can be
integrated into apps launching a new generation of decentralized
cross platform applications.
16. • Expose blockchain products as aa service with Azure’s world wide
distributed platform.
• One click deployment of Ethereum blockchain.
• Play , Learn, and fail fast at very low cost in a ready made
Dev/Test/Production environment
• Create
Blockchain As A Service
Microsoft x Ethereum
18. Ether.camp
Ether.camp research
• 500000 transactions
• 22931 acctive address
• 11,900,000 Ether valuable transaction
• 3497 contract
• 25,944 invocations of contracts
• 44,131 inter-contract (contracts to contracts)
• 3244 unique address
• Contracts move value Max 3,000,000 Eth
• 69,788,467 Total Ether value transaction
• 1,100,035 Eth = 404,683 contact fee + 695352 mining fee
19. • Developed in Haskell with proven reliability in financial applications Faster
transaction settlement times Secure, verifiable audit trails Highest cryptographic
standards
• Turing complete permissioned Blockchain ledgers
• Adjustable transaction verification rules (instant, Byzantine consensus protocols,
mining)
• Customizable access levels for data queries
• Scablable network sizes Smart Contract enabled on the Blockchain (with Solidity
support)
• Web standard RESTful API for faster development and improved device
accessibility Cross Blockchain portability
• Javascript library for building and using Smart Contracts
• Friendly and flexible enterprise licensing
Blockapps strato key features
Blockapps Strato
22. • Bonds are: basic forms of loan.
Issuers issue
• Smart bonds remove, layers of layers of intermediations.
Replace centralized parties with software.
• Using Escrow contracts
• Bond issuer & Buyer onto blockchain.
• Bond issuer issue bonds condition as
smart contracts.
• And bond buyer pays money to
escrow contracts
What is Smart Bonds ?
Smart Bonds
24. Balanc∃
Double entry accounting => Tripple
Double entry accounting for minimizing errors
BUT, 2 books are separated in 2 firms. So it can be cheated.
Connect 2 separate books in different
by signed smart contracts
25. Balanc∃
Balanc∃ provides Tripple entry accounting
"The idea of triple entry accounting is that instead of each
firm having their own books, the transaction goes through
an Ethereum contract, a smart contract, and this contract
includes everything about the transaction: what the
product is, what the prices is, who is the seller, who is the
buyer. It's digitally signed. It can have an IPFS hash.”
by Dr.Christian Lundkvist
From http://www.ibtimes.co.uk/devcon1-ethereum-deloitte-eye-global-accountancy-blockchains-1528511
28. Balanc∃
Balanc∃ provides Tripple entry accounting
"The idea of triple entry accounting is that instead of each
firm having their own books, the transaction goes through
an Ethereum contract, a smart contract, and this contract
includes everything about the transaction: what the
product is, what the prices is, who is the seller, who is the
buyer. It's digitally signed. It can have an IPFS hash.”
by Dr.Christian Lundkvist
From http://www.ibtimes.co.uk/devcon1-ethereum-deloitte-eye-global-accountancy-blockchains-1528511
Slides on Devcon1 http://slides.com/jeffscottward/balanc3#/6
30. Ubuntu x Ethereum
Ethereum & IoT with Ubuntu core
Presenting
the easiest way towards a smart contract enabled world - #eworld
Smart contract enables immediate transactions between devices,
What is an Ethereum ATM ?
What would look like Ethereum ATM ?
Ethereum factory ?
Ethereum paradice is ..
31. Ubuntu x Ethereum
Snappy and Ubuntu core(app store as a service)
Ubntu core is smaller version of
Ubuntu based on docker
Snappy , app tops of ubuntu core.
Snappy is in IoT world
Anybody can build app store on
ubuntu core
32. Ubuntu x Ethereum
Ethereum & IoT with Ubuntu core
The easiest way towards a smart contract enabled world - #eworld
Smart contract enables immediate
transactions between devices,
What is an Ethereum ATM ?
What would look like Ethereum ATM ?
Ethereum factory ?
Ethereum paradice is ..
33. Ubuntu x Ethereum
PoS is paradice ?
Firstly, personal wallet is connected to personal IDs, purchase histories
40. {your enterprise} x Ethereum
Ethereum private chain ?
Do blockchain roles
On the shoulders of giants
Blockchain are culmination of prior work
• Merkel hash trees
• Distributed hash tables
• Proof of work
hydrachain (consortium chain)
42. Smart contracts and Ethereum
HISTORY OF THE BLOCKCAIN NICK SZABO
Origins:
Tim May: Galt’s Gulch in cyberspace protect yourself with cryptogarphy
Apply computer science to minimizevulnerability to strangers
-> solve ambitious problems
- Privatize money
- Nonviolently enforce property aand conracts
-> Smart contract, blockchains & cryptocurrencies
43. Digital cash failed. Because
DON TAPSCOTT
Centralization problem
Trusted strangers aresecurity holes
Tempting in security protocol design, but it’s a cheat
Minimize trust assumptions
>
45. The definitions of a smart contract
NICK SZABO
- Acts like a contract (perfomance, verification, etc)
- A long lived (Ethereum process “contract” on dapp)
46. Wet & dry code
NICK SZABO
Law Software
Logc grounds on Subjectvive minds, analogy Boolean logic, bits
Security Contmempt/imprisonment Replication + cryptography
Prectability flexible Rigid
Maturity Highly evolved/many cases Larval/few experiences
Area Jurisdictional silos Independence from financial & potencial
institutions. Seamless operation across
boarders
Costs Lawsuits expensive low
48. Current project
NICK SZABO
1. First generation: trust-minimized token transfer
(secure property titles ,colored coins)
2. -Second generation: trust-minimized cash flows
Recent Project
- Social network + Etheruem
1. Linking accounts
2. Payments, Swaps
49. Suber, bAirbnb, LandRegisrty, Your Personal Avater
DON TAPSCOTT
Blockchain based Suber can charge the fee automatically.
bAirbnb includes insurances in the blockchain based identity and insurance ec
Transparent distritbuted land regisrty can be more
Distributed identity has secure privacy with global transparent way
50. The Digital Economy – The Dark side
DON TAPSCOTT
1. Dislocations in labor markets
2. The descruction of privacy
3. The biprolarization of wealth
4. Digital communication is outpacing, so it’s difficult to be
integrated into family communication.
5. Old government finally starts to use Opendata and social
media
6. Under the “You vote, I rule” model, people are not going
to vote
7. Traditional Universities registant to change the digital
evolution
as a tool instead of thread
From : http://dontapscott.com/books/digital-economy-anniversary-edition-2014/
55. Public consensus protocol
What is public consensus ?
Network membership is governe dby a mechinism inside itself
Challenge of public consensus
- Sybil attack
Solution
Economic consensus (Pay costs to become member)
(3E cost by Dominic Williams)
56. Public consensus protocol
Challenges in public consensus protocol
- Revert history
- Prevent/fork consensus
- Censor transactions
Solution
- These should be unprofitable.
57. Public consensus protocol
Traditional security definition
- Consisstency or availability,
- Censorship resistance
In PoW, By forming majority of coaltion of 2/3 Censoring the 1/3 then
50 % raise the revenue
In PoS, if the majority coalition has an incentive to move their coins to
new addresses and sell their old keys as the consensus power.
58. Public consensus protocol
Traditional security definition
- Consisstency or availability,
- Censorship resistance
Censoring the 1/3 then 50 % raise the revenue
59. Public consensus protocol
To design secure public consensus protocol
should assume worst case
Assume that super majority of nodes (80 -100%) will act in a coalition.
Assume that attacker can bribe all rational nodes.
61. Key feature
• Public
but trustlessness is always an option.
• Permanent
Permanent content on blockchain, append only
Conract oriented programming
62. Contracts are a new abstraction 4 principals
- Principal 1
Expose your data, because you can have transparency and interoperability it’s better to have accessors for
properties (by adding “public” modifier or so.
- Principal 2
Don’t Discriminate contract and human address.
(Don’t discriminate humans and contracts by using tx.origin or so Better to use msg.sender, then crowdfunding
token can be owned not only by human but also contract)
Such as Crowdfunding contract – Venture capital contract relatioship
- Principal 3
Keep contracts small
General programming approach, don’t’ conflate many contracts
- Principal 4
Separate Logic and Data Contract needs security, logic and data living in the same layer often dangerous. Data
gonna keep changiing
Contract orietnted programming
63. Safe contract programming is ?
Code/ contract does
• What programmer intended
• What user is told it does,
• Not lose any money/ether
Safe contract programming
https://chriseth.github.io/notes/talks/safe_solidity
Better to do
• Throw in unexpected situations
• Do not delete contracts, only disable
them by state modification
• Provide natspec docs
• Publish source code
64. Compile time checks
• All functions exist
• Objects are not
null
• Operators can be
applied
Safe contract programming
Contract C{
address owner; uint ownr;
function giveMeMyMone(){
if(msg.sender == ownr){ //type error
ownr.send(this.balance);
} // type error; no ‘send’ in ‘uint’
}
65. Run time checks
• Exception for out-
of-bounds access
to arrays
• Downside ECM
consumes all gas
upon exception
• Exceptions can
also be used
manually
Safe contract programming
66. Unexpected error check
• Throw in unexxpected situations
• Don’t delete contracts (you shouldn’ t use suicide function )
> people seldom think contracts are already deleted.
• Instead of delete contracts, you should add state for the contract and disable it.
Because if some user send to the suicided address, money won’t return to the
sender.. So the sender will lose the ether sent to the address
Safe contract programming
68. Send and receive money
Sender
Send only use tiny amount of gas but it will invoke always callback function of the
contract.
So you should prepare
- the callback function gas usage
- callback of the other contract can mess up your state.
Receiver
-transfer can be reverted but it will consumes gas, please be careful.
Safe contract programming
69. Formal verification
• Exception for out-of-bounds access to arrays
• Downside ECM consumes all gas upon exception
• Exceptions can also be used manually
• Verification condition is what is actually done.
Safe contract programming
70. Formally verify your code.
Formally verify your code.
https://chriseth.github.io/browser-solidity/
• Formal verification’s definition is
“In the context of hardware and software
systems, formal verification is the act
of proving or disproving the correctness of
intended algorithms underlying a system with
respect to a certain formal specification or
property, using formal
methods of mathematics.”
• In formal verification system, program code is
statically check.
• Conversely validation (verification) is to run
program and check.
Is the browser online compile tool for ethereum.
Safe contract programming
71. Save gas for senders
- Use the optimser
- User packed storage (space saving,
(https://github.com/ethereum/wiki/wiki/Solidity-Features#tightly-packed-
storage)
- Use libraries (use dynamically loadable code)
Restrictions for libraries in comparison to contracts:
• no state variables
• cannot inherit nor be inherited
- Move computation off-chain. Like if you want to search some data, just return
Safe contract programming
73. Ethereum Alarm Clock
Adds an additional autonomy onto ethereum contarct
DAO
Contracts for smart contract programming
Ethereum alarm clock contracts
Scheduled function registerer Schduled clock caller
Register
contract’s
function
Call alarm contract within some blocks
after specific scheduled blocks
If within valid time,
get paid
Notify about the
execution
74. Why alarm contract needed ?
- In ethereum system, nobody enforce some transaction
automatically included in a specific block
• Because if some time scheduling functions are enabled in
Ethereum protocol level, it requires that you keep your
contract topped up with Ether, and making them too easy to
create could litter the blockchain with them and impose an
overhead on miners
Contracts for smart contract programming
75. How schedule the call works ?
Function calls can be scheduled for any block at least 40 blocks (~10 minutes) in the future.
Scheduling is done by providing the Alarm service with the following information:
1. Contract address the call should be executed on.
2. ABI signature of the function that should be called.
3. Target block number that the call should be executed on.
• Optionally, these additional pieces of information can be supplied.
• Suggested gas amount that should be provided to the function. default: 0 to indicate no suggestion
• Number of blocks after the target block during which it still ok to execute the call. (between 64 - 255 blocks) default: 255
(default means, if you call transaction within 17 * 255 ≒75 minutes
• Payment amount in wei that will be paid to the executor of the call. default: 1 ether
• Fee amount in wei that will be paid to the creator of the Alarm service. default: 100 finey
From documentation
Contracts for smart contract programming
77. Oraclize is
- Put outside blockchain data onto
smart contracts
- Contract interface has
- TLSNotary proof shows given fact is
at certain time proved.
Oraclize it
Oraclize is a service offering a set of tools and APIs aiming to enhance
the power of smart contracts.
By providing access to both on-chain and off-chain data, Oraclize
allows to find an answer to any query your contract may have.
From http://www.oraclize.it/home/help
78. TLSNotary proof
- Prove that Oraclize.it has not changed the fact statement at certain time.
Oraclize it
Oracle InternetSnart contract
Multiple resource of dataOracle sign on the fetched
from internet data.
with certain timesatmp
79. Example – price feed
Oraclize it
• How to provide ETH/BTC price into smart contract ?
Oraclize some smart contract, and the smart contract give information about Eth/BTC to other
smart contracts
In that case, Eth/BTC is coming from
Kraken’s api, and after fetching the result,
__callback function will be called and
The public data of ETH/BTC price will be updated
80. Embark is
Embark
Open terminal
$ embark demo
$ cd embark
Then you can see dapp strucuture like that
Including testing framework
EtherSim, ethereumjs-vm library
84. Turn on call execution server
You can start this red role as a automatic server (in the future)
Ethereum alarm clock contracts
Scheduled function registerer Schduled clock caller
Register
contract’s
function
Call alarm contract within some blocks
after specific scheduled blocks
If within valid time,
get paid
Notify about the
execution
Contracts for smart contract programming
85. 1. Write escrow contract in Solidity
• State change by enum is good method to
make state-machine.
• State change should have ‘disabled’
instead of suicide()
• Modifier is useful to explicitly implement
limitation to function
• Event provides indexed data on
blockchain. So easily client appilcation
search the data
• Underscore is continue the modifier-used
function
Escrow contract dapp development
http://www.slideshare.net/avsa/devcon-1-build-a-app-contract-and-design
86. 2. Interface desinger role is ?
1. Understand the code
> Simplify UX
> Think about roles and states
2. Don‘t try to do too much
3. Use open source fonts
4. Use grids
5. Test toosl s
> whoever is on the ofiice
> http://usabilityhub.com/
> https://projects.invisionapp.com
Escrow contract dapp development
87. 3. Why dapps, why meteor
1. Interface
2. Storage:
3. Hosting: Swarm, IPFS
Meteor, because
1. build purely for single page app
2. Command line tool for
3. Reavtive templates and functions
4. Minimongo memory DB with auto
persistency to local storage, indexed DB
or web SQL
Escrow contract dapp development
https://github.com/frozeman/example-escrow-dapp
91. 1.Create ether out of thin-air
Securing Ethereum
• Date: 2015-03-11
Affected : golang
Source: security/audit
Result: You can create unlimited amount of ether
• Can push minus value onto stack,then we can make unlimied amount
of ether.
ToA:-10000000
toB:+10000000 like that
94. 5. Non-consensus DoS
Securing Ethereum
Contract DoS{
function run(int n ) returns(bytes32){
if(n == 0){
return “Done”;
|
Hogger me = Hogger(address(this));
return me.run(v-1);
// insert 10000 JUMPDEST instructions post-compile here
}
}
95. 8.Contract suicide
Securing Ethereum
VM Logic/ contract consensus
When performing a suicide and the beneficialy is oneself, pyethereum doesn’t
ensure that the conrtract holds 0 balances after the suicide.
if you
About the suicide
Live fork, etheruem team
If an accout suicided and a subsequent tx in the same block referenced it, golang
didn’t correctly return a new account.
97. Bounty rewards of Ethereum
Securing Ethereum
Ethereum will increase
the Bounty program
rewards more
Compared to Google
application security
Currently small amount of
money
100. TLS
• When the TLS created, computaiton power, strong crypto graphy doesn’t exist.
• Ethereum has opportunity to improve network system.
• Man In The Middle attack prevention (Tor etc.)
• Node discovery
• Based on routing information.
D∃V P2P
101. Application challenge – node discovery
• To build dapp, define how do you define the organization of network.
1. Filtering incoming information
D∃V P2P
102. RLPx – Privacy Scalability, Efficiency, Usability
For application on Ethereum
• Multiplexing (Usabiilty)
• Encryption
• Flow control
• Constraints
• Node discovery
• Peer rating
D∃V P2P
103. Ethereum protocols in terms of communication
D∃V P2P
Messaging types
ETH = Ethereum peers Relay transaction
Relay block hashes
Relay blocks
SHH = Whisper Messages
Filters
BZZ = Swarm Content hash resolution
Content distribution
Block redistribution
104. Communication for thin clients
D∃V P2P
Execute this function, in an application network.
If we want to go to
Ability for interface each other, pass me
105. TLC transport layer security
• Centralized Usability Black box
• Man in the Middle attack
• Node discovery > Discovery address, packet address
• Routing in DHT
• RLPx, Multiplexing(Usability), Encryption(Robustness, privacy), Flow control
(efficiency),
D∃V P2P
106. Why whisper needed ?
• All communications on blockchain is expensive.
Communications are 3 types
1. Static content publication
-> DHT/Swarm can do it
2. Connection (VoIP, RTC)
-> devP2P can do it
3. Transient datagram( Twitter, IM, currency exchanges)
some limited time for limited people
-> whisper solve it.
Whisper
107. What is whisper?
• Hybrid of DHT and messaging (not end-to-end messaging, but
• Dark -> probablistic message forwarding, so it’s difficult to analyze the origin.
• Subject-key oriented -> no indication of encryption
• Anti-DDOS by implementing PoW system
• Always idempotence never endpoint.(PUT, PUT, PUT, PUT… )
• Configurable (Efficiency and Privacy is almost always trade-off)
• Topic-based (watch hash tag and subscribe)
• Secrure (unicast/broadcast = identity/ topic encryption)
• Never deal with endpoint(hardware) , deal with crypto-identity (psuedo identity)
• Authenticated – Anonymous / origin = unsigned / signed
Whisper
108. Difference between DHT and Whisper
Whisper can have
- Multikey
messages can have more than one key, (like # on twitter)
- Multivalue
topic can have more than one message. (also like # on twitter)
- Transient
TTL property
Whisper
109. Is Whisper DHT (file sharing)? The difference is
• Multikey
Multiple topic associated with one message
• Multi value
One topic can have multiple messages
• Transient
Messages can have certain time to be deleted.
Whisper
110. Prioritised forwardings
• Interesting topics
> prioritise messages in which peer has expressed interest
• Lowest TTL
proritise short-lived messages
• Highest proof of work
prioritise messages for which a greater proof of work has been conducted.
Whisper
112. Programming using whisper API
var key = newIdentity()
shh.post({
“from”: owned public key,
“to”: public key,
“topics”: […, …],
“payload”: …,
“ttl” : integer,
“priority”: integer
|)
Whisper
var w = shh.watch({
“to”: owned public key ,
“filter”: [ , , ]
})
w.Changed(function(m) {…});
var ms = w.messages();
w.uninstall();
113. Communication patterns
• 1.Static Content Publication
> Raw P2P connection, devP2P connection.
• 2.Connetcion (VoIP, RTC)
• 3.Transient datagram (instant data which contains end-point data)
Whisper
114. Datagram patterns
- Wholly direction
IM, Email
- RTC Connection
Rwa P2p
- Routing private impoortant
Metadata alslo important to be private. Routing itself is also better to be hidden.
- Whisper
Hybrid DHT and messaging, Dark, Subject- Key oriented.
Whisper
115. Never Endpoint
• Always idempotence, never endpoint (PUT, PUT, PUT, PUT…
• Configurable
User makes efficiency/privacy
• Topic based
Watch for topic subsets
Whisper
117. Digix global liquidate gold as tokens
Digix Proof of Asset Process
Paper documents are easily forged,
but transferring tokens provides better system.
IPFS is entered into ethreum contract storage.
IPFS
Custodian delivery
-
Digix global
118. Merits for traders
- Immediate
- Safe
- Lower fees
- Global
Can be traded as crypto-assets and backed by HitFin’s USD
HitFin – Bilateral settlement of over-the counter derivative trades in 15 seconds
119. HitFin – OTC trading on Smart contracts.
- Immediate
- Safe
- Lower fees
- Global
Can be traded as crypto-assets and backed by HitFin’s USD
HitFin
120. Why token standards needed ?
- Current: Tokens, Registries, Data feeds & forwadsing contracts
- Interoperability between different dapps and exchanges
> such as etherex will treat many tokens on ethereum, but if there are no
standards, tokens are difficult to tradable each other.
- Standards often like develop as the most developed one.
Standarized token contract
121. What is Standardized Contarct API ?
- Only deal with transfer/ approvals related things
>
- Does not deal with creation/mining
> so for issuers/contractor should think about the way to stabilize the token’s price
relationship.
Eg) Imagine if non-valuable-token A and valueable-token B are pegged 1000:1 rate,
non-valuable token issuer suddenly issue more tokens on their smart contracts, then
the valueable-token B’s trust will be collapsed.
See here
https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs
Standarized token contract
122. Approve/Unapprove main functions
1. Approve function provides
function approve(address _address) returns (bool success)
> Allow _address to debit from your contract/eoa account
2. Unapprove function
function unapprove (address _address) returns (bool success)
> Unapprove address it was previously allowed.
3. IsApprovedFor
function isApprovedFor(address _address, address _proxy) constant returns (bool success)
> Judge if the proxy accounts is allowed to debit from the _address
Standarized token contract
123. Dapp store is
Dapp store
Market pllace for decentralized applications http://dappstore.io/
124. Merit
Dapp store
Promote the dapp economy
Distribute and publicity
Developer support
Tight dapp integration
Functionality future
• Basics (review, identificatiion of the developer)
• Lisence model and rental economy (by using other smart co
• Tight dapp integration
• Onboarding and user integration
• Currency tools
• Company apps
• Advertising tools
125. WeiFund
WeiFund is crowdfunding dapps
Future
1. NameReg
NameReg contract integration for the management and
use of usernames with WeiFund.
2. Token Systems
A token templating and management system for deploying
and operating a basic custom token in tandem with
WeiFund campaigns.
3. Revamp of Landing and Discovery Pages
This will include making WeiFund's landing page more
interactive, with various recent, successful and up and
coming campaigns listed on the landing page.
4. Share/Embed Widgets
A share and embed widget set to integrate WeiFund
campaigns into other DApps and web3 enabled websites.
5. Whisper Integration
A review and communication system leveraging
Ethereum's Whisper protocol, so that users and campaign
operators can securely and reliably communicate with one
another.
129. WeiFund
Boardroom
Core Contractual Properties and
1. A member system to add and remove members
2. A proposal system to table proposals
3. A democratic voting system to establish agreement
or disagreement (i.e. boardconsensus) on tabled
proposals
4. An electable chair to split even or undecided votes
5. A budget and fund allocation system
6. A subcommittee system to add and remove
subcommittees
7. A parent or executive board property
8. Proposably alterable properties
9. A suicide property, to allow the board to be
democratically destroyed
10. Extendability to other smartcontracts through
contractual hooks
11. Extendability with other smartcontracts through
contractual communication
12. Special member permissions properties
130. Golem
Nanopayments platform
Current sending ether transaction roughly takes 0.0006 Ether.
So if we send nano payments to many parties one by one,
that would be not economical
Problem
132. Golem
Random number generation on blockchain
1. Task sender create the lottery smart contract
2. All receivers can verigy the smart contarct deployed
3. Generate public random number, then everyone can verify the fair lottery winner.
4. Somebody claims receiveReward, and then receive the reward.
How do we create rundom number on blockchain ?
133. Golem
Future block hash as shared-randomness
Process
1. Payer negotiates every payees, decide sum of the payment
2. Changing probablicity, not value of receving Ether, one lottery smart contract pays many payees.
3. Payer generates lottery, lottery is stored as like that,
lotteries[lotteryHash] = LotteryData(value, block.number + maturity, 0, 0, msg.sender, 0)
4. When meets LotteryData.maturity < block.number then we call lotteryCaptureHash message.
5. If you want to be claimed as winner, you should deposit winner desposits to the lottery contract.
If you are lieing, your deposit will be transferred to true winner.
6. Then someone send lotteryCheck message. If the winner claimer is false person, the person who
check gets the deposit (non-collaborative environment)
7. If already deadline passes ( lotteryData.deadline < now) then winner will get the lottery.value and
lottery winner deposits.
134. Golem
Future block hash problem
1. Future block hash is not a perfect method.
Miner can change the blockhash.
2. Ethereum contracts only can get 256 past blocks
> So if it passed roughly more than 256*15 = 1hour later, contract can’t get the random value(Block hash)
receivers agreed.
If we want to mitigate the risk, currently we should use centralized
solution
135. Golem
Centralized, but reasonable solutions
RANDAO approach Ethereum alerm clock
Using the commitment-reveal scheme
But If all participants of RANDAO collude, not random
Third parties are incentivized to do scheduled call,
But no guarantee in not-famous situations.
Random Number Production
Production of a random number has two stages to it.
First each participant chooses a value (v1,v2...) which they keep
secret for the time being. The instead submit the hash of thier
value H(v1). The contract stores all of these values. All participants
must wait until phase two occurs to continue. If a participant fails
to participate in stage 1 they can not be rewarded and reputation
will be hurt.
The second stage each participant now reveals the unhashed value
associated to the value they had previously sent. The contract will
check that the Hash of this value matches what was previously
given. If both steps have been performed correctly you will get
your reward for participation. If you fail any stage you will not get
a reward and your rep will be punished.
NOTE: The last person to submit will have a choice between two
possible final values based on the results of all previous
participants inputs. Overall I think this is a minor issue for most
situations UNLESS you are using this random number for a two
outcome scenario in which case it could be considered extremely
problematic.
The benefit of this system is as long as one participant is not in
collusion with the others then the outcome can not be controlled
(except for the case discussed in the NOTE above)
http://docs.ethereum-alarm-clock.com/en/latest/
138. B9Lab
B9Lab is Decentralized insurance
• Decentralized insurance
Insurance is a big numbers game that has not
been disrupted in a very long time.
How decentralized insurance system makes
Local information about possible ?
Claim processing is messy
Rule based claim
Processing
> Bringing data from offchain
and decide the claim is
whether should be paid out or not
Vote-based claim
Processing
>Incentivized people decide
If it’s should be paid out or not
139. B9Lab
Marketplace creation
• Underwriting
• Liquidity
• Risk modeling
• Data management
• Claim processig
These are needed to make decentralized
insurance market place.
Research & Experiments
Index-based data oracle insurance
- Crop insurance
- Bad weather insuracne
- Energy market
Claim processing is messy
Rule based claim
Processing
Vote-based claim
Processing
141. Hydrachain is Permissioned shared ledger
- Permissioned ledger based on ethereum
- Extension of the stock content
- 90 % of python languge
- 100 % opensource
Use case
- Private chains
- Consortium chains
Hydrachain
https://github.com/HydraChain/hydrachain/tree/master
143. Consensus
- Byzantine fault tolerant algorithm
Public key cryptography based
- No proof of work no economic consensus
- No forks
- Instant Finality
Hydrachain
144. Validators
- Registered validators
- Proposer for each block selected
Round robin from the set of validators
- Multiple round sper block height possible
- Proposal signed by 2/3 of validators
- Must not double vote (if so, punish them by kick out or some way.)
Hydrachain
145. Implementation
- HDC wire protocol replace
- Disabled proof of work check
- Blocks only created if there are transactions
- 2000 SLOC
Hydrachain
146. Proof of Identity
- HKYC/AML complianve
- Accounts need to be registerd to transact
- Multiple registrars
- Suspicious transactions can be traced back to a registrar which can reveal the transaction
Registrars
- Hierarchycal registrars they manage network
- Different jurisdiction,
- Account registry contract account -> registrar
- Sub registrar -> registar
- Apply_message hook tx.sender is registered
- Native contracts (contracts plugin framework)
- Native execution (no EVM intermediation)
- Feature chains / Restrictive enviroments
- Spped up of heavily used contracts
- Rapid development
- Limitation incompatible to the public chain.
Hydrachain
147. Ethereum compatibility
Compatible
- EVM serpent, solidity
- API XMLRPC, web3.js (multiple json rpc
connects with multiple private chains)
- Development deplyment frameworks (pyepm
etc)
Not compatible
- Wire protocol
- Consensus protocol
- Native contracts
Hydrachain
More devcon1, day3 video 07:38:53 -
148. Hierarchycal permissionalbl ename reg
- Immediate
- Safe
- Lower fees
- Global
Can be traded as crypto-assets and backed by HitFin’s USD
Ethereal name space
149. Hierarchycal permissionable name reg
ENS
• ENS is service allowing the association of paths to bytes32 values, similar to the
way DNS maps paths to IP addresses.
Problem
1. No links between contracts
2. No standarlized permission settings
3. Get and set contract, differentiate between node value.
4. Get takes path and links
Ethereal name space
153. Ujo Music
Ujo,
X
1. Publish ownership, and terms of use on to blockchain
2. Anybody can use the registered content;
3. Paymentts are automatically goes to creators.
154. Ujo Music
Where the content of music stored ?
https://s3.amazonaws.com/ujo-
dev/tiny_human/tiny_human/tiny_human.mp3?Expires=1448188324&AWSAccessKeyId=AKIAJDFIIEFHAMQ
LIMDA&Signature=j9DMFKaIFRLzfl%2FS580vXdAVDTc%3D
Currently it seems to be stored on aws s3 with the access control provided
from accessKeyID and Signature of the purchaser address.
155. Ujo Music
Let’s try to use
X
1. Publish ownership, and terms of use on to blockchain
2. Anybody can use the registered content;
3. Paymentts are automatically goes to creators.
156. Slock.it
Slock solution for renting/selling/sharing keys
X
- Owner provides deposit
and price
- User pays deposit
- Only when rending/
returning the slocked
devices, then send
transaction to Ethereum
- In other case not using
ethreum transaction
157. Slock.it
Smart Lock by contract
X
- User provides 2 number, Deposit & Price
- If the owner rented out slocked device, he can not open the device anymore ofcourse(e.g. house)
- User management included for family use case o rsomehting.
160. Slock.it
DAO business model in IoT context
DAO
• For Profit, DAO
• Issue tokens and sell it as a
share
• DAO manages funds
• DAO gain the revenue as Ether
from it in a transparent way.
• But DAO is controled by votes
on major decisions
• Then order to service provider
Service Provider
• Service providers will be many
• 1st service provider is Slock
team.
• Service provider team rewards
DAO.
161. Regis
Regis is registries with auction system
• Real state
• Marriage
• Public contracts
• Cars
• Oil exploration fields
• Registry
162. Regis
Regis is registries with auction system
• Real state
• Marriage
• Public contracts
• Cars
• Oil exploration fields
• Registry
163. Bill Marino
Agereement –making in etheruem a legal perspective
Contract: An agreement creating obligations enforceable by law.
Conversely,
“Smart contract”
Rental agreements
Mortgage agreements
Founders agreements
164. Bill Marino
Court of the internet
By embracing contract law, instead of avoiding it, we do 3 things
1. Protect ourself when auto enforcement rule fails
2. Benfit from contract law principles
3. Show the world that our contracts are worthy substrites for contra
165. Bill Marino
1. To embrace law into smart contracts
1. Offer
2. Acceptance
3. Consideration
Include these 3 things into court in law.
Example-escrow-dapp is the great example
for the state transaction.
166. Bill Marino
2. What doesn’t map onto ethereum blockchain
By embracing contract law, instead of avoiding it, we do 3 things
Optionally
- Choice of law
- Warranties
- Indeminification
- Function call schedule
- Gas sharing terms
167. Bill Marino
3. Unstoppable force (Rescission/modification/reformation)
1. State switching by Enum State{created, paid, disabled} somethings
2. Or just kill contract by suicide
Maybe state switching is better, because suicided contact can easily be
“ether garbage”
168. Bill Marino
4. To make judge people understand “Smart Contract” as legal doc
Judges on court doesn’t read/understand code.
So we should add documentation for embracing law.
How ?
Off contract, Swarm, IPFS, NatSpec
+
Onchain hash reference in ethereum contract storage
169. Bill Marino
Risk 1
Rescission
And
Modification / Reformation
Sometimes courts require you to
modify or delete contracts.
To avoid it
1. Suicide contract to delete
2. Add Enum state, then switch disable state.
Genrally state is better, because suicided contracts
Mistakenly as a “garbage” of ether.
171. Augur
Identity management on Augur - Keythereum
Keythereum
Javascript code creates keystore file natively as ethereum uses
Ethereumjs-tx
> From password, encryption and private key, on browser, augur can sign transaction.
172. Augur
Keythereum – Encryption and save
- Generate new account of private key
- Exactly same design as Geth uses
- So can export the json file
And we store it is as IPFS
- Username => IPFS hash ID
By registering from Augur browser typical
login/register button, then magic happens
174. Augur
Keythereum – When sign transaction
1. I clicked the buy button
2. My buy order was serialized and bundled into a transaction,
Which invokes the buy shares method on the augur trading conract
3. The transaction is signed in the browser
4. This transaction was sent to geth via RPC
5. Geth broadcasts the transaction to the network.
6. Augur polls geth every 12 seconds to see if the transaction has been incorporated into a block.
175. Augur
When buy shares
1. Click the buy button
2. Buy order was serialized and bundled into a transaction, which involves the
Buy shares method on the augur trading contract
3. The transaction is signed in the broser (using ethereumjs tx module)
4. This transaction was sent to geth via RPC
5. Geth broadcasts the transaction into blockchain
6. Augur polls geth every 12 secons to see the transactio has been
incorporated into a block
181. String.technology
Synthetic assets – real value mirroring = stable value crypto currencies
1. Coored coin, for 1:1 fiat backed
value
2. Asset issuance and deposit scheme,
like.Nubits. Share holders decides
and try to mirror the value, but can
be super inflation.
Or like Bitshares, user can issue new
decentralized assets with the
collateral of more than 100-% fiat
backed crypto tokens.
3. DAO scheme is new framework for
the next cyrpto-decentralized
financial world
182. String.technology
CFD value
- CFD trader can stabilize value
- Liquidity partner has
crypto:asset in 1:1 ratio
- If DAsset DAO sells virtual CFD,
- DAsset itself doesn’t give you
company’s voting right,
or real asset ownership, just
happen to mirror real world value
184. Declousing the market: From basic mechaninm
Argue
Continuous Auctions are Evil, Don’t use them.
Instead use Batch auctions
Four essential market mechanisms
1. Issuer – create/ certificate tokens
2. Clearing house – validate token transfers(settlement)
3. Auctioneer – protocol for organizing trades
4. Market marker - Intermediate between traders who arrives at different time.
Evolution of crypto-currencies: from thirp party agent sto on-chain mechanism
1. Bitcoin
2. Ripple/Mastercoin/Etherex
185. Declousing the market: From basic mechaninm
Two basic types
Continuous Auctions are Evil, Don’t use them.
Instead use Batch auctions
- Serial processing of orders one by one.
- Orders matched using pay-as-bid pricing (aka discriminatory pricing)
Discrete-time auctions aka call auctions or batch auctions
- Bastch processing of orders, all-at-once at clearing time.
- Orders matched using simple-price clearing (aka uniform-price clearing)
1. Issuer – create/ certificate tokens
2. Clearing house – validate token transfers(settlement)
3. Auctioneer – protocol for organizing trades
4. Market marker - Intermediate between traders who arrives at different time.
Evolution of crypto-currencies: from thirp party agent sto on-chain mechanism
1. Bitcoin
2. Ripple/Mastercoin/Etherex
186. Declousing the market: From basic mechaninm
Single price clearing
Continuous-time markets (pay-as-bid
pricing yb definition)
- More efficient in time-space but less
efficient in volume-space
- Arbitrage-rents inferent to the
mechanism
Discrete-time markets (unifrom price
clearing by definition)
- Respect the reality of computers
(discrete clocks, not infinitely fast)
- Defeat HFT arb-rens => more
liquidity, better prices improved
welfare.
- A better fit for blockchains (block
time sas batch periods)
187. Declousing the market: From basic mechaninm
Isn’t better to match orders super-fast ? No!
Continuous-time markets (pay-as-bid
pricing yb definition)
- More efficient in time-space but less
efficient in volume-space
- Arbitrage-rents inferent to the
mechanism
Discrete-time markets (unifrom price
clearing by definition)
- Respect the reality of computers
(discrete clocks, not infinitely fast)
- Defeat HFT arb-rens => more
liquidity, better prices improved
welfare.
- A better fit for blockchains (block
time sas batch periods)
188. Declousing the market: From basic mechaninm
Two basic types
Single batch auction
1. Let a thousand crypto currencies bloom
2. Planning to exchange all these tokens with a pay-as-bid order matching mechanism ?
3.
Why is pay-as-bi matching a problem ?
Because(when matched with pay-as-bid pricing in continuous-time)
Idntifying humans(Stale limit orders, > 5s old)
1. A better mechanism: single price clearing
189. Declousing the market: From basic mechaninm
Isn’t it better to match orders super-fast ?
Continous-time markets (pay-as-bid pricing by definition)
- More efficient in time-space, but less efficient in volume space
- Arbitrage-rents inherent to the mechanism (limit orders are free options)
Discrete-time markets (uniform-price clearing by definition!)
- Respect the reality of computers (discrete clocks, not infinitely fast)
- Defeat HFT arb-rents => more liquidity better prices improved welfare.
- Abetter fit for blockchains (Block times as batch periods)
Co
190. Backfeed
Backfeed is
• Human to Human consensus protocol
with reputation
• Human measure (using information only
quantifiable by human)
• Distributed humans
• Shared decision
Ethereum + Backfeed = Decentralized Collaborative
Organizations
Ethereum is
• Machine to Machine
• Algorithmic
• Disributed computers
• Shared State
Decentralized decision making after
shared state
Distributed communication for
making shared state
191. Backfeed
Includes
Features
Stimergic coordination
Ecnomic incentive for good behaviors
Economic resilience
Scalability
Micro-alignment
Macro-diversity
Ethereum + Backfeed = Decentralized Collaborative Organizations
Important elements
Idneitify is nothings but the history of one’s action
Reputation can only be seeded by making a variable contribution
As perceived by already reputable agents
Valuable contribution is also rewarded with tokens,.
Making an evalutions is uptting one’s reputation on earth.
192. Backfeed
Protocol dynamics – 1 network
• Make a contribution
• Other people evaluate the
contribution
• Now the collaborator getting the
reputation
Collaborator
Contribution
Collaborator
Contribution
Evaluate
Network
Give reputation tokenGive reputation token
193. Backfeed
Protocol dynamics – 2 network
Also can evaluate another
network,
Eg) facebook & wikipedia
1. Evaluate other network’s
contribution
2. If majority of people
evaluate other network’s
contribution
3. Then the collborator in
other network gets the
network’s reputation
token
Collaborator
Contribution
Collaborator
Contribution
Network
New Network
Collaborator
Contribution
194. Backfeed
Chessmates.io
• Feedback loop towards alignment
• Misaligned agents
• User who votes bad movement lose the value
Ethereum + Backfeed = Decentralized Collaborative Organizations
195. Backfeed
Qrate.Link is
Dapp for curate web contents
• Curator of web contents
• To search library, you need to have QRT tokens)
• Submit tag, links, and get rewards as Reputation token
(QRT Tokens)
Contribution = Submit tags to contents
Evaluation = influence and credts of your links and tags
Reputation = QRT Tokens
http://qrate.link/
202. GrantX project by Blockchain Labs
BlockGrant X
• Must all Opensource
• In the field of Blockchain
• Must be MIT/GPL licensed
• $50k budget for 2 months