Table of Contents for
Ripple Quick Start Guide

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Ripple Quick Start Guide by Febin John James Published by Packt Publishing, 2018
  1. Ripple Quick Start Guide
  2. Title Page
  3. Copyright and Credits
  4. Ripple Quick Start Guide
  5. Dedication
  6. About Packt
  7. Why subscribe?
  8. Packt.com
  9. Contributors
  10. About the author
  11. About the reviewer
  12. Packt is searching for authors like you
  13. Table of Contents
  14. Preface
  15. Who this book is for
  16. What this book covers
  17. To get the most out of this book
  18. Download the example code files
  19. Conventions used
  20. Get in touch
  21. Reviews
  22. Getting Started with Ripple
  23. The need for decentralization
  24. Introduction to blockchain
  25. Introduction to Bitcoin
  26. Inefficiencies in payment systems
  27. International money transfer through Bitcoin
  28. Disadvantages of Bitcoin
  29. Ripple
  30. International money transfer through Ripple
  31. The Ripple Protocol
  32. Account creation
  33. Reserve
  34. Transactions
  35. Multisigning
  36. Consensus
  37. Important properties of the consensus protocol
  38. Ledger versions
  39. Validation
  40. Advantages of Ripple
  41. Currency agnostic
  42. Simplified consensus
  43. Low fee
  44. Reduced foreign exchange cost
  45. Pathfinding algorithm
  46. Adaptable cryptography
  47. Anti-spam mechanism
  48. Potential risks of Ripple
  49. Regulatory issues
  50. Trust Issues
  51. Security vulnerabilities
  52. Problems of being an open protocol
  53. Summary
  54. Working with Ripple Currency XRP
  55. Types of wallets
  56. Online wallets
  57. Desktop/mobile wallets
  58. Offline wallets
  59. Hardware wallets
  60. Paper wallets
  61. How do I choose my wallet?
  62. Setting up a Ripple account
  63. Activating the Ripple account
  64. Making an international transfer
  65. Trading XRP
  66. Importing an existing wallet
  67. Setting up an offline wallet
  68. Protecting your Ripples
  69. Don't leave your Ripples on centralized exchanges
  70. Make backups 
  71. Use antivirus software
  72. Disable browser plugins
  73. Store Ripples in multiple wallets 
  74. For big sums, use cold wallets
  75. Use reputable wallets
  76. Important things you must remember
  77. Summary
  78. Applications of Ripple
  79. High speed and low-cost payments 
  80. xCurrent
  81. How does it work?
  82. Advanced payment applications
  83. Cross-currency payments
  84. How does it work?
  85. Checks
  86. How does it work?
  87. Payment channels
  88. How does it work?
  89. Escrow
  90. How does it work?
  91. Initial coin offering
  92. Decentralized exchange
  93. Debunking misconceptions about Ripple
  94. Ripple and XRP are not the same
  95. Funds lockup
  96. No mining
  97. Limited smart contracts
  98. Important things to remember
  99. Summary
  100. Getting Started with the Ripple API
  101. Connecting to the Ripple test network
  102. Setting up the development environment
  103. First Ripple application
  104. Sending money 
  105. Prepare transaction
  106. Sign transaction
  107. Submit transaction
  108. Summary
  109. Developing Applications Using the Ripple API
  110. Sending checks
  111. Cashing checks
  112. Creating a time-held escrow
  113. Creating a conditionally-held escrow
  114. Important things you must remember
  115. Summary
  116. Other Books You May Enjoy
  117. Leave a review - let other readers know what you think

How does it work?

In the first chapter, we learned that Ripple allows you to exchange not just Ripple but anything of value. This means you can send currencies, such as USD and EUR, through Ripple. This is made possible because Ripple allows organizations or institutions to issue currency. This issued currency is tied to holdings of currency outside Ripple's ledgers. So, a bank X can issue USD in the form of an XRP ledger asset by holding the money outside. 

Now, there's a problem of trust. How can you ensure that the digital asset issued you through Ripple can be redeemed for USD later? Hence, Ripple allows you to create a trust line between you and the issuer. You can select the maximum limit that an issuer can owe you. Ripple therefore uses issued currency and trust lines to enable the exchange of anything of value.

Now, let's get back to cross-currency payments. Ripple allows traders to create offers on the Ripple ledger. 

Let's say John does forex trading, and he actively creates offers on Ripple's ledger book. The last offer he created was that he was willing to buy dollars for euros at a fixed exchange rate($1.25 = 1).

Paul who lives in the United States wants to send €500 to his friend in Europe. Paul comes to Ripple to make a cross-currency payment. However, there's a problem; he can't know for sure at what rates his money would be exchanged before making the transaction. He has two ways of making this cross-currency payment: 

  • He can send a fixed money at a variable cost to him. Here, he wants to make sure his friend receives exactly €500 and he's willing to bear the price for it.  
  • He can send a variable amount at a fixed cost to him. Here, he's only willing to spend $600, however, his friend might receive, say, €480, depending on the exchange rates. Such payments are called partial payments in Ripple. 

Paul will be able to see the offers posted by traders on the Ripple's ledger. Since Ripple selects the offer that's the cheapest, Paul can make a guess. However, since a high volume of transaction happens in Ripple, the offer could be redeemed by someone else before Paul. 

Paul decides to send a fixed money of €500  at a variable cost to him. Ripple's system checks for the best offer and finds John's offer is good. According to John's exchange rate, Paul is debited with $625. John's €500 is sent to Paul's friend and John is credited with $625. That's how Ripple makes cross-currency payments happen.

The following diagram demonstrates the flow of transaction between users through the Ripple network:

Here's an example of the "OfferCreate" JSON that's created by a trader who wants to buy $50:

{
"TransactionType": "OfferCreate",
"Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee": "12",
"Flags": 0,
"LastLedgerSequence": 7108682,
"Sequence": 8,
"TakerGets": "6000000",
"TakerPays": {
"currency": "USD",
"issuer": "ruazs5h1qEsqpke88pcqnaseXdm6od2xc",
"value": "50"
}
}