mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-05 20:35:50 +00:00
Permissioned DEX: concept, API methods, links
This commit is contained in:
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
|
||||
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
|
||||
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" width="630" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="0 0 630 460" height="460" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"
|
||||
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
|
||||
/><g
|
||||
><defs id="defs1"
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
|
||||
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
|
||||
><path d="M0 0 L0 140 L160 140 L160 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
|
||||
><path d="M0 0 L0 140 L200 140 L200 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
|
||||
><path d="M0 0 L0 140 L190 140 L190 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
|
||||
><path d="M0 0 L0 80 L140 80 L140 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
|
||||
><path d="M0 0 L0 40 L110 40 L110 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
|
||||
><path d="M0 0 L0 30 L120 30 L120 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
|
||||
><path d="M0 0 L0 180 L270 180 L270 0 Z"
|
||||
/></clipPath
|
||||
></defs
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(450,300)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><circle r="7" clip-path="url(#clipPath2)" cx="80.5" cy="7.5" stroke="none"
|
||||
/></g
|
||||
><g transform="translate(450,300)"
|
||||
><circle fill="none" r="7" clip-path="url(#clipPath2)" cx="80.5" cy="7.5"
|
||||
/><path fill="none" d="M59.5 21.5 L101.5 21.5" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M80.5 14.5 L80.5 42.5" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M80.5 42.5 L66.5 70.5" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M80.5 42.5 L94.5 70.5" clip-path="url(#clipPath2)"
|
||||
/><text x="60" font-size="14px" y="93.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Tracy</text
|
||||
><text x="45" font-size="14px" y="109.2188" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>(Trader in</text
|
||||
><text x="13" font-size="14px" y="125.3281" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>permissioned DEX)</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(20,20)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><rect x="0.5" width="198.5" height="138.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
|
||||
/></g
|
||||
><g transform="translate(20,20)"
|
||||
><rect fill="none" x="0.5" width="198.5" height="138.5" y="0.5" clip-path="url(#clipPath3)"
|
||||
/><text x="60" font-size="14px" y="18.1094" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="11" font-size="14px" y="34.2188" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>USD.Acme:FOO.WayGate</text
|
||||
><path fill="none" d="M1 40.2188 L199 40.2188" clip-path="url(#clipPath3)"
|
||||
/><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" font-weight="bold" xml:space="preserve"
|
||||
>DomainID: Domain A</text
|
||||
><path fill="none" d="M1 61.3281 L199 61.3281" clip-path="url(#clipPath3)"
|
||||
/><text x="5" font-size="14px" y="76.4375" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>10 FOO : 10 USD – Marko</text
|
||||
><path fill="none" d="M1 82.4375 L199 82.4375" clip-path="url(#clipPath3)"
|
||||
/><text x="5" font-size="14px" y="97.5469" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>9 FOO : 15 USD – Tracy</text
|
||||
><path fill="none" d="M1 103.5469 L199 103.5469" clip-path="url(#clipPath3)"
|
||||
/><text x="5" font-size="14px" y="118.6562" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>...</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(290,60)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><rect x="0.5" width="188.5" height="138.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
|
||||
/></g
|
||||
><g transform="translate(290,60)"
|
||||
><rect fill="none" x="0.5" width="188.5" height="138.5" y="0.5" clip-path="url(#clipPath4)"
|
||||
/><text x="60" font-size="14px" y="18.1094" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Domain A</text
|
||||
><path fill="none" d="M1 24.1094 L189 24.1094" clip-path="url(#clipPath4)"
|
||||
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Owner: Owen</text
|
||||
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Accepted Credentials:</text
|
||||
><text x="5" font-size="14px" y="71.4375" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>- "Accredited" issued </text
|
||||
><text x="5" font-size="14px" y="87.5469" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
> by Isabel</text
|
||||
><text x="5" font-size="14px" y="103.6562" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" font-weight="bold" xml:space="preserve"
|
||||
>- "Accredited" issued</text
|
||||
><text x="5" font-size="14px" y="119.7656" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" font-weight="bold" xml:space="preserve"
|
||||
> by Owen</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(120,300)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><circle r="7" clip-path="url(#clipPath2)" cx="80.5" cy="7.5" stroke="none"
|
||||
/></g
|
||||
><g transform="translate(120,300)"
|
||||
><circle fill="none" r="7" clip-path="url(#clipPath2)" cx="80.5" cy="7.5"
|
||||
/><path fill="none" d="M59.5 21.5 L101.5 21.5" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M80.5 14.5 L80.5 42.5" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M80.5 42.5 L66.5 70.5" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M80.5 42.5 L94.5 70.5" clip-path="url(#clipPath2)"
|
||||
/><text x="60" font-size="14px" y="93.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Owen</text
|
||||
><text x="19" font-size="14px" y="109.2188" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>(credential issuer </text
|
||||
><text x="11" font-size="14px" y="125.3281" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>and domain owner)</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(300,290)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L80.7725 0.5 L80.7725 21.6094 L139 21.6094 L139 79 L0.5 79 Z" stroke="none" clip-path="url(#clipPath5)"
|
||||
/></g
|
||||
><g transform="translate(300,290)"
|
||||
><path fill="none" d="M0.5 0.5 L80.7725 0.5 L80.7725 21.6094 L139 21.6094 L139 79 L0.5 79 Z" clip-path="url(#clipPath5)"
|
||||
/><path fill="none" d="M0.5 21.6094 L80.7725 21.6094" clip-path="url(#clipPath5)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Credential</text
|
||||
><text x="5" font-size="14px" y="39.5" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Type: "Accredited"</text
|
||||
><text x="5" font-size="14px" y="55.6094" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Issuer: Owen</text
|
||||
><text x="5" font-size="14px" y="71.7188" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Subject: Tracy</text
|
||||
></g
|
||||
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(430,310)" stroke-linecap="butt"
|
||||
><path fill="none" d="M90.5 20.5 L11.5 20.5" clip-path="url(#clipPath6)"
|
||||
/><path fill="white" d="M22.2583 14 L11 20.5 L22.2583 27 Z" clip-path="url(#clipPath6)" stroke="none"
|
||||
/><path fill="none" stroke-miterlimit="10" stroke-dasharray="none" d="M22.2583 14 L11 20.5 L22.2583 27 Z" clip-path="url(#clipPath6)" stroke-linecap="square"
|
||||
/></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(430,310)"
|
||||
><text x="32.2207" xml:space="preserve" y="16" clip-path="url(#clipPath6)" stroke="none"
|
||||
>holds</text
|
||||
></g
|
||||
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(190,60)" stroke-linecap="butt"
|
||||
><path fill="none" d="M99.5 10.5 L10.5 10.5" clip-path="url(#clipPath7)"
|
||||
/><path fill="white" d="M88.7417 4 L100 10.5 L88.7417 17 Z" clip-path="url(#clipPath7)" stroke="none"
|
||||
/><path fill="none" stroke-miterlimit="10" stroke-dasharray="none" d="M88.7417 4 L100 10.5 L88.7417 17 Z" clip-path="url(#clipPath7)" stroke-linecap="square"
|
||||
/></g
|
||||
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(170,150)" stroke-linecap="butt"
|
||||
><path fill="none" d="M10.5 11.5 L10.5 40.5" clip-path="url(#clipPath8)"
|
||||
/><path fill="none" d="M10.5 40.5 L230.5 40.5" clip-path="url(#clipPath8)"
|
||||
/><path fill="none" d="M230.5 40.5 L230.5 150.5" clip-path="url(#clipPath8)"
|
||||
/><path fill="none" d="M230.5 150.5 L250.5 160.5" clip-path="url(#clipPath8)"
|
||||
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath8)" stroke="none"
|
||||
/><path fill="none" stroke-miterlimit="10" stroke-dasharray="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath8)" stroke-linecap="square"
|
||||
/></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(170,150)"
|
||||
><text x="14" xml:space="preserve" y="55.2188" clip-path="url(#clipPath8)" stroke="none"
|
||||
>grants access</text
|
||||
></g
|
||||
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(210,310)" stroke-linecap="butt"
|
||||
><path fill="none" d="M89.5 20.5 L10.5 20.5" clip-path="url(#clipPath6)"
|
||||
/><path fill="white" d="M78.7417 14 L90 20.5 L78.7417 27 Z" clip-path="url(#clipPath6)" stroke="none"
|
||||
/><path fill="none" stroke-miterlimit="10" stroke-dasharray="none" d="M78.7417 14 L90 20.5 L78.7417 27 Z" clip-path="url(#clipPath6)" stroke-linecap="square"
|
||||
/></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(210,310)"
|
||||
><text x="29.3696" xml:space="preserve" y="16" clip-path="url(#clipPath6)" stroke="none"
|
||||
>issues</text
|
||||
></g
|
||||
></g
|
||||
></svg
|
||||
>
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
|
||||
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
|
||||
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" width="810" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="0 10 810 330" height="330" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"
|
||||
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
|
||||
/><g
|
||||
><defs id="defs1"
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
|
||||
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
|
||||
><path d="M0 0 L0 70 L110 70 L110 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
|
||||
><path d="M0 0 L0 290 L250 290 L250 0 Z"
|
||||
/></clipPath
|
||||
></defs
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(670,240)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(670,240)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="27" font-size="14px" y="42.5547" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>EUR:JPY</text
|
||||
><text x="10" font-size="14px" y="58.6641" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>DomainID: B</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(550,240)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(550,240)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="27" font-size="14px" y="42.5547" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>JPY:EUR</text
|
||||
><text x="10" font-size="14px" y="58.6641" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>DomainID: B</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(280,30)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><rect x="0.5" width="248.5" height="288.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
|
||||
/></g
|
||||
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(280,30)" stroke-linecap="butt"
|
||||
><rect fill="none" x="0.5" width="248.5" height="288.5" y="0.5" clip-path="url(#clipPath3)"
|
||||
/><text x="54" font-size="14px" y="18.1094" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Permissioned DEX A</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(30,160)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(30,160)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="22" font-size="14px" y="50.6094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>USD:FOO</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(30,240)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(30,240)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="23" font-size="14px" y="50.6094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>BAR:BAZ</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(150,160)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(150,160)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="22" font-size="14px" y="50.6094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>FOO:USD</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(150,80)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(150,80)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="23" font-size="14px" y="50.6094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>FOO:XRP</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(30,80)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(30,80)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="23" font-size="14px" y="50.6094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>XRP:FOO</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(20,30)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><rect x="0.5" width="248.5" height="288.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
|
||||
/></g
|
||||
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(20,30)" stroke-linecap="butt"
|
||||
><rect fill="none" x="0.5" width="248.5" height="288.5" y="0.5" clip-path="url(#clipPath3)"
|
||||
/><text x="89" font-size="14px" y="18.1094" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Open DEX</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(410,240)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(410,240)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="27" font-size="14px" y="42.5547" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>EUR:JPY</text
|
||||
><text x="11" font-size="14px" y="58.6641" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>DomainID: A</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(290,160)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(290,160)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="22" font-size="14px" y="42.5547" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>USD:FOO</text
|
||||
><text x="11" font-size="14px" y="58.6641" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>DomainID: A</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(410,80)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><path d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" stroke="none" clip-path="url(#clipPath2)"
|
||||
/></g
|
||||
><g transform="translate(410,80)"
|
||||
><path fill="none" d="M0.5 0.5 L88.998 0.5 L88.998 21.6094 L109 21.6094 L109 69 L0.5 69 Z" clip-path="url(#clipPath2)"
|
||||
/><path fill="none" d="M0.5 21.6094 L88.998 21.6094" clip-path="url(#clipPath2)"
|
||||
/><text x="5" font-size="14px" y="16.1094" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Order Book</text
|
||||
><text x="23" font-size="14px" y="42.5547" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>FOO:XRP</text
|
||||
><text x="11" font-size="14px" y="58.6641" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>DomainID: A</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(540,30)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><rect x="0.5" width="248.5" height="288.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
|
||||
/></g
|
||||
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(540,30)" stroke-linecap="butt"
|
||||
><rect fill="none" x="0.5" width="248.5" height="288.5" y="0.5" clip-path="url(#clipPath3)"
|
||||
/><text x="54" font-size="14px" y="18.1094" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
|
||||
>Permissioned DEX B</text
|
||||
></g
|
||||
></g
|
||||
></svg
|
||||
>
|
||||
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,76 @@
|
||||
---
|
||||
seo:
|
||||
description: The definition and details of a Permissioned Domain instance.
|
||||
labels:
|
||||
- Compliance
|
||||
- Decentralized Exchange
|
||||
---
|
||||
# Permissioned DEXes
|
||||
|
||||
Permissioned DEXes are controlled environments for trading within the XRP Ledger's [decentralized exchange (DEX)](./index.md). Trading in a permissioned DEX works like trading in the open DEX, except that a [_permissioned domain_](./permissioned-domains.md) controls who can place and accept offers. By relying on permissioned DEXes, regulated businesses can participate in trading on the XRP Ledger while ensuring that all the counterparties they deal with have been properly vetted.
|
||||
|
||||
There can be multiple permissioned DEXes within the XRP Ledger blockchain. Each one is uniquely associated with a permissioned domain, which acts as an allow-list for accessing that DEX. Trades placed within a permissioned DEX can only execute against other trades in the same permissioned DEX. Each permissioned DEX can have order books for any number of currency pairs, as needed.
|
||||
|
||||
|
||||
## Background
|
||||
|
||||
The XRP Ledger has had a single, _open DEX_ since it launched. Anyone with an XRPL account can trade in this DEX, and the system automatically executes matching orders, also called offers, with no regard for who placed them. Orders also provide liquidity to cross-currency payments, which can potentially execute several trades as part of one atomic transaction. Since the system inherently knows nothing about the people and organizations behind the accounts, there is no certainty who the counterparties are for any given trade. However, economic sanctions and financial regulations often place strict rules against transacting with criminals, terrorists, or specific countries. Given these limitations, regulated financial institutions may not be willing to take the risk of trading in the open DEX.
|
||||
|
||||
More background reading:
|
||||
|
||||
- [Decentralized Exchange](./index.md)
|
||||
- [Offers](./offers.md)
|
||||
- [Permissioned Domains](./permissioned-domains.md)
|
||||
|
||||
|
||||
## Roles
|
||||
|
||||
To use a permissioned DEX, parties with the following roles and responsibilities need to exist:
|
||||
|
||||
- At least two traders to place matching offers. For example, one selling USD for XRP and one selling XRP for USD.
|
||||
- A permissioned domain owner, who controls which credentials give access to the domain.
|
||||
- A credential issuer, who issues credentials to accounts they approve.
|
||||
|
||||
It is possible for a single account to play more than one of these roles. For example, you could be the permissioned domain owner, credential issuer, _and_ a trader all at once. The only restriction is that the traders must be different accounts.
|
||||
|
||||
{% inline-svg file="./permissioned-dex-roles.svg" /%}
|
||||
|
||||
_Figure: A permissioned order book, linked to a permissioned domain. Owen is both the domain owner and the issuer of one of the domain's accepted credentials. Tracy is able to trade in the permissioned order book because she holds an appropriate credential issued by Owen._
|
||||
|
||||
|
||||
## Structure
|
||||
|
||||
With the permissioned DEXes feature, a trade offer can be _open_, _permissioned_, or _hybrid_. An open offer uses the open DEX and can be matched by anyone else's open offer, an [Automated Market Maker (AMM)](./automated-market-makers.md), or a combination of offers and an AMM. _Open offers_ are unchanged from how the XRPL's DEX works without permissioned DEXes.
|
||||
|
||||
A permissioned offer specifies a domain ID, and is only valid if a permissioned domain with the matching ID exists and the account placing the offer has access to that domain because they hold the correct credentials. Permissioned offers are placed into an order book for the given domain and currency pair, separate from the open DEX's order book for that currency pair. Permissioned offers can only execute by matching other permissioned offers that specify the same domain ID. [Cross-currency payments](../../payment-types/cross-currency-payments.md) can also specify a domain ID, in which case they are restricted to only consuming offers from the corresponding permissioned DEX. Trades in a permissioned DEX can still use [auto-bridging](./autobridging.md) as long as the necessary orders all exist in the same permissioned DEX.
|
||||
|
||||
A hybrid offer specifies a domain ID and a flag marking it as hybrid. Like a permissioned offer, it is only valid if the specified permissioned domain exists and the account placing the offer has access to that domain. However, a hybrid offer can match offers in both the specified DEX and the open DEX. Hybrid offers are tracked in both the open DEX order book and the domain-specific order book for their currency pair, and can be consumed by matching offers from either. When placed, they preferentially match offers from the permissioned DEX.
|
||||
|
||||
There is no single ledger entry to represent a given permissioned DEX: it implicitly exists as all the order books with the same domain ID. Order books with a given domain ID are implicitly created when valid offers are placed using that domain ID, and those order books are automatically deleted when they are empty. A single transaction can use multiple order books with the same domain ID—in other words, different currency pairs in the same permissioned DEX—either as part of a longer cross-currency payment or through auto-bridging. A hybrid offer can match a mix of permissioned and open offers, but a transaction cannot use multiple different domains.
|
||||
|
||||
The amount of liquidity and the best exchange rate available in any given DEX may vary depending on the offers placed in that DEX. Some traders may choose to trade in multiple permissioned DEXes and the open DEX to arbitrage price differences, while other traders may trade strictly in one domain, depending on their compliance requirements.
|
||||
|
||||
{% inline-svg file="./permissioned-dex-structure.svg" /%}
|
||||
|
||||
_Figure: The open DEX, and two different permissioned DEXes, each containing order books for a subset of possible currency pairs._
|
||||
|
||||
|
||||
### Invalid Permissioned Offers
|
||||
|
||||
In addition to the ways offers can be unfunded in the open DEX, offers in a permissioned DEX can become _invalid_. Invalid offers are treated the same way as unfunded offers, and are automatically removed whenever a transaction modifies the order book containing them. They can remain in the ledger data indefinitely until a transaction removes them, but they cannot be executed if they are invalid. Reasons that a permissioned offer can become invalid include:
|
||||
|
||||
- A credential, held by the account placing the offer, has expired or has been deleted.
|
||||
- The permissioned domain has been updated to change the set of credentials that grant access, and the account placing the offer does not hold any of the new credentials.
|
||||
- The permissioned domain has been deleted.
|
||||
|
||||
Like with unfunded offers, it is possible for an offer to become temporarily invalid, then become valid again. For example, if a trader's credential that grants access to a permissioned domain expires, their offers in the corresponding permissioned DEX would be invalid; but if they get the credential renewed, any offers that hadn't already been removed automatically become valid again.
|
||||
|
||||
### Limitations
|
||||
|
||||
The permissioned DEXes feature is enabled by the **PermissionedDEX** amendment, and relies on the [Credentials](../../decentralized-storage/credentials.md) and [Permissioned Domains](./permissioned-domains.md) amendments, so it cannot be used until _all_ of those amendments have been enabled.
|
||||
|
||||
Permissioned DEXes are incompatible with Automated Market Makers (AMMs). Permissioned offers and permissioned payments cannot be filled by AMMs, and access to AMMs cannot be restricted by a permissioned domain. Trades that use the open DEX can sometimes consume a hybrid offer and use an AMM in the same transaction, but transactions that specify a domain cannot use any AMMs.
|
||||
|
||||
Each permissioned DEX is separate, with its own order books and offers. A single transaction cannot trade in multiple permissioned DEXes or aggregate liquidity from multiple permissioned DEXes. Hybrid offers can use a mix of one permissioned DEX and the open DEX, but they cannot use multiple different permissioned DEXes.
|
||||
|
||||
The security and fairness of a permissioned DEX depend on the owner of the permissioned domain and the issuers of credentials that grant access to it. At a baseline, the definition of each credential and the requirements for getting that credential are defined and enforced by the credential issuer, so the existence of a permissioned domain does not inherently mean anything about who is able to use it in practice. A credential issuer can issue or revoke credentials at their discretion. If they are unreliable or compromised, so is any permissioned domain that accepts their credentials. Similarly, the domain owner can modify the domain's list of accepted credentials to grant or deny access to the domain arbitrarily, so if they are untrustworthy or compromised, the domain is as well.
|
||||
131
docs/img/_sources/permissioned-dex-roles.uxf
Normal file
131
docs/img/_sources/permissioned-dex-roles.uxf
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<diagram program="umlet" version="14.2">
|
||||
<zoom_level>10</zoom_level>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>300</x>
|
||||
<y>290</y>
|
||||
<w>140</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Credential
|
||||
--
|
||||
Type: "Accredited"
|
||||
Issuer: Owen
|
||||
Subject: Tracy
|
||||
halign=left</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Relation</id>
|
||||
<coordinates>
|
||||
<x>210</x>
|
||||
<y>310</y>
|
||||
<w>110</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<<.
|
||||
issues</panel_attributes>
|
||||
<additional_attributes>90.0;20.0;10.0;20.0</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLActor</id>
|
||||
<coordinates>
|
||||
<x>120</x>
|
||||
<y>300</y>
|
||||
<w>160</w>
|
||||
<h>140</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Owen
|
||||
(credential issuer
|
||||
and domain owner)</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Relation</id>
|
||||
<coordinates>
|
||||
<x>170</x>
|
||||
<y>150</y>
|
||||
<w>270</w>
|
||||
<h>180</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<<.
|
||||
r1=grants access</panel_attributes>
|
||||
<additional_attributes>10.0;10.0;10.0;40.0;230.0;40.0;230.0;150.0;250.0;160.0</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLClass</id>
|
||||
<coordinates>
|
||||
<x>290</x>
|
||||
<y>60</y>
|
||||
<w>190</w>
|
||||
<h>140</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Domain A
|
||||
--
|
||||
Owner: Owen
|
||||
Accepted Credentials:
|
||||
- "Accredited" issued
|
||||
by Isabel
|
||||
*- "Accredited" issued*
|
||||
* by Owen*</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLClass</id>
|
||||
<coordinates>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<w>200</w>
|
||||
<h>140</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
USD.Acme:FOO.WayGate
|
||||
--
|
||||
*DomainID: Domain A*
|
||||
--
|
||||
10 FOO : 10 USD – Marko
|
||||
-
|
||||
9 FOO : 15 USD – Tracy
|
||||
--
|
||||
...</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Relation</id>
|
||||
<coordinates>
|
||||
<x>190</x>
|
||||
<y>60</y>
|
||||
<w>120</w>
|
||||
<h>30</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=<<.</panel_attributes>
|
||||
<additional_attributes>100.0;10.0;10.0;10.0</additional_attributes>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLActor</id>
|
||||
<coordinates>
|
||||
<x>450</x>
|
||||
<y>300</y>
|
||||
<w>160</w>
|
||||
<h>140</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Tracy
|
||||
(Trader in
|
||||
permissioned DEX)</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Relation</id>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>310</y>
|
||||
<w>110</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=.>>
|
||||
holds</panel_attributes>
|
||||
<additional_attributes>90.0;20.0;10.0;20.0</additional_attributes>
|
||||
</element>
|
||||
</diagram>
|
||||
175
docs/img/_sources/permissioned-dex-structure.uxf
Normal file
175
docs/img/_sources/permissioned-dex-structure.uxf
Normal file
@@ -0,0 +1,175 @@
|
||||
<?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>540</x>
|
||||
<y>30</y>
|
||||
<w>250</w>
|
||||
<h>290</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=.
|
||||
Permissioned DEX B</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>410</x>
|
||||
<y>80</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
FOO:XRP
|
||||
DomainID: A</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>290</x>
|
||||
<y>160</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
USD:FOO
|
||||
DomainID: A</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>410</x>
|
||||
<y>240</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
EUR:JPY
|
||||
DomainID: A</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLClass</id>
|
||||
<coordinates>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<w>250</w>
|
||||
<h>290</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=.
|
||||
Open DEX</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>30</x>
|
||||
<y>80</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
XRP:FOO</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>150</x>
|
||||
<y>80</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
FOO:XRP</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>150</x>
|
||||
<y>160</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
FOO:USD</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
BAR:BAZ</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>30</x>
|
||||
<y>160</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
USD:FOO</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLClass</id>
|
||||
<coordinates>
|
||||
<x>280</x>
|
||||
<y>30</y>
|
||||
<w>250</w>
|
||||
<h>290</h>
|
||||
</coordinates>
|
||||
<panel_attributes>lt=.
|
||||
Permissioned DEX A</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>550</x>
|
||||
<y>240</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
JPY:EUR
|
||||
DomainID: B</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLPackage</id>
|
||||
<coordinates>
|
||||
<x>670</x>
|
||||
<y>240</y>
|
||||
<w>110</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>Order Book
|
||||
--
|
||||
EUR:JPY
|
||||
DomainID: B</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
</diagram>
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
html: book_offers.html
|
||||
parent: path-and-order-book-methods.html
|
||||
seo:
|
||||
description: Get info about offers to exchange two currencies.
|
||||
labels:
|
||||
@@ -10,7 +8,7 @@ labels:
|
||||
# book_offers
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/BookOffers.cpp "Source")
|
||||
|
||||
The `book_offers` method retrieves a list of [Offers](../../../../concepts/tokens/decentralized-exchange/offers.md) between two currencies, also known as an _order book_. The response omits [unfunded Offers](../../../../concepts/tokens/decentralized-exchange/offers.md#lifecycle-of-an-offer) and reports how much of each remaining Offer's total is currently funded.
|
||||
The `book_offers` method retrieves a list of [offers](../../../../concepts/tokens/decentralized-exchange/offers.md) between two currencies, also known as an _order book_. The response omits [unfunded offers](../../../../concepts/tokens/decentralized-exchange/offers.md#lifecycle-of-an-offer) and reports how much of each remaining offer's total is currently funded.
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
@@ -71,11 +69,12 @@ The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Required? | Description |
|
||||
|:---------------|:-----------------|:----------|-------------|
|
||||
| `taker_gets` | Object | Yes | The asset the account taking the Offer would receive, as a [currency without an amount](../../../protocol/data-types/currency-formats.md#specifying-without-amounts). |
|
||||
| `taker_pays` | Object | Yes | The asset the account taking the Offer would pay, as a [currency without an amount](../../../protocol/data-types/currency-formats.md#specifying-without-amounts). |
|
||||
| `taker_gets` | Object | Yes | The asset the account taking the offer would receive, as a [currency without an amount](../../../protocol/data-types/currency-formats.md#specifying-without-amounts). |
|
||||
| `taker_pays` | Object | Yes | The asset the account taking the offer would pay, as a [currency without an amount](../../../protocol/data-types/currency-formats.md#specifying-without-amounts). |
|
||||
| `domain` | [Hash][] | No | The ledger entry ID of a permissioned domain. If provided, return offers from the corresponding [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md) instead of using the open DEX. _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `ledger_hash` | [Hash][] | No | The unique hash of the ledger version to use. (See [Specifying Ledgers][]) |
|
||||
| `ledger_index` | [Ledger Index][] | No | The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
| `limit` | Number | No | The maximum number of Offers to return. The response may include fewer results. |
|
||||
| `limit` | Number | No | The maximum number of offers to return. The response may include fewer results. |
|
||||
| `taker` | String | No | The [Address][] of an account to use as a perspective. The response includes this account's Offers even if they are unfunded. (You can use this to see what Offers are above or below yours in the order book.) |
|
||||
|
||||
|
||||
@@ -242,9 +241,9 @@ The response follows the [standard format][], with a successful result containin
|
||||
| `ledger_current_index` | [Ledger Index][] | _(Omitted if `ledger_current_index` is provided)_ The [ledger index][] of the current in-progress ledger version, which was used to retrieve this information. |
|
||||
| `ledger_index` | [Ledger Index][] | _(Omitted if `ledger_current_index` provided)_ The ledger index of the ledger version that was used when retrieving this data, as requested. |
|
||||
| `ledger_hash` | [Hash][] | _(May be omitted)_ The identifying hash of the ledger version that was used when retrieving this data, as requested. |
|
||||
| `offers` | Array | Array of offer objects, each of which has the fields of an [Offer object](../../../protocol/ledger-data/ledger-entry-types/offer.md) |
|
||||
| `offers` | Array | Array of offer objects, as described below: |
|
||||
|
||||
In addition to the standard Offer fields, the following fields may be included in members of the `offers` array:
|
||||
Each member of the `offers` array contains canonical fields of an [Offer entry][] and can also contain the following additional fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:--------------------|:--------------------|:--------------------|
|
||||
|
||||
@@ -55,14 +55,16 @@ An example of the request format:
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:----------------------|:-----------------|:----------------------------------|
|
||||
| `subcommand` | String | Use `"create"` to send the create sub-command |
|
||||
| `source_account` | String | Unique address of the account to find a path from. (In other words, the account that would be sending a payment.) |
|
||||
| `destination_account` | String | Unique address of the account to find a path to. (In other words, the account that would receive a payment.) |
|
||||
| `destination_amount` | String or Object | [Currency Amount][] that the destination account would receive in a transaction. **Special case:** You can specify `"-1"` (for XRP) or provide -1 as the contents of the `value` field (for non-XRP currencies). This requests a path to deliver as much as possible, while spending no more than the amount specified in `send_max` (if provided). |
|
||||
| `send_max` | String or Object | _(Optional)_ [Currency Amount][] that would be spent in the transaction. Not compatible with `source_currencies`. |
|
||||
| `paths` | Array | _(Optional)_ Array of arrays of objects, representing [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md) to check. You can use this to keep updated on changes to particular paths you already know about, or to check the overall cost to make a payment along a certain path. |
|
||||
| Field | Type | Required? | Description |
|
||||
|:----------------------|:---------------------|:----------|:------------|
|
||||
| `subcommand` | String | Yes | Use `"create"` to send the create sub-command |
|
||||
| `source_account` | String - [Address][] | Yes | The account to find a path from. (In other words, the account that would be sending a payment.) |
|
||||
| `destination_account` | String - [Address][] | Yes | The account to find a path to. (In other words, the account that would receive a payment.) |
|
||||
| `destination_amount` | [Currency Amount][] | Yes | How much the destination account would receive. **Special case:** You can specify `"-1"` (for XRP) or provide -1 as the contents of the `value` field (for tokens). This requests a path to deliver as much as possible, while spending no more than the amount specified in `send_max` (if provided). |
|
||||
| `domain` | String - [Hash][] | No | The ledger entry ID of a permissioned domain. If provided, only return paths that use the corresponding [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md). _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `paths` | Array | No | Array of arrays of objects, representing [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md) to check.
|
||||
| `send_max` | [Currency Amount][] | No | Maximum amount that would be spent. Not compatible with `source_currencies`. |
|
||||
You can use this to keep updated on changes to particular paths you already know about, or to check the overall cost to make a payment along a certain path. |
|
||||
|
||||
The server also recognizes the following fields, but the results of using them are not guaranteed: `source_currencies`, `bridges`. These fields should be considered reserved for future use.
|
||||
|
||||
|
||||
@@ -85,15 +85,16 @@ rippled ripple_path_find '{"source_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:----------------------|:---------------------------|:------------------------|
|
||||
| `source_account` | String | Unique address of the account that would send funds in a transaction |
|
||||
| `destination_account` | String | Unique address of the account that would receive funds in a transaction |
|
||||
| `destination_amount` | String or Object | [Currency Amount][] that the destination account would receive in a transaction. **Special case:** You can specify `"-1"` (for XRP) or provide -1 as the contents of the `value` field (for non-XRP currencies). This requests a path to deliver as much as possible, while spending no more than the amount specified in `send_max` (if provided). |
|
||||
| `send_max` | String or Object | _(Optional)_ [Currency Amount][] that would be spent in the transaction. Cannot be used with `source_currencies`. |
|
||||
| `source_currencies` | Array | _(Optional)_ Array of currencies that the source account might want to spend. Each entry in the array should be a JSON object with a mandatory `currency` field and optional `issuer` field, like how [currency amounts][Currency Amount] are specified. Cannot contain more than **18** source currencies. By default, uses all source currencies available up to a maximum of **88** different currency/issuer pairs. |
|
||||
| `ledger_hash` | String | _(Optional)_ The unique hash of the ledger version to use. (See [Specifying Ledgers][]) |
|
||||
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
| Field | Type | Required? | Description |
|
||||
|:----------------------|:---------------------|:----------|:------------|
|
||||
| `source_account` | String - [Address][] | Yes | The account that would send funds |
|
||||
| `destination_account` | String - [Address][] | Yes | The account that would receive funds |
|
||||
| `destination_amount` | [Currency Amount][] | Yes | How much the destination account would receive. **Special case:** You can specify `"-1"` (for XRP) or provide -1 as the contents of the `value` field (for tokens). This requests a path to deliver as much as possible, while spending no more than the amount specified in `send_max` (if provided). |
|
||||
| `domain` | String - [Hash][] | No | The ledger entry ID of a permissioned domain. If provided, only return paths that use the corresponding [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md). _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `ledger_hash` | String - [Hash][] | No | The unique hash of the ledger version to use. (See [Specifying Ledgers][]) |
|
||||
| `ledger_index` | [Ledger Index][] | No | The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
| `send_max` | [Currency Amount][] | No | Maximum amount that would be spent. Cannot be used with `source_currencies`. |
|
||||
| `source_currencies` | Array | No | Array of currencies that the source account might want to spend. Each entry in the array should be a JSON object with a mandatory `currency` field and optional `issuer` field, like how [currency amounts][Currency Amount] are specified. Cannot contain more than **18** source currencies. By default, uses all source currencies available up to a maximum of **88** different currency/issuer pairs. |
|
||||
|
||||
## Response Format
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ All types of directories are automatically updated by the protocol as necessary.
|
||||
|
||||
| Name | JSON Type | [Internal Type][] | Required? | Description |
|
||||
|:--------------------|:----------|:------------------|:----------|:------------|
|
||||
| `DomainID` | String | Hash256 | No | (Offer directories only) The ledger entry ID of a permissioned domain. If present, this order book belongs to the corresponding [Permissioned DEX](../permissioned-dexes.md). Otherwise, this order book is part of the open DEX. _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `DomainID` | String | Hash256 | No | (Offer directories only) The ledger entry ID of a permissioned domain. If present, this order book belongs to the corresponding [Permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md). Otherwise, this order book is part of the open DEX. _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `ExchangeRate` | String | UInt64 | No | (Offer directories only) **DEPRECATED**. Do not use. |
|
||||
| `Flags` | Number | UInt32 | Yes | A bit-map of boolean flags enabled for this object. Currently, the protocol defines no flags for `DirectoryNode` objects. The value is always `0`. |
|
||||
| `Indexes` | Array | Vector256 | Yes | The contents of this directory: an array of IDs of other objects. |
|
||||
|
||||
@@ -42,10 +42,10 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
|
||||
| Name | JSON Type | [Internal Type][] | Required? | Description |
|
||||
|:--------------------|:---------------------|:------------------|:----------|:------------|
|
||||
| `Account` | String - [Address][] | AccountID | Yes | The account that owns this offer. |
|
||||
| `AdditionalBooks` | Array | Array | No | A list of additional offer directories that link to this offer. This field must be present if this is a hybrid offer in a [permissioned DEX](../permissioned-dexes.md) and if it is not a hybrid offer. The array always contains exactly 1 entry. _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `AdditionalBooks` | Array | Array | No | A list of additional offer directories that link to this offer. This field is only present if this is a hybrid offer in a [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md). The array always contains exactly 1 entry. _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `BookDirectory` | String - [Hash][] | Hash256 | Yes | The ID of the [offer directory](directorynode.md) that links to this offer. |
|
||||
| `BookNode` | String | UInt64 | Yes | A hint indicating which page of the offer directory links to this entry, in case the directory consists of multiple pages. |
|
||||
| `DomainID` | String - [Hash][] | Hash256 | No | The ledger entry ID of a [permissioned domain](/docs/concepts/tokens/decentralized-exchange/permissioned-domains). If present, this offer belongs to the corresponding [Permissioned DEX](/docs/concepts/tokens/decentralized-exchange/permissioned-dexes.md). _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `DomainID` | String - [Hash][] | Hash256 | No | The ledger entry ID of a permissioned domain. If present, this offer belongs to the corresponding [Permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md). _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `Expiration` | Number | UInt32 | No | Indicates the time after which this offer is considered unfunded. See [Specifying Time][] for details. |
|
||||
| `LedgerEntryType` | String | UInt16 | Yes | The value `0x006F`, mapped to the string `Offer`, indicates that this is an offer entry. |
|
||||
| `OwnerNode` | String | UInt64 | Yes | A hint indicating which page of the owner directory links to this entry, in case the directory consists of multiple pages. |
|
||||
|
||||
@@ -45,7 +45,7 @@ Payments are also the only way to [create accounts](#creating-accounts).
|
||||
| `DeliverMin` | [Currency Amount][] | Amount | No | Minimum amount of destination currency this transaction should deliver. Only valid if this is a [partial payment](#partial-payments). |
|
||||
| `Destination` | String - [Address][] | AccountID | Yes | The account receiving the payment. |
|
||||
| `DestinationTag` | Number | UInt32 | No | Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay. |
|
||||
| `DomainID` | String - [Hash][] | Hash256 | No | The ledger entry ID of a permissioned domain. If this is a cross-currency payment, only use the corresponding [permissioned DEX](../permissioned-dexes.md) to convert currency. Both the sender and the recipient must have valid credentials that grant access to the specified domain. This field has no effect if the payment is not cross-currency. _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `DomainID` | String - [Hash][] | Hash256 | No | The ledger entry ID of a permissioned domain. If this is a cross-currency payment, only use the corresponding [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md) to convert currency. Both the sender and the recipient must have valid credentials that grant access to the specified domain. This field has no effect if the payment is not cross-currency. _(Requires the [PermissionedDEX amendment][] {% not-enabled /%})_ |
|
||||
| `InvoiceID` | String - Hexadecimal | Hash256 | No | Arbitrary 256-bit value representing a specific reason or identifier for this payment. |
|
||||
| `Paths` | Array of path arrays | PathSet | No | _(Auto-fillable)_ Array of [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md) to be used for this transaction. Must be omitted for XRP-to-XRP transactions. |
|
||||
| `SendMax` | [Currency Amount][] | Amount | No | Highest amount of source currency this transaction is allowed to cost, including [transfer fees](../../../../concepts/tokens/transfer-fees.md), exchange rates, and [slippage](http://en.wikipedia.org/wiki/Slippage_%28finance%29). Does not include the [XRP destroyed as a cost for submitting the transaction](../../../../concepts/transactions/transaction-cost.md). Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments. |
|
||||
|
||||
@@ -150,6 +150,7 @@
|
||||
- page: docs/concepts/tokens/decentralized-exchange/ticksize.md
|
||||
- page: docs/concepts/tokens/decentralized-exchange/automated-market-makers.md
|
||||
- page: docs/concepts/tokens/decentralized-exchange/permissioned-domains.md
|
||||
- page: docs/concepts/tokens/decentralized-exchange/permissioned-dexes.md
|
||||
- page: docs/concepts/accounts/index.md
|
||||
expanded: false
|
||||
items:
|
||||
|
||||
Reference in New Issue
Block a user