findel secure derivative contracts for
play

Findel: Secure Derivative Contracts for Tikhomirov Ethereum - PowerPoint PPT Presentation

Findel: Ethereum Derivatives Biryukov, Khovratovich, Findel: Secure Derivative Contracts for Tikhomirov Ethereum Introduction Financial Languages Composable Contracts Ethereum Alex Biryukov Dmitry Khovratovich Our Contribution Sergei


  1. Findel: Ethereum Derivatives Biryukov, Khovratovich, Findel: Secure Derivative Contracts for Tikhomirov Ethereum Introduction Financial Languages Composable Contracts Ethereum Alex Biryukov Dmitry Khovratovich Our Contribution Sergei Tikhomirov Findel DSL Examples Gateways Conclusion 1st Workshop on Trusted Smart Contracts In Association with Financial Cryptography 17 7 April 2017, Malta 1/18

  2. Findel: Ethereum ... and Smart Contract Developer Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts Ethereum Our Contribution Findel DSL Examples Gateways Conclusion Adapted from xkcd.com/1428 2/18

  3. Findel: Ethereum Contract Programming is Different Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts Ethereum ◮ ”Move fast and break things”: unacceptable! Our Contribution Findel DSL Examples ◮ Real money (property, resources) at stake Gateways Conclusion ◮ Side-effects often cause trouble (The DAO) ◮ We need a formally verifiable contract language 3/18

  4. Findel: Ethereum A Secure Financial DSL Helps Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts Ethereum ◮ Avoid misinterpretation Our Contribution Findel DSL Examples ◮ Standardize templates Gateways Conclusion ◮ Prove correctness ◮ Facilitate automated processing 4/18

  5. Findel: Ethereum Composable Contracts [Peyton Jones et al. 2003] Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts ◮ Ten primitives to compose complex agreements Ethereum Our Contribution Findel DSL ◮ Declarative paradigm Examples Gateways Conclusion ◮ Implemented as an embedded DSL in Haskell 5/18

  6. Findel: Ethereum Composable Contracts [Peyton Jones et al. 2003] Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts ◮ Ten primitives to compose complex agreements Ethereum Our Contribution Findel DSL ◮ Declarative paradigm Examples Gateways Conclusion ◮ Implemented as an embedded DSL in Haskell Example: zero-coupon bond when (at 2018-01-01) (scale (konst 100)) (one $)) 5/18

  7. Findel: Ethereum Ethereum Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts Ethereum Our Contribution ◮ Turing-complete virtual machine Findel DSL Examples Gateways ◮ Key feature: trustless execution Conclusion ◮ Perfect match for financial agreements! 6/18

  8. Findel: Ethereum Ethereum Meets Composable Contracts Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts Ethereum Our Contribution ◮ Map declarative DSL to blockchain execution paradigm Findel DSL Examples Gateways ◮ Retrieve and validate external data Conclusion ◮ Ensure that execution cost is bearable 7/18

  9. Findel: Ethereum Fin ancial De rivatives L anguage (Findel) Derivatives Biryukov, Khovratovich, Tikhomirov Introduction ◮ Contract: agreement between issuer and owner Financial Languages Composable Contracts Ethereum ◮ Contract description defines rights and obligations Our Contribution Findel DSL Examples Gateways ◮ Description is a tree of primitives Conclusion ◮ Description and issuer are immutable ◮ Ownership may be transferred ◮ Smart contract acts as execution environment 8/18

  10. Findel: Ethereum Findel Primitives 1/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ Zero – do nothing Composable Contracts Ethereum Our Contribution Findel DSL Examples Gateways Conclusion 9/18

  11. Findel: Ethereum Findel Primitives 1/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ Zero – do nothing Composable Contracts Ethereum ◮ One – transfer 1 unit of currency from issuer to owner Our Contribution Findel DSL Examples Gateways Conclusion 9/18

  12. Findel: Ethereum Findel Primitives 1/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ Zero – do nothing Composable Contracts Ethereum ◮ One – transfer 1 unit of currency from issuer to owner Our Contribution Findel DSL Examples Gateways ◮ Scale ( k , c ) – multiply all payments by a constant value Conclusion 9/18

  13. Findel: Ethereum Findel Primitives 1/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ Zero – do nothing Composable Contracts Ethereum ◮ One – transfer 1 unit of currency from issuer to owner Our Contribution Findel DSL Examples Gateways ◮ Scale ( k , c ) – multiply all payments by a constant value Conclusion ◮ ScaleObs ( obs , c ) – multiply all payments by an observable value (think exchange rate) 9/18

  14. Findel: Ethereum Findel Primitives 1/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ Zero – do nothing Composable Contracts Ethereum ◮ One – transfer 1 unit of currency from issuer to owner Our Contribution Findel DSL Examples Gateways ◮ Scale ( k , c ) – multiply all payments by a constant value Conclusion ◮ ScaleObs ( obs , c ) – multiply all payments by an observable value (think exchange rate) ◮ Give ( c ) – swap parties 9/18

  15. Findel: Ethereum Findel Primitives 2/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ And ( c 1 , c 2 ) – execute both sub-contracts Composable Contracts Ethereum Our Contribution Findel DSL Examples Gateways Conclusion 10/18

  16. Findel: Ethereum Findel Primitives 2/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ And ( c 1 , c 2 ) – execute both sub-contracts Composable Contracts Ethereum Our Contribution ◮ Or ( c 1 , c 2 ) – owner chooses which sub-contract to Findel DSL Examples execute Gateways Conclusion 10/18

  17. Findel: Ethereum Findel Primitives 2/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ And ( c 1 , c 2 ) – execute both sub-contracts Composable Contracts Ethereum Our Contribution ◮ Or ( c 1 , c 2 ) – owner chooses which sub-contract to Findel DSL Examples execute Gateways Conclusion ◮ If ( obs , c 1 , c 2 ) – execute one of sub-contracts (depending on observable) 10/18

  18. Findel: Ethereum Findel Primitives 2/2 Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages ◮ And ( c 1 , c 2 ) – execute both sub-contracts Composable Contracts Ethereum Our Contribution ◮ Or ( c 1 , c 2 ) – owner chooses which sub-contract to Findel DSL Examples execute Gateways Conclusion ◮ If ( obs , c 1 , c 2 ) – execute one of sub-contracts (depending on observable) ◮ Timebound ( t 0 , t 1 , c ) – execute c , if within time bounds 10/18

  19. Findel: Ethereum Example 1/3: Currency Exchange Derivatives Biryukov, Khovratovich, Tikhomirov And ( Give ( One ( EUR )) , ScaleObs ( exchAddr , One ( USD ))) Introduction Financial Languages Composable Contracts Ethereum Our Contribution Findel DSL Examples Gateways Conclusion 11/18

  20. Findel: Ethereum Example 2/3: European Option Derivatives Biryukov, Khovratovich, Tikhomirov Timebound ( t 0 − δ, t 0 + δ, Or ( One ( EUR ) , Zero )) Introduction Financial Languages Composable Contracts Ethereum Our Contribution Findel DSL Examples Gateways Conclusion 12/18

  21. Findel: Ethereum Example 3/3: Binary Option Derivatives Biryukov, Khovratovich, Tikhomirov If ( orclAddr , Scale (10 , One ( USD )) , Zero ) Introduction Financial Languages Composable Contracts Ethereum Our Contribution Findel DSL Examples Gateways Conclusion 13/18

  22. Findel: Ethereum External Data Problem Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts Ethereum Our Contribution ◮ Contracts require external data Findel DSL Examples Gateways ◮ Ethereum is isolated from broader Internet Conclusion 14/18

  23. Findel: Ethereum External Data Problem Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts Ethereum Our Contribution ◮ Contracts require external data Findel DSL Examples Gateways ◮ Ethereum is isolated from broader Internet Conclusion ◮ Our solution: gateways 14/18

  24. Findel: Ethereum Gateways Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable ◮ Smart contract pulls and stores external data with Contracts Ethereum timestamp Our Contribution Findel DSL Examples ◮ Optional proof of authenticity (e.g., signature under Gateways Conclusion known public key) ◮ Findel marketplace queries gateway when needed ◮ Parties are responsible for updating gateways 15/18

  25. Findel: Ethereum What Is Done Derivatives Biryukov, Khovratovich, Tikhomirov Introduction Financial Languages Composable Contracts Ethereum ◮ Defined a declarative DSL suited for blockchain Our Contribution Findel DSL Examples Gateways ◮ Implemented a marketplace smart contract in Solidity Conclusion ◮ Assessed cost of operation ( ∼ $0 . 1 per avg operation) 1 1 As of Jan 2017 at $10 / ether 16/18

Recommend


More recommend