Files
xrpl-dev-portal/content/_img-sources/decentralized-exchange-example-trade.uxf
Rome Reginelli 79b4e54a6a Improve Docs for Decentralized Exchange (#1357)
* Decentralized Exchange concept article

1st draft

* DEX: example trade diagram, offers rewording

* Offers: more rewriting/updates

* OfferCreate: Add error cases + other updates

* Known Amendments: fix tecEXPIRED, DepositPreauth

- tecEXPIRED was initially attached to the Checks amendment but got
  moved to DepositPreauth before either became released. The docs weren't
  previously updated to reflect this change
- A change to the snippets caused the DepositPreauth amendment reference
  link to get overwritten so the table links to the feature page rather than the
  amendment description. Special cases this one link.

* OfferCreate error cases: switch to table

* DEX/Offers: edits per review
2022-03-21 08:11:13 -07:00

686 lines
14 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.2">
<zoom_level>10</zoom_level>
<element>
<id>UMLClass</id>
<coordinates>
<x>140</x>
<y>110</y>
<w>220</w>
<h>120</h>
</coordinates>
<panel_attributes>Offer
--
Buy: 100 FOO.WayGate
Spend: 1000 XRP
-..
(Exchange rate:
10.0 XRP/FOO.WayGate)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>120</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>1 XRP for 2 FOO</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>150</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>10 XRP for 15 FOO</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>210</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>20000 XRP for 1000 FOO</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>580</x>
<y>110</y>
<w>40</w>
<h>120</h>
</coordinates>
<panel_attributes>lt=..
</panel_attributes>
<additional_attributes>20.0;100.0;10.0;100.0;10.0;10.0;20.0;10.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>180</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>20 XRP for 5 FOO</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>240</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>...</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>460</x>
<y>120</y>
<w>130</w>
<h>90</h>
</coordinates>
<panel_attributes>These Offers match because their exchange rates are equal or better.
style=wordwrap
halign=right</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>820</x>
<y>90</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>Exchange Rate</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>360</x>
<y>150</y>
<w>110</w>
<h>30</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;</panel_attributes>
<additional_attributes>10.0;10.0;90.0;10.0</additional_attributes>
</element>
<element>
<id>UMLActor</id>
<coordinates>
<x>40</x>
<y>110</y>
<w>60</w>
<h>110</h>
</coordinates>
<panel_attributes>Tran</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>70</x>
<y>130</y>
<w>80</w>
<h>30</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;</panel_attributes>
<additional_attributes>10.0;10.0;60.0;10.0</additional_attributes>
</element>
<element>
<id>UMLActor</id>
<coordinates>
<x>60</x>
<y>340</y>
<w>60</w>
<h>110</h>
</coordinates>
<panel_attributes>Tran</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>110</x>
<y>190</y>
<w>410</w>
<h>210</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;</panel_attributes>
<additional_attributes>390.0;10.0;10.0;190.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>300</x>
<y>300</y>
<w>150</w>
<h>80</h>
</coordinates>
<panel_attributes>Tran receives a total of 22 FOO.WayGate from the other traders.
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>710</x>
<y>270</y>
<w>30</w>
<h>100</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;
</panel_attributes>
<additional_attributes>10.0;10.0;10.0;80.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>210</x>
<y>500</y>
<w>200</w>
<h>90</h>
</coordinates>
<panel_attributes>The remainder of Tran's Offer is added to the opposite order book at its original exchange rate.
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>60</y>
<w>490</w>
<h>210</h>
</coordinates>
<panel_attributes>Order Book: XRP:FOO.WayGate
--
</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>680</x>
<y>90</y>
<w>80</w>
<h>30</h>
</coordinates>
<panel_attributes>Amount</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>990</x>
<y>90</y>
<w>70</w>
<h>30</h>
</coordinates>
<panel_attributes>Owner</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLActor</id>
<coordinates>
<x>1290</x>
<y>110</y>
<w>60</w>
<h>110</h>
</coordinates>
<panel_attributes>Brad</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLActor</id>
<coordinates>
<x>1350</x>
<y>60</y>
<w>60</w>
<h>110</h>
</coordinates>
<panel_attributes>Amy</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLActor</id>
<coordinates>
<x>1300</x>
<y>220</y>
<w>60</w>
<h>110</h>
</coordinates>
<panel_attributes>David</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>120</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>Amy</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>150</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>Brad</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>180</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>Omar</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>210</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>David</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLActor</id>
<coordinates>
<x>1360</x>
<y>170</y>
<w>60</w>
<h>110</h>
</coordinates>
<panel_attributes>Omar</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>240</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>...</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>240</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>≥20</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>210</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>20.0</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>180</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>4.0</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>150</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>0.667</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>120</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>0.5</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>1110</x>
<y>160</y>
<w>180</w>
<h>30</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;</panel_attributes>
<additional_attributes>10.0;10.0;160.0;10.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>1120</x>
<y>180</y>
<w>180</w>
<h>90</h>
</coordinates>
<panel_attributes>The owners of the matching Offers receive a total of 31 XRP from Tran.
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>430</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>20000 XRP for 1000 FOO</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>460</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>...</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>820</x>
<y>400</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>Exchange Rate</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>370</y>
<w>490</w>
<h>120</h>
</coordinates>
<panel_attributes>Order Book: XRP:FOO.WayGate
--
</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>680</x>
<y>400</y>
<w>80</w>
<h>30</h>
</coordinates>
<panel_attributes>Amount</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>990</x>
<y>400</y>
<w>70</w>
<h>30</h>
</coordinates>
<panel_attributes>Owner</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>430</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>David</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>460</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>...</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>460</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>≥20</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>430</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>20.0</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>620</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>...</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>820</x>
<y>560</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>Exchange Rate</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>530</y>
<w>490</w>
<h>120</h>
</coordinates>
<panel_attributes>Order Book: FOO.WayGate:XRP
--
</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>660</x>
<y>560</y>
<w>80</w>
<h>30</h>
</coordinates>
<panel_attributes>Amount</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>940</x>
<y>560</y>
<w>70</w>
<h>30</h>
</coordinates>
<panel_attributes>Owner</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>590</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>Tran
bg=green
transparency=0</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>940</x>
<y>620</y>
<w>160</w>
<h>30</h>
</coordinates>
<panel_attributes>...</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>620</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>...</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>590</y>
<w>120</w>
<h>30</h>
</coordinates>
<panel_attributes>0.1
bg=green
transparency=0</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>610</x>
<y>590</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>78 FOO for 780 XRP
bg=green
transparency=0</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>90</x>
<y>40</y>
<w>270</w>
<h>60</h>
</coordinates>
<panel_attributes>Tran places an Offer to buy 100 FOO issued by WayGate, by spending up to 1000 XRP.
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>130</x>
<y>410</y>
<w>470</w>
<h>170</h>
</coordinates>
<panel_attributes>lt=-&gt;&gt;&gt;
</panel_attributes>
<additional_attributes>10.0;10.0;450.0;150.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>760</x>
<y>280</y>
<w>140</w>
<h>80</h>
</coordinates>
<panel_attributes>Consumed Offers are removed from the order book.
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
</diagram>