stellar for web developers - rpaconferences.com · for web developers richard piacentini blockchain...
TRANSCRIPT
STELLAR
WHY YOU CAN'T IGNORE IT !
FOR WEB DEVELOPERS
RICHARD PIACENTINI BLOCKCHAIN TECHNOLOGY CONFERENCE - BANGKOK
STFWD - NUXOS ASIA
INTRODUCTION
FACTS & FIGURES (QUICKLY)
▸ Name - Stellar (Lumens)
▸ Trading Symbol - XLM
▸ Total Lumens - 103.78B XLM
▸ Lumens Available - 18.54B XLM
▸ Emission rate - Inflation mechanism
▸ Market Cap - Quite a Lot (approximately)
▸ Market Rank - Usually around 8th
STFWD - NUXOS ASIA
INTRODUCTION
PURPOSE
▸ Moving money across borders
▸ Quickly and reliably
▸ At almost no cost !
▸ Connecting Banks, Payment Systems & People
STFWD - NUXOS ASIA
INTRODUCTION
SOME KEY DATES
▸ 2013 - Fork of Ripple
▸ 2014 - Stellar Development Foundation
▸ 2015 - New Consensus Algorithm (SCP)
▸ 2015 (November) - Launch of Upgraded Network
▸ 2017 - IBM choose Stellar for it’s cross-border payments solution
▸ 2018…
STFWD - NUXOS ASIA
HOW DOES IT WORKS
Credits: Stellar.org
How do you send EUR to your friend using USD on the Stellar network ?
STFWD - NUXOS ASIA
HOW DOES IT WORKS
Credits: Stellar.org
Stellar - A network of decentralised servers that power a distributed ledger
STFWD - NUXOS ASIA
HOW DOES IT WORKS
Credits: Stellar.org
This ledger records every transaction in the system for people and companies alikeA complete copy of the global ledger exists on each Stellar server
STFWD - NUXOS ASIA
HOW DOES IT WORKS
Credits: Stellar.org
Servers communicate with each other to verify transactions and sync the ledgerThis mechanism is known as consensus and happens every 2-5 seconds
STFWD - NUXOS ASIA
HOW DOES IT WORKS
Credits: Stellar.org
Stellar network
STFWD - NUXOS ASIA
HOW DOES IT WORKS
Credits: Stellar.org
Your analog wallet Your online wallet
Your deposit
Your money issued as credit
Stellar network
STFWD - NUXOS ASIA
HOW DOES IT WORKS
Credits: Stellar.org
STFWD - NUXOS ASIA
HOW DOES IT WORKS
Credits: Stellar.org
Your money issued as credit
You Your friend
Stellar network
STFWD - NUXOS ASIA
ADVANTAGES - 100% OPEN-SOURCE
WHY STELLAR ?
▸ Fast enough (for now…)
▸ Very Low Transaction fees (really !)
▸ Cost of 1 operation: 0.00001 XLM
▸ Decentralised Exchange Built-in (SDEX)
▸ SCP - Stellar Consensus Protocol - by Prof. David Mazières
STFWD - NUXOS ASIA
PROFESSOR MAZIÈRES - WWW.SCS.STANFORD.EDU/~DM/
STFWD - NUXOS ASIA
ARCHITECTURE OVERVIEW
MAIN COMPONENTS
▸ Stellar Core
▸ Backbone of the Stellar Network
▸ Validating and agreeing on the status of every Tx (SCP) with other Core nodes
▸ Horizon Server
▸ RESTful HTTP API Server
▸ Interact securely with Stellar Core
STFWD - NUXOS ASIA
ARCHITECTURE OVERVIEW
STFWD - NUXOS ASIA
ARCHITECTURE OVERVIEW
DATA STORAGE
▸ PostgreSQL
▸ Core Database
▸ Horizon Database
STFWD - NUXOS ASIA
ARCHITECTURE OVERVIEW
DATA STORAGE
STFWD - NUXOS ASIA
ARCHITECTURE OVERVIEW
CORE DATABASE HORIZON DATABASE
STFWD - NUXOS ASIA
CONCEPTS
LEDGER
▸ State of the network at a given point in time
▸ List all accounts and balances, all orders in the DEX, and any other persistent data
▸ Cryptographically linked to previous ledger
▸ 1st ledger in history: Genesis Ledger
STFWD - NUXOS ASIA
CONCEPTS
LEDGER HEADER
▸ Reference to the actual data in the ledger
▸ Reference to the previous ledger
STFWD - NUXOS ASIA
GENERAL
LEDGER HEADERS - DATA STRUCTURE
STFWD - NUXOS ASIA
CONCEPTS
ACCOUNT
▸ Central data structure in Stellar
▸ Identified by a public key and saved in the ledger
▸ Everything else in the ledger (offers, trustlines, data, …) belongs to an account
▸ Access controlled by public/private key cryptography
▸ Multi-signatures built-in
STFWD - NUXOS ASIA
CONCEPTS
ASSET
▸ Stellar can track, hold and transfer any type of assets: $, €, Stocks and tokens
▸ Any asset on the network can be traded and exchanged with any other
▸ Holding assets is holding a credit from a particular issuer (account)
▸ A trustline must be created to trust an issuing account
STFWD - NUXOS ASIA
CONCEPTS
TRANSACTION
▸ Command that modify the ledger state
▸ Strictly ordered by sequence numbers
▸ Contain an arbitrary list of operations
▸ Up to 20 signatures, superfluous signatures aren’t allowed
▸ Optional Time Bounds (lower/upper)
STFWD - NUXOS ASIA
BATTERY INCLUDED !
STELLAR SECURE CONTRACTS
▸ Because being too SMART is most of the times not a good thing…
▸ Account Multi-Signatures
▸ Batching/Atomicity
▸ Sequencing
▸ Time Bounds Transactions
STFWD - NUXOS ASIA
DEVELOPER TOOLS
SOFTWARE DEVELOPMENT KIT - SDK
▸ Javascript
▸ Ruby
▸ Python
▸ Java
▸ .NET
▸ ….
STFWD - NUXOS ASIA
EXAMPLE: PAYMENT WITH JAVASCRIPT SDK
STFWD - NUXOS ASIA
DEVELOPER TOOLS
STELLAR LABORATORY
▸ Set of tools to try out and learn
▸ Build, Sign and Submit transactions
▸ Query any Horizon endpoint
▸ Ultra-fast Prototyping !
▸ Web/App Developer’s Playground ! :)
STFWD - NUXOS ASIA
REAL STUFF !
NOW LET’S TRY !
STFWD - NUXOS ASIA
MORE OF STELLAR
THERE IS ALSO…
▸ Stellar Federation Server
▸ Converts a human readable address to an account ID
▸ Use transaction memo to include information about payment(s)
▸ Stellar Bridge Server
▸ Send and receive payments easily…
▸ …Using Federation and Compliance servers
▸ Stellar Compliance Server
▸ AML, KYC
▸ Stellar Compliance Protocol - standard way to exchange compliance information, pre-approve transaction with another financial institution.
STFWD - NUXOS ASIA
RESOURCES
USEFUL LINKS
▸ https://www.stellar.org/developers/
▸ https://www.stellar.org/laboratory
▸ https://stellarterm.com/
▸ https://dashboard.stellar.org/
▸ https://stellarchain.io/
STFWD - NUXOS ASIA
THE END
THANK YOU !!
QUESTIONS ?
STFWD - NUXOS ASIA
THE END
THANK YOU !!(AGAIN)
STFWD - NUXOS ASIA
ADVANCED
CHANNELING PAYMENTS
▸ High transactions throughput
▸ Avoiding Sequence Collisions
▸ Using different source account(s) to send the transactions
STFWD - NUXOS ASIA
ADVANCED
MULTI-SIG ESCROW W/ TIMELOCK
▸ Safely distributing tokens during an ICO
▸ Using a multi-signature escrow account
▸ Locking token distribution until a specific date
▸ Optionally: add a recovery mechanism after another specific date