Two ways to build a price
A Source Feed brings together liquidity for one pair. A Composite Feed brings together price feeds.
Source Feed: one asset pair
A Source Feed prices one pair, such as a token against USDC. Its configuration identifies the pools used to calculate that price.
Mimir calculates the price from pool accounts rather than accepting a price supplied by the caller. When combining sources, it uses a weighted median and limits the weight of each source.
Each pool must pass the feed's source checks. Understand liquidity sources →
Composite Feed: quantities of components
A composite adds price contributions. Each contribution is a component price multiplied by its configured quantity.
There is no automatic division by the number of components. One unit of three differently priced tokens does not mean a third of the value in each.
A composite can contain up to five components. Their source prices can use different quotes. Mimir brings their contributions into the composite's quote using the configured conversion feeds. For example, it multiplies an MRVL/SOL price by SOL/USDC before adding it to components already priced in USDC.
A stable definition, changing data
After finalization, a feed's identity and source bindings are fixed. Refreshing it updates its data, not its definition. A different source set or composition calls for a new feed, preserving the definition existing applications depend on.
That distinction is useful: applications can depend on a known definition while checking that its current data is still suitable.
Next: build the AI Chips example.