Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Dapps with Generalized State Channels

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Building Dapps with Generalized State Channels

Avatar for Erik Bryn

Erik Bryn

June 21, 2018

Other Decks in Technology

Transcript

  1. prototypal.com Building Dapps with Generalized State Channels Erik Bryn
 Counterfactual

    core team Founder, Prototypal An introduction & my lessons learned
  2. prototypal.com About me • Founder of Prototypal • Ember.js &

    Counterfactual core teams • Recently moved to Austin from SF • Relatively new to the blockchain ecosystem
  3. prototypal.com A connection, or channel, between two or more parties

    that facilitates the transmission of signed commitments What are State Channels?
  4. prototypal.com State Channels facilitate off-chain interactions with the safety &

    guarantees of the blockchain What are State Channels?
  5. prototypal.com State Channels are an evolution of Payment Channels State

    Channels are to Payment Channels, as Ethereum is to Bitcoin Payment channels
  6. prototypal.com Why should you care about State Channels? Blockchain (on-chain)

    interactions will always be expensive The blockchain is a resource that you will always have to pay for
  7. prototypal.com Not every interaction between parties needs to be published

    on-chain into an immutable database that lives forever Why should you care about State Channels?
  8. prototypal.com State Channels might be a better default for many

    types of Dapps. That said, they’re not a silver bullet. Why should you care about State Channels?
  9. prototypal.com State Channels scale! State Channels give you instant, private,

    free, trust-less transactions. State Channels are built with standard off the shelf technologies and can be as scalable as your typical centralized web applications.
  10. prototypal.com … but what about Sharding/Plasma/Casper? It turns out all

    these Ethereum scaling technologies are complementary However, with on-chain scaling, you’ll always have to pay gas, wait for block confirmations, etc.
  11. prototypal.com What are Generalized State Channels? A technique for creating

    State Channels with a minimal on-chain footprint for both privacy and gas efficiency, while being secure and game theoretically sound
  12. prototypal.com At the core, a Generalized State Channel is built

    upon a multisignature wallet. The multisig acts as an escrow for assets being used within State Channel Dapps. What are Generalized State Channels?
  13. prototypal.com Counterfactual instantiation is an important concept that enables us

    to sign commitments in State Channels that can build upon Smart Contract logic without actually needing those contracts to be deployed or invoked What are Generalized State Channels?
  14. prototypal.com How can you use State Channels today? There’s been

    a lot of talk and research published over the past few years, but it’s difficult to get started today
  15. prototypal.com How can you use State Channels today? A recently

    released paper detailing a technique called Force Move Games is a great place to start: https://medium.com/statechannels/introducing-the- force-move-games-framework-for-state-channels- b32dd953c13f
  16. prototypal.com We want to see Generalized State Channels exist in

    the world, so we’re building the Counterfactual framework. It’s an open source, holistic GSC implementation targeted towards everyday Dapp developers.
  17. prototypal.com And no… we’re not doing an ICO This is

    just good ol’ fashioned open source
  18. prototypal.com The scope of our work spans from core research

    all the way to the user experience of Dapp developers and their users The Counterfactual framework
  19. prototypal.com In my experience, the best way to build a

    framework is to build applications and extract the framework from them
  20. prototypal.com Ethmo: our first GSC Dapp Ember.js counterfactual-client Ethers.js Ember

    Data ember-ethereum counterfactual-contracts gnosis-safe-contracts Ethmo ganache-cli Node.js Websocket Relay
  21. prototypal.com Lessons learned Both of these GSC example Dapps used

    their own WebSocket relays for communication between parties We’re interested in exploring using libp2p / Whisper
  22. prototypal.com Lessons learned The most important thing for user’s safety

    while using State Channels is to ensure their channel state is retained. In our example apps, we simply used the browser’s localStorage, this isn’t quite good enough for production use.
  23. prototypal.com Lessons learned To avoid every State Channel interaction requiring

    user signing, our Dapps create ephemeral keys which are the owners of the underlying multisig. These ephemeral keys are also important to retain.
  24. prototypal.com Lessons learned For these reasons, and more, we strongly

    believe the success of State Channels is dependent upon their adoption / integration with wallets.
  25. prototypal.com We're trying to experiment and build a holistic understanding

    of the system before we starting promoting any particular implementation details outside of the paper What’s next?
  26. prototypal.com If you’re interested in this space, 
 we’d love

    to have you work with us! 
 
 If you’re building an app that could utilize state channels today or in the very near future, reach out! What’s next?