|
xrpld
|
Represents synthetic AMM offer in BookStep. More...
#include <AMMOffer.h>

Public Member Functions | |
| AMMOffer (AMMLiquidity< TIn, TOut > const &ammLiquidity, TAmounts< TIn, TOut > const &amounts, TAmounts< TIn, TOut > const &balances, Quality const &quality) | |
| Quality | quality () const noexcept |
| Asset const & | assetIn () const |
| Asset const & | assetOut () const |
| AccountID const & | owner () const |
| std::optional< uint256 > | key () const |
| TAmounts< TIn, TOut > const & | amount () const |
| void | consume (ApplyView &view, TAmounts< TIn, TOut > const &consumed) |
| bool | fullyConsumed () const |
| TAmounts< TIn, TOut > | limitOut (TAmounts< TIn, TOut > const &offerAmount, TOut const &limit, bool roundUp) const |
| Limit out of the provided offer. | |
| TAmounts< TIn, TOut > | limitIn (TAmounts< TIn, TOut > const &offerAmount, TIn const &limit, bool roundUp) const |
| Limit in of the provided offer. | |
| QualityFunction | getQualityFunc () const |
| bool | isFunded () const |
| bool | checkInvariant (TAmounts< TIn, TOut > const &consumed, beast::Journal j) const |
| Check the new pool product is greater or equal to the old pool product or if decreases then within some threshold. | |
Static Public Member Functions | |
| template<typename... Args> | |
| static TER | send (Args &&... args) |
| Send funds without incurring the transfer fee. | |
| static std::pair< std::uint32_t, std::uint32_t > | adjustRates (std::uint32_t ofrInRate, std::uint32_t ofrOutRate) |
Private Attributes | |
| AMMLiquidity< TIn, TOut > const & | ammLiquidity_ |
| TAmounts< TIn, TOut > const | amounts_ |
| TAmounts< TIn, TOut > const | balances_ |
| Quality const | quality_ |
| bool | consumed_ {false} |
Represents synthetic AMM offer in BookStep.
AMMOffer mirrors TOffer methods for use in generic BookStep methods. AMMOffer amounts are changed indirectly in BookStep limiting steps.
Definition at line 21 of file AMMOffer.h.
| xrpl::AMMOffer< TIn, TOut >::AMMOffer | ( | AMMLiquidity< TIn, TOut > const & | ammLiquidity, |
| TAmounts< TIn, TOut > const & | amounts, | ||
| TAmounts< TIn, TOut > const & | balances, | ||
| Quality const & | quality ) |
Definition at line 26 of file AMMOffer.cpp.
|
nodiscardnoexcept |
Definition at line 51 of file AMMOffer.h.
|
nodiscard |
Definition at line 38 of file AMMOffer.cpp.
|
nodiscard |
Definition at line 45 of file AMMOffer.cpp.
|
nodiscard |
Definition at line 52 of file AMMOffer.cpp.
|
nodiscard |
Definition at line 66 of file AMMOffer.h.
|
nodiscard |
Definition at line 59 of file AMMOffer.cpp.
| void xrpl::AMMOffer< TIn, TOut >::consume | ( | ApplyView & | view, |
| TAmounts< TIn, TOut > const & | consumed ) |
Definition at line 66 of file AMMOffer.cpp.
|
nodiscard |
Definition at line 78 of file AMMOffer.h.
|
nodiscard |
Limit out of the provided offer.
If one-path then swapOut using current balances. If multi-path then ceil_out using current quality.
Definition at line 82 of file AMMOffer.cpp.
|
nodiscard |
Limit in of the provided offer.
If one-path then swapIn using current balances. If multi-path then ceil_in using current quality.
Definition at line 107 of file AMMOffer.cpp.
|
nodiscard |
Definition at line 124 of file AMMOffer.cpp.
|
static |
Send funds without incurring the transfer fee.
Definition at line 104 of file AMMOffer.h.
|
nodiscard |
Definition at line 111 of file AMMOffer.h.
|
static |
Definition at line 118 of file AMMOffer.h.
|
nodiscard |
Check the new pool product is greater or equal to the old pool product or if decreases then within some threshold.
Definition at line 133 of file AMMOffer.cpp.
|
private |
Definition at line 24 of file AMMOffer.h.
|
private |
Definition at line 34 of file AMMOffer.h.
|
private |
Definition at line 36 of file AMMOffer.h.
|
private |
Definition at line 39 of file AMMOffer.h.
|
private |
Definition at line 41 of file AMMOffer.h.