Spread Calculation
The spread calculation contract is responsible for pricing risk expressed in the form of the spread. Contract is optimized for gas efficiency, and upgrades of the spread logic require the deployment of a new contract.
AMM appoints spread contact by executing "setMiltonSpreadModel" function.
All assets share the same spread calculation logic. Hence only one spread calculation model is used in V1 of the IPOR protocol. The spread model relies on sets of constants derived from quant modeling.
The spread calculation contracts require the state of Milton, Joseph, and IPOR Oracle passed in the function and can calculate the fair spread for a given swap. For more information about the logic behind that calculation, refer to the whitepaper on the spread and ABI description in the contracts code.
Last modified 9mo ago