SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
1/18
Findel: Secure Derivative Contracts for
Ethereum
Alex Biryukov Dmitry Khovratovich
Sergei Tikhomirov
1st Workshop on Trusted Smart Contracts
In Association with Financial Cryptography 17
7 April 2017, Malta
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
2/18
... and Smart Contract Developer
Adapted from xkcd.com/1428
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
3/18
Contract Programming is Different
”Move fast and break things”: unacceptable!
Real money (property, resources) at stake
Side-effects often cause trouble (The DAO)
We need a formally verifiable contract language
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
4/18
A Secure Financial DSL Helps
Avoid misinterpretation
Standardize templates
Prove correctness
Facilitate automated processing
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
5/18
Composable Contracts [Peyton Jones et al. 2003]
Ten primitives to compose complex agreements
Declarative paradigm
Implemented as an embedded DSL in Haskell
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
5/18
Composable Contracts [Peyton Jones et al. 2003]
Ten primitives to compose complex agreements
Declarative paradigm
Implemented as an embedded DSL in Haskell
Example: zero-coupon bond
when (at 2018-01-01) (scale (konst 100)) (one $))
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
6/18
Ethereum
Turing-complete virtual machine
Key feature: trustless execution
Perfect match for financial agreements!
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
7/18
Ethereum Meets Composable Contracts
Map declarative DSL to blockchain execution paradigm
Retrieve and validate external data
Ensure that execution cost is bearable
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
8/18
Financial Derivatives Language (Findel)
Contract: agreement between issuer and owner
Contract description defines rights and obligations
Description is a tree of primitives
Description and issuer are immutable
Ownership may be transferred
Smart contract acts as execution environment
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
One – transfer 1 unit of currency from issuer to owner
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
One – transfer 1 unit of currency from issuer to owner
Scale(k, c) – multiply all payments by a constant value
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
One – transfer 1 unit of currency from issuer to owner
Scale(k, c) – multiply all payments by a constant value
ScaleObs(obs, c) – multiply all payments by an
observable value (think exchange rate)
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
9/18
Findel Primitives 1/2
Zero – do nothing
One – transfer 1 unit of currency from issuer to owner
Scale(k, c) – multiply all payments by a constant value
ScaleObs(obs, c) – multiply all payments by an
observable value (think exchange rate)
Give(c) – swap parties
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
10/18
Findel Primitives 2/2
And(c1, c2) – execute both sub-contracts
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
10/18
Findel Primitives 2/2
And(c1, c2) – execute both sub-contracts
Or(c1, c2) – owner chooses which sub-contract to
execute
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
10/18
Findel Primitives 2/2
And(c1, c2) – execute both sub-contracts
Or(c1, c2) – owner chooses which sub-contract to
execute
If (obs, c1, c2) – execute one of sub-contracts
(depending on observable)
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
10/18
Findel Primitives 2/2
And(c1, c2) – execute both sub-contracts
Or(c1, c2) – owner chooses which sub-contract to
execute
If (obs, c1, c2) – execute one of sub-contracts
(depending on observable)
Timebound(t0, t1, c) – execute c, if within time bounds
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
11/18
Example 1/3: Currency Exchange
And(Give(One(EUR)), ScaleObs(exchAddr, One(USD)))
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
12/18
Example 2/3: European Option
Timebound(t0 − δ, t0 + δ, Or(One(EUR), Zero))
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
13/18
Example 3/3: Binary Option
If (orclAddr, Scale(10, One(USD)), Zero)
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
14/18
External Data Problem
Contracts require external data
Ethereum is isolated from broader Internet
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
14/18
External Data Problem
Contracts require external data
Ethereum is isolated from broader Internet
Our solution: gateways
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
15/18
Gateways
Smart contract pulls and stores external data with
timestamp
Optional proof of authenticity (e.g., signature under
known public key)
Findel marketplace queries gateway when needed
Parties are responsible for updating gateways
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
16/18
What Is Done
Defined a declarative DSL suited for blockchain
Implemented a marketplace smart contract in Solidity
Assessed cost of operation (∼ $0.1 per avg operation)1
1
As of Jan 2017 at $10 / ether
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
17/18
Future Work
Enforcement: deal with users defaulting on debt
Model balances using ERC20 Token
Extend model to support multi-party contracts
Look into valuation and verification
Findel: Ethereum
Derivatives
Biryukov,
Khovratovich,
Tikhomirov
Introduction
Financial Languages
Composable
Contracts
Ethereum
Our Contribution
Findel DSL
Examples
Gateways
Conclusion
18/18
Questions?
cryptolux.org
@serg tikhomirov
sergei.tikhomirov@uni.lu

