3#include <xrpl/basics/Number.h>
4#include <xrpl/protocol/AccountID.h>
5#include <xrpl/protocol/Asset.h>
6#include <xrpl/protocol/TER.h>
7#include <xrpl/protocol/UintTypes.h>
50 bool validZero =
false);
98 return 1 -
getFee(tfee) / 2;
A currency issued by an account.
Number is a floating point type that can represent a wide range of values.
Rules controlling protocol behavior.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr std::uint16_t kVoteMaxSlots
NotTEC invalidAMMAmount(STAmount const &amount, std::optional< std::pair< Asset, Asset > > const &pair=std::nullopt, bool validZero=false)
Validate the amount.
constexpr std::uint16_t kTradingFeeThreshold
constexpr std::uint32_t kTotalTimeSlotSecs
Number feeMultHalf(std::uint16_t tfee)
Get fee multiplier (1 - tfee / 2) @tfee trading fee in basis points.
constexpr std::uint32_t kAuctionSlotDiscountedFeeFraction
bool ammEnabled(Rules const &)
Return true if required AMM amendment is enabled.
NotTEC invalidAMMAssetPair(Asset const &asset1, Asset const &asset2, std::optional< std::pair< Asset, Asset > > const &pair=std::nullopt)
BaseUInt< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
Currency ammLPTCurrency(Asset const &asset1, Asset const &asset2)
Calculate Liquidity Provider Token (LPT) Currency.
TERSubset< CanCvtToNotTEC > NotTEC
Number feeMult(std::uint16_t tfee)
Get fee multiplier (1 - tfee) @tfee trading fee in basis points.
constexpr std::uint32_t kAuctionSlotMinFeeFraction
constexpr std::uint32_t kAuctionSlotFeeScaleFactor
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
constexpr std::uint16_t kAuctionSlotTimeIntervals
Number getFee(std::uint16_t tfee)
Convert to the fee from the basis points.
std::optional< std::uint8_t > ammAuctionTimeSlot(std::uint64_t current, STObject const &auctionSlot)
Get time slot of the auction slot.
constexpr std::uint32_t kVoteWeightScaleFactor
Issue ammLPTIssue(Asset const &asset1, Asset const &asset2, AccountID const &ammAccountID)
Calculate LPT Issue from AMM asset pair.
constexpr std::uint16_t kAuctionSlotMaxAuthAccounts
NotTEC invalidAMMAsset(Asset const &asset, std::optional< std::pair< Asset, Asset > > const &pair=std::nullopt)
constexpr std::uint32_t kAuctionSlotIntervalDuration