IMarketQuoter
Overview
Section titled “Overview”Fee-aware, view-only quote surface that compiles market fees on top of IPricingCurve outputs.
IMarketQuoter
Section titled “IMarketQuoter”This interface is intentionally read-only and does not commit engine state or move tokens.Token-amount inputs are RawTokenQuantity — raw integer counts in the relevant token’s native decimals (no implicit rescaling).Discovery: the current market-actions implementation is also the quoter — resolve it via IAvmDirectoryViews.marketActionsImpl() and call these views directly at that address. Quote and execute logic ship in one artifact, so rotating the actions implementation upgrades both atomically and the quoted price cannot drift from the executed one across an upgrade.
Functions
Section titled “Functions”quoteBuyWithExactAvmTokensOut
Section titled “quoteBuyWithExactAvmTokensOut”function quoteBuyWithExactAvmTokensOut(address market, RawTokenQuantity avmTokensOut) returns (struct DataTypes.FeeAwareBuyExactAvmOutQuote) viewParameters
market—addressavmTokensOut— RawTokenQuantity
Returns
quoteBuyWithExactReserveTokensIn
Section titled “quoteBuyWithExactReserveTokensIn”function quoteBuyWithExactReserveTokensIn(address market, RawTokenQuantity grossReserveTokensIn) returns (struct DataTypes.FeeAwareBuyExactReserveInQuote) viewParameters
market—addressgrossReserveTokensIn— RawTokenQuantity
Returns
quoteExerciseOptionTokens
Section titled “quoteExerciseOptionTokens”Quote exercising optionTokensIn call options struck at the floor.
The fee prices the option premium (current_price - floor), so it is zero when the market sits at its floor; only the strike enters liquidity.
function quoteExerciseOptionTokens(address market, RawTokenQuantity optionTokensIn) returns (struct DataTypes.FeeAwareExerciseOptionQuote) viewParameters
market—addressoptionTokensIn— RawTokenQuantity
Returns
quoteRedeemAtFloorWithExactAvmTokensIn
Section titled “quoteRedeemAtFloorWithExactAvmTokensIn”Quote a floor redemption with exact AVM-token input.
function quoteRedeemAtFloorWithExactAvmTokensIn(address market, RawTokenQuantity avmTokensIn) returns (struct DataTypes.FeeAwareRedeemAtFloorExactAvmInQuote) viewParameters
market—addressavmTokensIn— RawTokenQuantity
Returns
quoteSellWithExactAvmTokensIn
Section titled “quoteSellWithExactAvmTokensIn”function quoteSellWithExactAvmTokensIn(address market, RawTokenQuantity avmTokensIn) returns (struct DataTypes.FeeAwareSellExactAvmInQuote) viewParameters
market—addressavmTokensIn— RawTokenQuantity
Returns
quoteSellWithExactReserveTokensOut
Section titled “quoteSellWithExactReserveTokensOut”Quote a sell whose reserve-token output is exact after fees.
function quoteSellWithExactReserveTokensOut(address market, RawTokenQuantity netReserveTokensOut) returns (struct DataTypes.FeeAwareSellExactReserveOutQuote) viewParameters
market—addressnetReserveTokensOut— RawTokenQuantity
Returns