Peg Migration
Detailed description of a SILK peg migration.
In order to initialize the target basket composition of SILK for the minting contract, a computation must be performed based on a list of currencies, their current prices, their assigned weights, and the nominal starting price of SILK. This is done by computing the respective currency amounts in relation to their desired proportion of the target peg price.
P = (price of currency A, price of currency B...price of currency N)
W = (weight of currency A, weight of currency B...weight of currency N)
T = starting target peg

Compute starting currency amounts based on list of weights, prices, and desired target peg.

Compute each a(n) for their respective portion of T

Compute new target peg based on updated oracle information based on price changes of currencies. Price is what is constantly getting updated, thus shifting new target price (C).

CP = current price, W = updated list of weights via governance update. Recompute using same above formulas in "Initialization" section.
In the event that USD is not longer used in oracles, it is important that there is an ability to migrate the underlying reference currency that the code uses. The following is the underlying formula:

R is the new reference currency trading ratio with the outdated reference currency
Last modified 26d ago