Skip to content

IMarketViews

Read-only view surface for a single market proxy.

Implements ERC-165 so third parties can detect AVM markets.

function balances() returns (struct MarketBalances) view

Returns

function directory() returns (address) view

Returns

  • address

Current pricing engine resolved through the directory for marketKind().

function engine() returns (address) view

Returns

  • address

Opaque, engine-defined state for the current engine().

The encoding is private to the engine. Bytes returned here MUST NOT be passed to a different engine route unless that engine explicitly supports the same encoding.

function engineState() returns (bytes) view

Returns

  • bytes
function flags() returns (struct MarketFlags) view

Returns

function getPosition(address holder) returns (struct DataTypes.PersonalPosition) view

Parameters

  • holderaddress

Returns

function groupId() returns (GroupId) view

Returns

function marketId() returns (MarketId) view

Returns

function marketKind() returns (MarketKind) view

Returns

Net-issued supply: the portion of AVM supply issued along the trading curve, in raw token units.

Reverts with Errors.NegativeNetIssuedSupply if the offset exceeds total supply, which indicates corrupted accounting.

function netIssuedSupply() returns (RawTokenQuantity) view

Returns

function snapshot() returns (struct DataTypes.MarketStateSnapshot) view

Returns

State of the market, with no derived values.

function state() returns (struct MarketState) view

Returns

Signed count of AVM tokens (raw units) that exist off the trading curve: option exercises add to it, floor redemptions subtract.

Net-issued (curve) supply is totalSupply() - supplyOffset(); the market prices every trade at net-issued supply, never total supply.

function supplyOffset() returns (int256) view

Returns

  • int256

Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas.

function supportsInterface(bytes4 interfaceId) returns (bool) view

Parameters

  • interfaceIdbytes4

Returns

  • bool

Tenant that owns this market’s group.

Resolved dynamically through IAvmDirectoryViews.getMarketGroup. A group’s tenant is fixed at group creation, so this value is stable for the market’s lifetime.

function tenantId() returns (TenantId) view

Returns

function tokens() returns (struct TokenSet) view

Returns