mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 20:05:50 +00:00
paths - move autobridging section to an appropriate place in tx_format
This commit is contained in:
@@ -17,10 +17,6 @@ Each intermediate account gains and loses approximately equal value: either a ba
|
||||
|
||||
[](img/paths.png)
|
||||
|
||||
### Auto-Bridging ###
|
||||
|
||||
In addition to any order books that are explicitly included in a path, any currency exchange between two non-XRP currencies could potentially use XRP as an intermediary currency in a synthetic order book. This is because of auto-bridging, which serves to improve liquidity across all currency pairs by using XRP as a vehicle currency.
|
||||
|
||||
|
||||
|
||||
# Technical Details #
|
||||
@@ -67,9 +63,9 @@ A path set is an array. Each member of the path set is another array that repres
|
||||
|
||||
| Field | Value | Description |
|
||||
|-------|-------|-------------|
|
||||
| account | String - Address | (Optional) The address of the account to ripple through. |
|
||||
| currency | String - currency code | (Optional) The currency code of the currency to convert to |
|
||||
| issuer | String - Address | (Optional) The issuer of the currency to convert to |
|
||||
| account | String - Address | (Optional) If present, this path step represents rippling through the specified account. |
|
||||
| currency | String - currency code | (Optional) If present, this path step represents changing currencies through an order book. |
|
||||
| issuer | String - Address | (Optional) If the path step represents changing currencies through an order book, this field indicates the issuer of the new currency. This field is not present when changing to XRP. |
|
||||
| type | Integer | **DEPRECATED**: An indicator of which other fields are present. The value `1` indicates rippling to another account. The values `16` indicates a currency change to XRP through an order book. The value `48` indicates a currency change, with a new issuer, through an order book. |
|
||||
| type_hex | String | **DEPRECATED**: A hexadecimal representation of the `type` field. |
|
||||
|
||||
|
||||
@@ -618,6 +618,15 @@ You can determine the final disposition of an offer with an `Expiration` as soon
|
||||
|
||||
*Note:* Since only new transactions can modify the ledger, an expired offer can remain on the ledger after it becomes inactive. The offer is treated as unfunded and has no effect, but it can continue to appear in results (for example, from the [ledger_entry](rippled-apis.html#ledger-entry) command). Later on, the expired offer can get finally deleted as a result of another transaction (such as another OfferCreate) if the server encounters it while processing.
|
||||
|
||||
### Auto-Bridging ###
|
||||
|
||||
Any OfferCreate that would exchange two non-XRP currencies could potentially use XRP as an intermediary currency in a synthetic order book. This is because of auto-bridging, which serves to improve liquidity across all currency pairs by using XRP as a vehicle currency. This works because of XRP's nature as a native cryptocurrency to the Ripple Consensus Ledger. Offer execution can use a combination of direct and auto-bridged offers to achieve the best total exchange rate.
|
||||
|
||||
Example: _Anita places an offer to sell GBP and buy BRL. She might fund that this uncommon currency market has few offers. There is one offer with a good rate, but it has insufficient quantity to satisfy Anita's trade. However, both GBP and BRL have active, competitive markets to XRP. Auto-bridging software finds a way to complete Anita's offer by purchasing XRP with GBP from one trader, then selling the XRP to another trader in order to buy BRL. Anita automatically gets the best rate possible by combining the small offer in the direct GBP:BRL market with the better composite rates created by pairing GBP:XRP and XRP:BRL offers._
|
||||
|
||||
Auto-bridging happens automatically on any OfferCreate transaction. [Payment transactions](#payment) _do not_ autobridge by default, but path-finding can find paths that have the same effect.
|
||||
|
||||
|
||||
### OfferCreate Flags ###
|
||||
|
||||
Transactions of the OfferCreate type support additional values in the [`Flags` field](#flags), as follows:
|
||||
@@ -633,6 +642,9 @@ The following invalid flag combination prompts a temINVALID_FLAG error:
|
||||
|
||||
* tfImmediateOrCancel and tfFillOrKill
|
||||
|
||||
|
||||
|
||||
|
||||
## OfferCancel ##
|
||||
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/module/app/transactors/CancelOffer.cpp "Source")
|
||||
|
||||
Reference in New Issue
Block a user