lowerBound
set to 0.3B and upperBound
set to 1.0B. The Linear LSP FPL is documented here. Briefly, "The contract will payout a scaled amount of collateral depending on where the settlement price lands within a price range between an upperBound
and a lowerBound
. If the settlement price is within the price range then the expiryPercentLong is defined by (expiryPrice - lowerBound) / (upperBound - lowerBound). This number represents the amount of collateral from the collateralPerPair that will be sent to the long and short side." For example, if the TVL is halfway between 0.3 and 1.0, i.e. 0.65B, then each WAGMIv0 would be worth 1.5 BOBA, and so forth.LongShortPairCreator
is the one that creates the LSP contract
through a script. Each new WAGMI token requires a new WAGMI LSP contract with new/altered parameters. In addition to the base contracts, there are three other contracts, the LongShortPair (LSP) contract and the associated Long
and Short
tokens:LongShortPair.create
. The create
function deposits collateral into the contract in exchange for an equal amount of long and short tokens based on the collateralPerPair parameter. The collateralPerPair parameter determines the amount of collateral that is required for each pair of long and short tokens. Note - the Long
tokens go to end users. The Short
tokens are retained so that unclaimed collateral (BOBA tokens) that will not be claimed by the users if the ratio is below 2. End-user WAGMI tokens are of type ExpandedIERC20
. ExpandedIERC20
are very similar to normal ERC20s, but have additional mint/burn functions such as burnFrom
. The Long
token is deployed at 0x8493C4d9Cd1a79be0523791E3331c78Abb3f9672.collateralPerPair
was set to 2 so that the maximum payout per KPI option is 2 BOBA if the Boba network TVL exceeds UpperTVLBound
. The WAGMIv0 settings are:networkServices.js
, account.js
, coinImage.js
, and tokenAction.js
. First, add the new WAGMI token to networkServices.js
: