Price Oracle

Stacking Salmon uses the Stacking Salmon Price Oracle to reliably calculate the value of LP tokens and determine how much collateral is necessary for borrowing and leverage.

Stacking Salmon Price Oracle works with any BeraSwap-compatible token pair, commonly supported by DEXs. It calculates the time-weighted average price (TWAP) by using the pair’s built-in price accumulators, over a period of at least 1,200 seconds (20 minutes). This is accomplished using the pair’s current price and a previously-observed price (stored within the oracle’s contract) from at least 20 minutes prior.

More information on the Stacking Salmon Price Oracle and pricing LP tokens can be found on Medium.

Last updated