ReturnCalculatorInterface

Computes the synthetic asset return based on the underlying asset’s return.

Different implementations can compute different return structures.

computeReturn(int256 oldPrice, int256 newPrice) → int256 assetReturn external

Computes the synthetic asset return when the underlying asset price changes from oldPrice to newPrice.

This can be implemented in many different ways, but a simple one would just be levering (or multiplying) the return by some fixed integer.

leverage() → int256 _leverage external

Gets the effective leverage for the return calculator.

If there is no sensible leverage value for a return calculator, this method should return 1.

© UMA Project 2018-2019