Mais conteúdo relacionado

Mais de Sergei Tikhomirov

Smartcheck: Static Analysis of Ethereum Smart Contracts
Smartcheck: Static Analysis of Ethereum Smart ContractsSmartcheck: Static Analysis of Ethereum Smart Contracts
Smartcheck: Static Analysis of Ethereum Smart ContractsSergei Tikhomirov
 
Privacy preserving KYC on Ethereum
Privacy preserving KYC on EthereumPrivacy preserving KYC on Ethereum
Privacy preserving KYC on EthereumSergei Tikhomirov
 
Bitcoin: money of the future
Bitcoin: money of the futureBitcoin: money of the future
Bitcoin: money of the futureSergei Tikhomirov
 
Financial Domain-Specific Languages
Financial Domain-Specific LanguagesFinancial Domain-Specific Languages
Financial Domain-Specific LanguagesSergei Tikhomirov
 
Computer Science and Blockchain Research at University of Luxembourg
Computer Science and Blockchain Research at University of LuxembourgComputer Science and Blockchain Research at University of Luxembourg
Computer Science and Blockchain Research at University of LuxembourgSergei Tikhomirov
 
Blockchain security research (in 2 minutes)
Blockchain security research (in 2 minutes)Blockchain security research (in 2 minutes)
Blockchain security research (in 2 minutes)Sergei Tikhomirov
 
Pethreon: recurring payments on Ethereum
Pethreon: recurring payments on EthereumPethreon: recurring payments on Ethereum
Pethreon: recurring payments on EthereumSergei Tikhomirov
 
Bitcoin: деньги будущего
Bitcoin: деньги будущегоBitcoin: деньги будущего
Bitcoin: деньги будущегоSergei Tikhomirov
 

Mais de Sergei Tikhomirov (8)

Smartcheck: Static Analysis of Ethereum Smart Contracts
Smartcheck: Static Analysis of Ethereum Smart ContractsSmartcheck: Static Analysis of Ethereum Smart Contracts
Smartcheck: Static Analysis of Ethereum Smart Contracts
 
Privacy preserving KYC on Ethereum
Privacy preserving KYC on EthereumPrivacy preserving KYC on Ethereum
Privacy preserving KYC on Ethereum
 
Bitcoin: money of the future
Bitcoin: money of the futureBitcoin: money of the future
Bitcoin: money of the future
 
Financial Domain-Specific Languages
Financial Domain-Specific LanguagesFinancial Domain-Specific Languages
Financial Domain-Specific Languages
 
Computer Science and Blockchain Research at University of Luxembourg
Computer Science and Blockchain Research at University of LuxembourgComputer Science and Blockchain Research at University of Luxembourg
Computer Science and Blockchain Research at University of Luxembourg
 
Blockchain security research (in 2 minutes)
Blockchain security research (in 2 minutes)Blockchain security research (in 2 minutes)
Blockchain security research (in 2 minutes)
 
Pethreon: recurring payments on Ethereum
Pethreon: recurring payments on EthereumPethreon: recurring payments on Ethereum
Pethreon: recurring payments on Ethereum
 
Bitcoin: деньги будущего
Bitcoin: деньги будущегоBitcoin: деньги будущего
Bitcoin: деньги будущего
 

Último

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 

Último (20)

Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Findel: Secure Derivative Contracts for Ethereum