|
rippled
|
Represents synthetic AMM offer in BookStep. More...

Public Member Functions | |
| AMMOffer (AMMLiquidity< TIn, TOut > const &ammLiquidity, TAmounts< TIn, TOut > const &amounts, std::optional< TAmounts< TIn, TOut >> const &balances, Quality const &quality) | |
| Quality | quality () const noexcept |
| Issue const & | issueIn () const |
| Issue const & | issueOut () 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 | fully_consumed () const |
| TAmounts< TIn, TOut > | limitOut (TAmounts< TIn, TOut > const &offrAmt, TOut const &limit, bool fixReducedOffers, bool roundUp) const |
| Limit out of the provided offer. More... | |
| TAmounts< TIn, TOut > | limitIn (TAmounts< TIn, TOut > const &offrAmt, TIn const &limit) const |
| Limit in of the provided offer. More... | |
| QualityFunction | getQualityFunc () const |
| bool | isFunded () const |
Static Public Member Functions | |
| template<typename... Args> | |
| static TER | send (Args &&... args) |
| Send funds without incurring the transfer fee. More... | |
| 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_ |
| const TAmounts< TIn, TOut > | amounts_ |
| const std::optional< TAmounts< TIn, TOut > > | balances_ |
| const Quality | quality_ |
| bool | consumed_ |
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 35 of file AMMLiquidity.h.
| ripple::AMMOffer< TIn, TOut >::AMMOffer | ( | AMMLiquidity< TIn, TOut > const & | ammLiquidity, |
| TAmounts< TIn, TOut > const & | amounts, | ||
| std::optional< TAmounts< TIn, TOut >> const & | balances, | ||
| Quality const & | quality | ||
| ) |
Definition at line 27 of file AMMOffer.cpp.
|
noexcept |
Definition at line 70 of file AMMOffer.h.
| Issue const & ripple::AMMOffer< TIn, TOut >::issueIn |
Definition at line 42 of file AMMOffer.cpp.
| Issue const & ripple::AMMOffer< TIn, TOut >::issueOut |
Definition at line 49 of file AMMOffer.cpp.
| AccountID const & ripple::AMMOffer< TIn, TOut >::owner |
Definition at line 56 of file AMMOffer.cpp.
| std::optional<uint256> ripple::AMMOffer< TIn, TOut >::key | ( | ) | const |
Definition at line 85 of file AMMOffer.h.
| TAmounts< TIn, TOut > const & ripple::AMMOffer< TIn, TOut >::amount |
Definition at line 63 of file AMMOffer.cpp.
| void ripple::AMMOffer< TIn, TOut >::consume | ( | ApplyView & | view, |
| TAmounts< TIn, TOut > const & | consumed | ||
| ) |
Definition at line 70 of file AMMOffer.cpp.
| bool ripple::AMMOffer< TIn, TOut >::fully_consumed | ( | ) | const |
Definition at line 97 of file AMMOffer.h.
| TAmounts< TIn, TOut > ripple::AMMOffer< TIn, TOut >::limitOut | ( | TAmounts< TIn, TOut > const & | offrAmt, |
| TOut const & | limit, | ||
| bool | fixReducedOffers, | ||
| bool | roundUp | ||
| ) | const |
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 88 of file AMMOffer.cpp.
| TAmounts< TIn, TOut > ripple::AMMOffer< TIn, TOut >::limitIn | ( | TAmounts< TIn, TOut > const & | offrAmt, |
| TIn const & | limit | ||
| ) | const |
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 118 of file AMMOffer.cpp.
| QualityFunction ripple::AMMOffer< TIn, TOut >::getQualityFunc |
Definition at line 130 of file AMMOffer.cpp.
|
static |
Send funds without incurring the transfer fee.
Definition at line 127 of file AMMOffer.h.
| bool ripple::AMMOffer< TIn, TOut >::isFunded | ( | ) | const |
Definition at line 133 of file AMMOffer.h.
|
static |
Definition at line 140 of file AMMOffer.h.
|
private |
Definition at line 42 of file AMMOffer.h.
|
private |
Definition at line 52 of file AMMOffer.h.
|
private |
Definition at line 55 of file AMMOffer.h.
|
private |
Definition at line 58 of file AMMOffer.h.
|
private |
Definition at line 60 of file AMMOffer.h.
1.8.17