20 #ifndef RIPPLE_PROTOCOL_AMMCORE_H_INCLUDED
21 #define RIPPLE_PROTOCOL_AMMCORE_H_INCLUDED
23 #include <ripple/basics/Number.h>
24 #include <ripple/protocol/AccountID.h>
25 #include <ripple/protocol/Issue.h>
26 #include <ripple/protocol/TER.h>
27 #include <ripple/protocol/UintTypes.h>
81 bool validZero =
false);
129 return 1 -
getFee(tfee) / 2;
134 #endif // RIPPLE_PROTOCOL_AMMCORE_H_INCLUDED
constexpr std::uint32_t AUCTION_SLOT_FEE_SCALE_FACTOR
A currency issued by an account.
constexpr std::uint16_t VOTE_MAX_SLOTS
constexpr std::uint32_t VOTE_WEIGHT_SCALE_FACTOR
constexpr std::uint16_t AUCTION_SLOT_TIME_INTERVALS
Issue ammLPTIssue(Currency const &cur1, Currency const &cur2, AccountID const &ammAccountID)
Calculate LPT Issue from AMM asset pair.
constexpr std::uint32_t AUCTION_SLOT_DISCOUNTED_FEE_FRACTION
Number feeMult(std::uint16_t tfee)
Get fee multiplier (1 - tfee) @tfee trading fee in basis points.
bool ammEnabled(Rules const &)
Return true if required AMM amendments are enabled.
Number getFee(std::uint16_t tfee)
Convert to the fee from the basis points.
AccountID ammAccountID(std::uint16_t prefix, uint256 const &parentHash, uint256 const &ammID)
Calculate AMM account ID.
NotTEC invalidAMMAmount(STAmount const &amount, std::optional< std::pair< Issue, Issue >> const &pair=std::nullopt, bool validZero=false)
Validate the amount.
constexpr std::uint32_t AUCTION_SLOT_MIN_FEE_FRACTION
Integers of any length that is a multiple of 32-bits.
NotTEC invalidAMMAssetPair(Issue const &issue1, Issue const &issue2, std::optional< std::pair< Issue, Issue >> const &pair=std::nullopt)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr std::uint16_t TRADING_FEE_THRESHOLD
constexpr std::uint32_t TOTAL_TIME_SLOT_SECS
constexpr std::uint32_t AUCTION_SLOT_INTERVAL_DURATION
Rules controlling protocol behavior.
NotTEC invalidAMMAsset(Issue const &issue, std::optional< std::pair< Issue, Issue >> const &pair=std::nullopt)
constexpr std::uint16_t AUCTION_SLOT_MAX_AUTH_ACCOUNTS
Currency ammLPTCurrency(Currency const &cur1, Currency const &cur2)
Calculate Liquidity Provider Token (LPT) Currency.
Number feeMultHalf(std::uint16_t tfee)
Get fee multiplier (1 - tfee / 2) @tfee trading fee in basis points.
std::optional< std::uint8_t > ammAuctionTimeSlot(std::uint64_t current, STObject const &auctionSlot)
Get time slot of the auction slot.