diff --git a/cadence/contracts/mocks/FlowTransactionScheduler.cdc b/cadence/contracts/mocks/FlowTransactionScheduler.cdc index 642b938f..edebbfd2 100644 --- a/cadence/contracts/mocks/FlowTransactionScheduler.cdc +++ b/cadence/contracts/mocks/FlowTransactionScheduler.cdc @@ -1,3 +1,6 @@ +// This contract extends the original contract by adding a reset method, +// which is useful in tests for clearing any pre-existing scheduled transactions. +// https://github.com/onflow/flow-core-contracts/blob/master/contracts/FlowTransactionScheduler.cdc import "FungibleToken" import "FlowToken" import "FlowFees" diff --git a/cadence/tests/scripts/simulations/generate_fixture.py b/cadence/tests/scripts/simulations/generate_fixture.py index c851934f..b13d0106 100644 --- a/cadence/tests/scripts/simulations/generate_fixture.py +++ b/cadence/tests/scripts/simulations/generate_fixture.py @@ -147,7 +147,7 @@ def build_fixture(daily: list[dict], scenario: str, start: str, end: str) -> dic return { "scenario": scenario, "duration_days": len(daily), - "btc_prices": [d["price"] for d in daily], + "prices": [d["price"] for d in daily], "dates": [d["date"] for d in daily], "agents": [ { @@ -177,8 +177,8 @@ def build_fixture(daily: list[dict], scenario: str, start: str, end: str) -> dic }, }, "constants": { - "btc_collateral_factor": 0.8, - "btc_liquidation_threshold": 0.85, + "collateral_factor": 0.8, + "liquidation_threshold": 0.85, "yield_apr": 0.1, "direct_mint_yt": True, }, @@ -218,20 +218,18 @@ def cmd_fetch(args: argparse.Namespace) -> None: # --------------------------------------------------------------------------- -def generate_cdc(data: dict) -> str: - scenario = data["scenario"] - is_daily = "duration_days" in data +def _get_prices(data: dict) -> list: + """Get price array from fixture, supporting both 'prices' and legacy 'btc_prices' keys.""" + return data.get("prices") or data["btc_prices"] + + +def _get_constants(data: dict) -> dict: + """Get constants dict from fixture.""" + return data["constants"] - lines: list[str] = [] - lines.append("import Test") - lines.append("") - lines.append(f"// AUTO-GENERATED from {scenario}.json — do not edit manually") - lines.append( - "// Run: python3 generate_fixture.py generate " - ) - lines.append("") - # --- Inline struct definitions --- +def _emit_structs(lines: list[str]) -> None: + """Emit the shared struct definitions.""" lines.append("access(all) struct SimAgent {") lines.append(" access(all) let count: Int") lines.append(" access(all) let initialHF: UFix64") @@ -291,10 +289,59 @@ def generate_cdc(data: dict) -> str: lines.append("}") lines.append("") + +def _emit_agents(lines: list[str], prefix: str, agents: list[dict]) -> None: + """Emit a single agent array.""" + lines.append(f"access(all) let {prefix}_agents: [SimAgent] = [") + for i, agent in enumerate(agents): + comma = "," if i < len(agents) - 1 else "" + debt = agent["debt_per_agent"] if isinstance(agent["debt_per_agent"], (int, float)) else 0 + total_debt = agent.get("total_system_debt", 0) + lines.append(" SimAgent(") + lines.append(f" count: {agent['count']},") + lines.append(f" initialHF: {to_ufix64(agent['initial_hf'])},") + lines.append(f" rebalancingHF: {to_ufix64(agent['rebalancing_hf'])},") + lines.append(f" targetHF: {to_ufix64(agent['target_hf'])},") + lines.append(f" debtPerAgent: {to_ufix64(float(debt))},") + lines.append(f" totalSystemDebt: {to_ufix64(float(total_debt))}") + lines.append(f" ){comma}") + lines.append("]") + lines.append("") + + +def _emit_expected(lines: list[str], prefix: str, expected: dict) -> None: + """Emit expected outcome variables.""" + lines.append( + f"access(all) let {prefix}_expectedLiquidationCount: Int = {expected['liquidation_count']}" + ) + lines.append( + f"access(all) let {prefix}_expectedAllAgentsSurvive: Bool = {'true' if expected['all_agents_survive'] else 'false'}" + ) + lines.append("") + + +def generate_cdc(data: dict) -> str: + scenario = data["scenario"] + is_daily = "duration_days" in data + has_sub_scenarios = "scenarios" in data + prices = _get_prices(data) + constants = _get_constants(data) + + lines: list[str] = [] + lines.append("import Test") + lines.append("") + lines.append(f"// AUTO-GENERATED from {scenario}.json — do not edit manually") + lines.append( + "// Run: python3 generate_fixture.py generate " + ) + lines.append("") + + _emit_structs(lines) + # --- Price array --- lines.append(f"access(all) let {scenario}_prices: [UFix64] = [") - for i, price in enumerate(data["btc_prices"]): - comma = "," if i < len(data["btc_prices"]) - 1 else "" + for i, price in enumerate(prices): + comma = "," if i < len(prices) - 1 else "" lines.append(f" {to_ufix64(price)}{comma}") lines.append("]") lines.append("") @@ -308,25 +355,13 @@ def generate_cdc(data: dict) -> str: lines.append("]") lines.append("") - # --- Agent array --- - lines.append(f"access(all) let {scenario}_agents: [SimAgent] = [") - for i, agent in enumerate(data["agents"]): - comma = "," if i < len(data["agents"]) - 1 else "" - debt = ( - agent["debt_per_agent"] - if isinstance(agent["debt_per_agent"], (int, float)) - else 0 - ) - total_debt = agent.get("total_system_debt", 0) - lines.append(" SimAgent(") - lines.append(f" count: {agent['count']},") - lines.append(f" initialHF: {to_ufix64(agent['initial_hf'])},") - lines.append(f" rebalancingHF: {to_ufix64(agent['rebalancing_hf'])},") - lines.append(f" targetHF: {to_ufix64(agent['target_hf'])},") - lines.append(f" debtPerAgent: {to_ufix64(float(debt))},") - lines.append(f" totalSystemDebt: {to_ufix64(float(total_debt))}") - lines.append(f" ){comma}") - lines.append("]") + # --- Constants --- + lines.append(f"access(all) let {scenario}_constants: SimConstants = SimConstants(") + lines.append(f" btcCollateralFactor: {to_ufix64(constants['btc_collateral_factor'])},") + lines.append(f" btcLiquidationThreshold: {to_ufix64(constants['btc_liquidation_threshold'])},") + lines.append(f" yieldAPR: {to_ufix64(constants['yield_apr'])},") + lines.append(f" directMintYT: {'true' if constants['direct_mint_yt'] else 'false'}") + lines.append(")") lines.append("") # --- Pool dict --- @@ -342,39 +377,22 @@ def generate_cdc(data: dict) -> str: lines.append("}") lines.append("") - # --- Constants --- - c = data["constants"] - lines.append(f"access(all) let {scenario}_constants: SimConstants = SimConstants(") - lines.append(f" btcCollateralFactor: {to_ufix64(c['btc_collateral_factor'])},") - lines.append( - f" btcLiquidationThreshold: {to_ufix64(c['btc_liquidation_threshold'])}," - ) - lines.append(f" yieldAPR: {to_ufix64(c['yield_apr'])},") - lines.append(f" directMintYT: {'true' if c['direct_mint_yt'] else 'false'}") - lines.append(")") - lines.append("") - - # --- Expected outcomes --- - e = data["expected"] - lines.append( - f"access(all) let {scenario}_expectedLiquidationCount: Int = {e['liquidation_count']}" - ) - lines.append( - f"access(all) let {scenario}_expectedAllAgentsSurvive: Bool = {'true' if e['all_agents_survive'] else 'false'}" - ) + # --- Duration --- + if is_daily: + lines.append(f"access(all) let {scenario}_durationDays: Int = {data['duration_days']}") + elif "duration_minutes" in data: + lines.append(f"access(all) let {scenario}_durationMinutes: Int = {data['duration_minutes']}") lines.append("") - # --- Duration & notes --- - if is_daily: - lines.append( - f"access(all) let {scenario}_durationDays: Int = {data['duration_days']}" - ) + # --- Agents & expected outcomes --- + if has_sub_scenarios: + for sub in data["scenarios"]: + sub_prefix = f"{scenario}_{sub['name']}" + _emit_agents(lines, sub_prefix, sub["agents"]) + _emit_expected(lines, sub_prefix, sub["expected"]) else: - lines.append( - f"access(all) let {scenario}_durationMinutes: Int = {data['duration_minutes']}" - ) - lines.append(f'access(all) let {scenario}_notes: String = "{data["notes"]}"') - lines.append("") + _emit_agents(lines, scenario, data["agents"]) + _emit_expected(lines, scenario, data["expected"]) return "\n".join(lines) @@ -390,8 +408,8 @@ def cmd_generate(args: argparse.Namespace) -> None: f.write(cdc) scenario = data["scenario"] - n_prices = len(data["btc_prices"]) - print(f"Generated {args.output} ({n_prices} prices, scenario: {scenario})") + prices = _get_prices(data) + print(f"Generated {args.output} ({len(prices)} prices, scenario: {scenario})") # --------------------------------------------------------------------------- diff --git a/cadence/tests/simulation_flash_crash_severe.cdc b/cadence/tests/simulation_flash_crash_severe.cdc new file mode 100644 index 00000000..10321dab --- /dev/null +++ b/cadence/tests/simulation_flash_crash_severe.cdc @@ -0,0 +1,534 @@ +#test_fork(network: "mainnet-fork", height: 147316310) + +import Test +import BlockchainHelpers + +import "test_helpers.cdc" +import "evm_state_helpers.cdc" +import "simulation_flash_crash_severe_helpers.cdc" + +import "FlowYieldVaults" +import "FlowToken" +import "FlowYieldVaultsStrategiesV2" +import "FlowALPv0" +import "DeFiActions" + +// ============================================================================ +// CADENCE ACCOUNTS +// ============================================================================ + +access(all) let flowYieldVaultsAccount = Test.getAccount(0xb1d63873c3cc9f79) +access(all) let flowALPAccount = Test.getAccount(0x6b00ff876c299c61) +access(all) let bandOracleAccount = Test.getAccount(0x6801a6222ebf784a) +access(all) let whaleFlowAccount = Test.getAccount(0x92674150c9213fc9) +access(all) let coaOwnerAccount = Test.getAccount(0xe467b9dd11fa00df) + +// WBTC on Flow EVM +access(all) let WBTC_TOKEN_ID = "A.1e4aa0b87d10b141.EVMVMBridgedToken_717dae2baf7656be9a9b01dee31d571a9d4c9579.Vault" +access(all) let WBTC_TYPE = CompositeType(WBTC_TOKEN_ID)! + +access(all) var strategyIdentifier = Type<@FlowYieldVaultsStrategiesV2.FUSDEVStrategy>().identifier +access(all) var wbtcTokenIdentifier = WBTC_TOKEN_ID + +// ============================================================================ +// PROTOCOL ADDRESSES +// ============================================================================ + +access(all) let factoryAddress = "0xca6d7Bb03334bBf135902e1d919a5feccb461632" + +// ============================================================================ +// VAULT & TOKEN ADDRESSES +// ============================================================================ + +access(all) let morphoVaultAddress = "0xd069d989e2F44B70c65347d1853C0c67e10a9F8D" +access(all) let pyusd0Address = "0x99aF3EeA856556646C98c8B9b2548Fe815240750" +access(all) let wbtcAddress = "0x717dae2baf7656be9a9b01dee31d571a9d4c9579" + +// ============================================================================ +// STORAGE SLOT CONSTANTS +// ============================================================================ + +access(all) let pyusd0BalanceSlot = 1 as UInt256 +access(all) let fusdevBalanceSlot = 12 as UInt256 +access(all) let wbtcBalanceSlot = 5 as UInt256 + +access(all) let morphoVaultTotalSupplySlot = 11 as UInt256 +access(all) let morphoVaultTotalAssetsSlot = 15 as UInt256 + +// ============================================================================ +// SIMULATION TYPES +// ============================================================================ + +access(all) struct SimConfig { + access(all) let prices: [UFix64] + access(all) let tickIntervalSeconds: UFix64 + access(all) let numAgents: Int + access(all) let fundingPerAgent: UFix64 + access(all) let yieldAPR: UFix64 + access(all) let expectedLiquidationCount: Int + /// How often (in ticks) to attempt rebalancing. + /// 1 = rebalance every tick (default) + access(all) let rebalanceInterval: Int + /// Position health thresholds + access(all) let minHealth: UFix64 + access(all) let targetHealth: UFix64 + access(all) let maxHealth: UFix64 + /// Initial effective HF to coerce the position to at creation (matches Python initial_hf) + access(all) let initialHF: UFix64 + /// PYUSD0:YT pool TVL in USD + access(all) let ytPoolTVL: UFix64 + /// PYUSD0:YT pool concentration (0.95 = 95% of liquidity in concentrated range) + access(all) let ytPoolConcentration: UFix64 + + init( + prices: [UFix64], + tickIntervalSeconds: UFix64, + numAgents: Int, + fundingPerAgent: UFix64, + yieldAPR: UFix64, + expectedLiquidationCount: Int, + rebalanceInterval: Int, + minHealth: UFix64, + targetHealth: UFix64, + maxHealth: UFix64, + initialHF: UFix64, + ytPoolTVL: UFix64, + ytPoolConcentration: UFix64 + ) { + self.prices = prices + self.tickIntervalSeconds = tickIntervalSeconds + self.numAgents = numAgents + self.fundingPerAgent = fundingPerAgent + self.yieldAPR = yieldAPR + self.expectedLiquidationCount = expectedLiquidationCount + self.rebalanceInterval = rebalanceInterval + self.minHealth = minHealth + self.targetHealth = targetHealth + self.maxHealth = maxHealth + self.initialHF = initialHF + self.ytPoolTVL = ytPoolTVL + self.ytPoolConcentration = ytPoolConcentration + } +} + +access(all) struct SimResult { + access(all) let rebalanceCount: Int + access(all) let liquidationCount: Int + access(all) let lowestHF: UFix64 + access(all) let finalHF: UFix64 + access(all) let lowestPrice: UFix64 + access(all) let finalPrice: UFix64 + access(all) let finalCollateral: UFix64 + + init( + rebalanceCount: Int, + liquidationCount: Int, + lowestHF: UFix64, + finalHF: UFix64, + lowestPrice: UFix64, + finalPrice: UFix64, + finalCollateral: UFix64 + ) { + self.rebalanceCount = rebalanceCount + self.liquidationCount = liquidationCount + self.lowestHF = lowestHF + self.finalHF = finalHF + self.lowestPrice = lowestPrice + self.finalPrice = finalPrice + self.finalCollateral = finalCollateral + } +} + +// ============================================================================ +// SETUP +// ============================================================================ + +access(all) +fun setup() { + deployContractsForFork() + + // PYUSD0:morphoVault (routing pool) + setPoolToPrice( + factoryAddress: factoryAddress, + tokenAAddress: pyusd0Address, + tokenBAddress: morphoVaultAddress, + fee: 100, + priceTokenBPerTokenA: 1.0, + tokenABalanceSlot: pyusd0BalanceSlot, + tokenBBalanceSlot: fusdevBalanceSlot, + signer: coaOwnerAccount + ) + + // PYUSD0:morphoVault (yield token pool) — finite liquidity matching Python sim + let ytPool = simulation_flash_crash_severe_pools["moet_yt"]! + setPoolToPriceWithTVL( + factoryAddress: factoryAddress, + tokenAAddress: pyusd0Address, + tokenBAddress: morphoVaultAddress, + fee: 100, + priceTokenBPerTokenA: 1.0, + tokenABalanceSlot: pyusd0BalanceSlot, + tokenBBalanceSlot: fusdevBalanceSlot, + tvl: ytPool.size, + concentration: ytPool.concentration, + tokenBPriceUSD: 1.0, + signer: coaOwnerAccount + ) + + // PYUSD0:WBTC (collateral/liquidation pool) — finite liquidity matching Python sim + let btcPool = simulation_flash_crash_severe_pools["moet_btc"]! + let initialBtcPrice = simulation_flash_crash_severe_prices[0] + setPoolToPriceWithTVL( + factoryAddress: factoryAddress, + tokenAAddress: wbtcAddress, + tokenBAddress: pyusd0Address, + fee: 3000, + priceTokenBPerTokenA: UFix128(initialBtcPrice), + tokenABalanceSlot: wbtcBalanceSlot, + tokenBBalanceSlot: pyusd0BalanceSlot, + tvl: btcPool.size, + concentration: btcPool.concentration, + tokenBPriceUSD: 1.0, + signer: coaOwnerAccount + ) + + setBandOraclePrices(signer: bandOracleAccount, symbolPrices: { + "BTC": initialBtcPrice, + "USD": 1.0, + "PYUSD": 1.0 + }) + + let reserveAmount = 100_000_00.0 + transferFlow(signer: whaleFlowAccount, recipient: flowALPAccount.address, amount: reserveAmount) + seedPoolWithPYUSD0(poolSigner: flowALPAccount, amount: reserveAmount) + + transferFlow(signer: whaleFlowAccount, recipient: flowYieldVaultsAccount.address, amount: reserveAmount) + transferFlow(signer: whaleFlowAccount, recipient: coaOwnerAccount.address, amount: reserveAmount) +} + +// ============================================================================ +// HELPERS +// ============================================================================ + +access(all) fun getBTCCollateralFromPosition(pid: UInt64): UFix64 { + let positionDetails = getPositionDetails(pid: pid, beFailed: false) + for balance in positionDetails.balances { + if balance.vaultType == WBTC_TYPE { + if balance.direction == FlowALPv0.BalanceDirection.Credit { + return balance.balance + } + } + } + return 0.0 +} + +/// Compute deterministic YT (ERC4626 vault share) price at a given tick. +/// price = 1.0 + yieldAPR * (seconds / secondsPerYear) +access(all) fun ytPriceAtTick(_ tick: Int, tickIntervalSeconds: UFix64, yieldAPR: UFix64): UFix64 { + let secondsPerYear: UFix64 = 31536000.0 + let elapsedSeconds = UFix64(tick) * tickIntervalSeconds + return 1.0 + yieldAPR * (elapsedSeconds / secondsPerYear) +} + +/// Update oracle, collateral pool, and vault share price each tick. +access(all) fun applyPriceTick(btcPrice: UFix64, ytPrice: UFix64, signer: Test.TestAccount) { + setBandOraclePrices(signer: bandOracleAccount, symbolPrices: { + "BTC": btcPrice, + "USD": 1.0, + "PYUSD": 1.0 + }) + + // PYUSD0:WBTC pool — reset to new BTC price with finite liquidity + let btcPool = simulation_flash_crash_severe_pools["moet_btc"]! + setPoolToPriceWithTVL( + factoryAddress: factoryAddress, + tokenAAddress: wbtcAddress, + tokenBAddress: pyusd0Address, + fee: 3000, + priceTokenBPerTokenA: UFix128(btcPrice), + tokenABalanceSlot: wbtcBalanceSlot, + tokenBBalanceSlot: pyusd0BalanceSlot, + tvl: btcPool.size, + concentration: btcPool.concentration, + tokenBPriceUSD: 1.0, + signer: coaOwnerAccount + ) + + setVaultSharePrice( + vaultAddress: morphoVaultAddress, + assetAddress: pyusd0Address, + assetBalanceSlot: pyusd0BalanceSlot, + totalSupplySlot: morphoVaultTotalSupplySlot, + vaultTotalAssetsSlot: morphoVaultTotalAssetsSlot, + priceMultiplier: ytPrice, + signer: signer + ) +} + +/// Arb bot simulation: reset PYUSD0:FUSDEV pool to peg with finite TVL. +/// Called after all agents trade each tick. +access(all) fun resetYieldPoolToFiniteTVL(ytPrice: UFix64, tvl: UFix64, concentration: UFix64) { + setPoolToPriceWithTVL( + factoryAddress: factoryAddress, + tokenAAddress: pyusd0Address, + tokenBAddress: morphoVaultAddress, + fee: 100, + priceTokenBPerTokenA: UFix128(ytPrice), + tokenABalanceSlot: pyusd0BalanceSlot, + tokenBBalanceSlot: fusdevBalanceSlot, + tvl: tvl, + concentration: concentration, + tokenBPriceUSD: 1.0, + signer: coaOwnerAccount + ) +} + +// ============================================================================ +// SIMULATION RUNNER +// ============================================================================ + +access(all) fun runSimulation(config: SimConfig, label: String): SimResult { + let prices = config.prices + let initialPrice = prices[0] + + // Clear scheduled transactions inherited from forked mainnet state + resetTransactionScheduler() + + // Apply initial pricing + applyPriceTick(btcPrice: initialPrice, ytPrice: ytPriceAtTick(0, tickIntervalSeconds: config.tickIntervalSeconds, yieldAPR: config.yieldAPR), signer: coaOwnerAccount) + + // Create agents + let users: [Test.TestAccount] = [] + let pids: [UInt64] = [] + let vaultIds: [UInt64] = [] + + var i = 0 + while i < config.numAgents { + let user = Test.createAccount() + transferFlow(signer: whaleFlowAccount, recipient: user.address, amount: 10.0) + mintBTC(signer: user, amount: config.fundingPerAgent) + grantBeta(flowYieldVaultsAccount, user) + + setVaultSharePrice( + vaultAddress: morphoVaultAddress, + assetAddress: pyusd0Address, + assetBalanceSlot: pyusd0BalanceSlot, + totalSupplySlot: morphoVaultTotalSupplySlot, + vaultTotalAssetsSlot: morphoVaultTotalAssetsSlot, + priceMultiplier: 1.0, + signer: user + ) + + createYieldVault( + signer: user, + strategyIdentifier: strategyIdentifier, + vaultIdentifier: wbtcTokenIdentifier, + amount: config.fundingPerAgent, + beFailed: false + ) + + let pid = (getLastPositionOpenedEvent(Test.eventsOfType(Type())) as! FlowALPv0.Opened).pid + let yieldVaultIDs = getYieldVaultIDs(address: user.address)! + let vaultId = yieldVaultIDs[0] + + // Step 1: Coerce position to the desired initial HF. + setPositionHealth( + signer: flowALPAccount, + pid: pid, + minHealth: config.initialHF - 0.01, + targetHealth: config.initialHF, + maxHealth: config.initialHF + 0.01 + ) + rebalancePosition(signer: flowALPAccount, pid: pid, force: true, beFailed: false) + + // Step 2: Set the real health thresholds for the simulation. + setPositionHealth( + signer: flowALPAccount, + pid: pid, + minHealth: config.minHealth, + targetHealth: config.targetHealth, + maxHealth: config.maxHealth + ) + + users.append(user) + pids.append(pid) + vaultIds.append(vaultId) + + log(" Agent \(i): pid=\(pid) vaultId=\(vaultId)") + i = i + 1 + } + + log("\n=== SIMULATION: \(label) ===") + log("Agents: \(config.numAgents)") + log("Funding per agent: \(config.fundingPerAgent) BTC (~\(config.fundingPerAgent * initialPrice) PYUSD0)") + log("Tick interval: \(config.tickIntervalSeconds)s") + log("Price points: \(prices.length)") + log("Initial BTC price: $\(prices[0])") + log("Initial HF: \(config.initialHF)") + log("") + log("Rebalance Triggers:") + log(" HF (Position): triggers when HF < \(config.minHealth), rebalances to HF = \(config.targetHealth)") + log(" Liquidation: HF < 1.0 (on-chain effectiveCollateral/effectiveDebt)") + log("Notes: 25% BTC crash over 5 min, floor for 20 min, exponential recovery") + + var liquidationCount = 0 + var previousBTCPrice = initialPrice + var lowestPrice = initialPrice + var highestPrice = initialPrice + var lowestHF = 100.0 + var prevVaultRebalanceCount = 0 + var prevPositionRebalanceCount = 0 + + let startTimestamp = getCurrentBlockTimestamp() + + var step = 0 + while step < prices.length { + let absolutePrice = prices[step] + let ytPrice = ytPriceAtTick(step, tickIntervalSeconds: config.tickIntervalSeconds, yieldAPR: config.yieldAPR) + + if absolutePrice < lowestPrice { + lowestPrice = absolutePrice + } + if absolutePrice > highestPrice { + highestPrice = absolutePrice + } + + if absolutePrice == previousBTCPrice { + step = step + 1 + continue + } + + let expectedTimestamp = startTimestamp + UFix64(step) * config.tickIntervalSeconds + let currentTimestamp = getCurrentBlockTimestamp() + if expectedTimestamp > currentTimestamp { + Test.moveTime(by: Fix64(expectedTimestamp - currentTimestamp)) + } + + applyPriceTick(btcPrice: absolutePrice, ytPrice: ytPrice, signer: users[0]) + + // Check HF for ALL agents BEFORE rebalancing + var a = 0 + while a < config.numAgents { + let hf = UFix64(getPositionHealth(pid: pids[a], beFailed: false)) + if hf < lowestHF && hf > 0.0 { + lowestHF = hf + } + if hf < 1.0 && hf > 0.0 { + liquidationCount = liquidationCount + 1 + log(" *** LIQUIDATION agent=\(a) at t=\(step)! HF=\(hf) ***") + } + a = a + 1 + } + let preRebalanceHF = UFix64(getPositionHealth(pid: pids[0], beFailed: false)) + + // Rebalance agents sequentially — each swap moves pool price for next agent + if config.rebalanceInterval <= 1 || step % config.rebalanceInterval == 0 { + a = 0 + while a < config.numAgents { + rebalanceYieldVault(signer: flowYieldVaultsAccount, id: vaultIds[a], force: false, beFailed: false) + rebalancePosition(signer: flowALPAccount, pid: pids[a], force: false, beFailed: false) + a = a + 1 + } + + // Arb bot: reset PYUSD0:FUSDEV pool to peg with finite TVL + resetYieldPoolToFiniteTVL(ytPrice: ytPrice, tvl: config.ytPoolTVL, concentration: config.ytPoolConcentration) + } + + // Count actual rebalances that occurred this tick + let currentVaultRebalanceCount = Test.eventsOfType(Type()).length + let currentPositionRebalanceCount = Test.eventsOfType(Type()).length + let tickVaultRebalances = currentVaultRebalanceCount - prevVaultRebalanceCount + let tickPositionRebalances = currentPositionRebalanceCount - prevPositionRebalanceCount + prevVaultRebalanceCount = currentVaultRebalanceCount + prevPositionRebalanceCount = currentPositionRebalanceCount + + let postRebalanceHF = UFix64(getPositionHealth(pid: pids[0], beFailed: false)) + + // Log every tick with agent 0 pre->post HF + log(" [t=\(step)] price=$\(absolutePrice) yt=\(ytPrice) HF=\(preRebalanceHF)->\(postRebalanceHF) vaultRebalances=\(tickVaultRebalances) positionRebalances=\(tickPositionRebalances)") + + previousBTCPrice = absolutePrice + + step = step + 1 + } + + // Count actual rebalance events (not just attempts) + let vaultRebalanceCount = Test.eventsOfType(Type()).length + let positionRebalanceCount = Test.eventsOfType(Type()).length + + // Final state + let finalHF = UFix64(getPositionHealth(pid: pids[0], beFailed: false)) + let finalBTCCollateral = getBTCCollateralFromPosition(pid: pids[0]) + let finalDebt = getPYUSD0DebtFromPosition(pid: pids[0]) + let finalYieldTokens = getAutoBalancerBalance(id: vaultIds[0])! + let finalYtPrice = ytPriceAtTick(prices.length - 1, tickIntervalSeconds: config.tickIntervalSeconds, yieldAPR: config.yieldAPR) + let finalPrice = prices[prices.length - 1] + let collateralValuePYUSD0 = finalBTCCollateral * previousBTCPrice + let ytValuePYUSD0 = finalYieldTokens * finalYtPrice + + log("\n=== SIMULATION RESULTS ===") + log("Agents: \(config.numAgents)") + log("Rebalance attempts: \(prices.length * config.numAgents)") + log("Vault rebalances: \(vaultRebalanceCount)") + log("Position rebalances: \(positionRebalanceCount)") + log("Liquidation count: \(liquidationCount)") + log("") + log("--- Price ---") + log("Initial BTC price: $\(initialPrice)") + log("Lowest BTC price: $\(lowestPrice)") + log("Highest BTC price: $\(highestPrice)") + log("Final BTC price: $\(finalPrice)") + log("") + log("--- Position ---") + log("Initial HF: \(config.initialHF)") + log("Lowest HF observed: \(lowestHF)") + log("Final HF (agent 0): \(finalHF)") + log("Final collateral: \(finalBTCCollateral) BTC (value: \(collateralValuePYUSD0) PYUSD0)") + log("Final debt: \(finalDebt) PYUSD0") + log("Final yield tokens: \(finalYieldTokens) (value: \(ytValuePYUSD0) PYUSD0 @ yt=\(finalYtPrice))") + log("===========================\n") + + return SimResult( + rebalanceCount: positionRebalanceCount, + liquidationCount: liquidationCount, + lowestHF: lowestHF, + finalHF: finalHF, + lowestPrice: lowestPrice, + finalPrice: finalPrice, + finalCollateral: finalBTCCollateral + ) +} + +// ============================================================================ +// TEST +// ============================================================================ + +access(all) +fun test_FlashCrashSevere_ZeroLiquidations() { + let result = runSimulation( + config: SimConfig( + prices: simulation_flash_crash_severe_prices, + tickIntervalSeconds: 60.0, // 1 min per tick, matching Python sim + numAgents: 10, + fundingPerAgent: 1.0, + yieldAPR: simulation_flash_crash_severe_constants.yieldAPR, + expectedLiquidationCount: 0, + rebalanceInterval: 5, // every 5 ticks + minHealth: 1.05, + targetHealth: 1.08, + maxHealth: UFix64.max, // Python sim has no upper health bound + initialHF: 1.15, + ytPoolTVL: simulation_flash_crash_severe_pools["moet_yt"]!.size, + ytPoolConcentration: simulation_flash_crash_severe_pools["moet_yt"]!.concentration + ), + label: "FlashCrashSevere" + ) + + Test.assertEqual(0, result.liquidationCount) + Test.assert(result.finalHF > 1.0, message: "Expected final HF > 1.0 but got \(result.finalHF)") + Test.assert(result.lowestHF > 1.0, message: "Expected lowest HF > 1.0 but got \(result.lowestHF)") + // No liquidations means collateral should never decrease from initial funding + Test.assert(result.finalCollateral >= 1.0, message: "Expected collateral >= 1.0 BTC but got \(result.finalCollateral)") + + log("=== TEST PASSED: Zero liquidations under flash crash (severe) ===") +} diff --git a/cadence/tests/simulation_flash_crash_severe_helpers.cdc b/cadence/tests/simulation_flash_crash_severe_helpers.cdc new file mode 100644 index 00000000..96cb9a38 --- /dev/null +++ b/cadence/tests/simulation_flash_crash_severe_helpers.cdc @@ -0,0 +1,2979 @@ +import Test + +// AUTO-GENERATED from flash_crash_severe.json — do not edit manually +// Run: python3 generate_fixture.py generate + +access(all) struct SimAgent { + access(all) let count: Int + access(all) let initialHF: UFix64 + access(all) let rebalancingHF: UFix64 + access(all) let targetHF: UFix64 + access(all) let debtPerAgent: UFix64 + access(all) let totalSystemDebt: UFix64 + + init( + count: Int, + initialHF: UFix64, + rebalancingHF: UFix64, + targetHF: UFix64, + debtPerAgent: UFix64, + totalSystemDebt: UFix64 + ) { + self.count = count + self.initialHF = initialHF + self.rebalancingHF = rebalancingHF + self.targetHF = targetHF + self.debtPerAgent = debtPerAgent + self.totalSystemDebt = totalSystemDebt + } +} + +access(all) struct SimPool { + access(all) let size: UFix64 + access(all) let concentration: UFix64 + access(all) let feeTier: UFix64 + + init(size: UFix64, concentration: UFix64, feeTier: UFix64) { + self.size = size + self.concentration = concentration + self.feeTier = feeTier + } +} + +access(all) struct SimConstants { + access(all) let btcCollateralFactor: UFix64 + access(all) let btcLiquidationThreshold: UFix64 + access(all) let yieldAPR: UFix64 + access(all) let directMintYT: Bool + + init( + btcCollateralFactor: UFix64, + btcLiquidationThreshold: UFix64, + yieldAPR: UFix64, + directMintYT: Bool + ) { + self.btcCollateralFactor = btcCollateralFactor + self.btcLiquidationThreshold = btcLiquidationThreshold + self.yieldAPR = yieldAPR + self.directMintYT = directMintYT + } +} + +access(all) let flash_crash_severe_prices: [UFix64] = [ + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 100000.00000000, + 95000.00000000, + 90000.00000000, + 85000.00000000, + 80000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75000.00000000, + 75019.18000000, + 75038.35000000, + 75057.52000000, + 75076.69000000, + 75095.85000000, + 75115.00000000, + 75134.15000000, + 75153.30000000, + 75172.44000000, + 75191.57000000, + 75210.70000000, + 75229.83000000, + 75248.95000000, + 75268.06000000, + 75287.17000000, + 75306.28000000, + 75325.38000000, + 75344.47000000, + 75363.56000000, + 75382.65000000, + 75401.73000000, + 75420.81000000, + 75439.88000000, + 75458.94000000, + 75478.00000000, + 75497.06000000, + 75516.11000000, + 75535.16000000, + 75554.20000000, + 75573.23000000, + 75592.27000000, + 75611.29000000, + 75630.31000000, + 75649.33000000, + 75668.34000000, + 75687.35000000, + 75706.35000000, + 75725.35000000, + 75744.34000000, + 75763.33000000, + 75782.31000000, + 75801.28000000, + 75820.26000000, + 75839.22000000, + 75858.19000000, + 75877.14000000, + 75896.09000000, + 75915.04000000, + 75933.98000000, + 75952.92000000, + 75971.85000000, + 75990.78000000, + 76009.70000000, + 76028.62000000, + 76047.53000000, + 76066.44000000, + 76085.34000000, + 76104.24000000, + 76123.13000000, + 76142.02000000, + 76160.90000000, + 76179.78000000, + 76198.65000000, + 76217.52000000, + 76236.38000000, + 76255.24000000, + 76274.09000000, + 76292.94000000, + 76311.78000000, + 76330.62000000, + 76349.45000000, + 76368.28000000, + 76387.10000000, + 76405.92000000, + 76424.73000000, + 76443.54000000, + 76462.34000000, + 76481.14000000, + 76499.93000000, + 76518.72000000, + 76537.50000000, + 76556.28000000, + 76575.05000000, + 76593.82000000, + 76612.58000000, + 76631.34000000, + 76650.09000000, + 76668.84000000, + 76687.58000000, + 76706.32000000, + 76725.05000000, + 76743.78000000, + 76762.50000000, + 76781.22000000, + 76799.93000000, + 76818.64000000, + 76837.34000000, + 76856.04000000, + 76874.73000000, + 76893.42000000, + 76912.10000000, + 76930.78000000, + 76949.45000000, + 76968.11000000, + 76986.78000000, + 77005.43000000, + 77024.08000000, + 77042.73000000, + 77061.37000000, + 77080.01000000, + 77098.64000000, + 77117.27000000, + 77135.89000000, + 77154.51000000, + 77173.12000000, + 77191.72000000, + 77210.33000000, + 77228.92000000, + 77247.51000000, + 77266.10000000, + 77284.68000000, + 77303.26000000, + 77321.83000000, + 77340.39000000, + 77358.95000000, + 77377.51000000, + 77396.06000000, + 77414.61000000, + 77433.15000000, + 77451.68000000, + 77470.21000000, + 77488.74000000, + 77507.26000000, + 77525.77000000, + 77544.28000000, + 77562.79000000, + 77581.29000000, + 77599.78000000, + 77618.27000000, + 77636.76000000, + 77655.24000000, + 77673.71000000, + 77692.18000000, + 77710.64000000, + 77729.10000000, + 77747.56000000, + 77766.00000000, + 77784.45000000, + 77802.89000000, + 77821.32000000, + 77839.75000000, + 77858.17000000, + 77876.59000000, + 77895.00000000, + 77913.41000000, + 77931.82000000, + 77950.21000000, + 77968.61000000, + 77986.99000000, + 78005.38000000, + 78023.75000000, + 78042.13000000, + 78060.49000000, + 78078.85000000, + 78097.21000000, + 78115.56000000, + 78133.91000000, + 78152.25000000, + 78170.59000000, + 78188.92000000, + 78207.24000000, + 78225.57000000, + 78243.88000000, + 78262.19000000, + 78280.50000000, + 78298.80000000, + 78317.09000000, + 78335.38000000, + 78353.67000000, + 78371.95000000, + 78390.22000000, + 78408.49000000, + 78426.76000000, + 78445.02000000, + 78463.27000000, + 78481.52000000, + 78499.76000000, + 78518.00000000, + 78536.23000000, + 78554.46000000, + 78572.69000000, + 78590.90000000, + 78609.12000000, + 78627.32000000, + 78645.53000000, + 78663.72000000, + 78681.92000000, + 78700.10000000, + 78718.28000000, + 78736.46000000, + 78754.63000000, + 78772.80000000, + 78790.96000000, + 78809.12000000, + 78827.27000000, + 78845.41000000, + 78863.55000000, + 78881.69000000, + 78899.82000000, + 78917.94000000, + 78936.06000000, + 78954.18000000, + 78972.28000000, + 78990.39000000, + 79008.49000000, + 79026.58000000, + 79044.67000000, + 79062.75000000, + 79080.83000000, + 79098.90000000, + 79116.97000000, + 79135.03000000, + 79153.09000000, + 79171.14000000, + 79189.19000000, + 79207.23000000, + 79225.27000000, + 79243.30000000, + 79261.32000000, + 79279.34000000, + 79297.36000000, + 79315.37000000, + 79333.37000000, + 79351.37000000, + 79369.37000000, + 79387.36000000, + 79405.34000000, + 79423.32000000, + 79441.29000000, + 79459.26000000, + 79477.22000000, + 79495.18000000, + 79513.13000000, + 79531.08000000, + 79549.02000000, + 79566.96000000, + 79584.89000000, + 79602.82000000, + 79620.74000000, + 79638.66000000, + 79656.57000000, + 79674.47000000, + 79692.37000000, + 79710.27000000, + 79728.16000000, + 79746.04000000, + 79763.92000000, + 79781.79000000, + 79799.66000000, + 79817.53000000, + 79835.38000000, + 79853.24000000, + 79871.08000000, + 79888.93000000, + 79906.76000000, + 79924.59000000, + 79942.42000000, + 79960.24000000, + 79978.06000000, + 79995.87000000, + 80013.67000000, + 80031.47000000, + 80049.27000000, + 80067.06000000, + 80084.84000000, + 80102.62000000, + 80120.39000000, + 80138.16000000, + 80155.92000000, + 80173.68000000, + 80191.43000000, + 80209.18000000, + 80226.92000000, + 80244.66000000, + 80262.39000000, + 80280.12000000, + 80297.84000000, + 80315.55000000, + 80333.26000000, + 80350.97000000, + 80368.66000000, + 80386.36000000, + 80404.05000000, + 80421.73000000, + 80439.41000000, + 80457.08000000, + 80474.75000000, + 80492.41000000, + 80510.07000000, + 80527.72000000, + 80545.36000000, + 80563.00000000, + 80580.64000000, + 80598.27000000, + 80615.89000000, + 80633.51000000, + 80651.13000000, + 80668.74000000, + 80686.34000000, + 80703.94000000, + 80721.53000000, + 80739.12000000, + 80756.70000000, + 80774.27000000, + 80791.85000000, + 80809.41000000, + 80826.97000000, + 80844.53000000, + 80862.08000000, + 80879.62000000, + 80897.16000000, + 80914.69000000, + 80932.22000000, + 80949.74000000, + 80967.26000000, + 80984.77000000, + 81002.28000000, + 81019.78000000, + 81037.28000000, + 81054.77000000, + 81072.25000000, + 81089.73000000, + 81107.21000000, + 81124.68000000, + 81142.14000000, + 81159.60000000, + 81177.05000000, + 81194.50000000, + 81211.94000000, + 81229.38000000, + 81246.81000000, + 81264.24000000, + 81281.66000000, + 81299.07000000, + 81316.48000000, + 81333.89000000, + 81351.28000000, + 81368.68000000, + 81386.07000000, + 81403.45000000, + 81420.83000000, + 81438.20000000, + 81455.56000000, + 81472.92000000, + 81490.28000000, + 81507.63000000, + 81524.98000000, + 81542.31000000, + 81559.65000000, + 81576.98000000, + 81594.30000000, + 81611.62000000, + 81628.93000000, + 81646.24000000, + 81663.54000000, + 81680.83000000, + 81698.12000000, + 81715.41000000, + 81732.69000000, + 81749.96000000, + 81767.23000000, + 81784.49000000, + 81801.75000000, + 81819.00000000, + 81836.25000000, + 81853.49000000, + 81870.73000000, + 81887.96000000, + 81905.18000000, + 81922.40000000, + 81939.62000000, + 81956.83000000, + 81974.03000000, + 81991.23000000, + 82008.42000000, + 82025.60000000, + 82042.79000000, + 82059.96000000, + 82077.13000000, + 82094.30000000, + 82111.46000000, + 82128.61000000, + 82145.76000000, + 82162.90000000, + 82180.04000000, + 82197.17000000, + 82214.30000000, + 82231.42000000, + 82248.53000000, + 82265.64000000, + 82282.75000000, + 82299.85000000, + 82316.94000000, + 82334.03000000, + 82351.11000000, + 82368.19000000, + 82385.26000000, + 82402.32000000, + 82419.38000000, + 82436.44000000, + 82453.49000000, + 82470.53000000, + 82487.57000000, + 82504.60000000, + 82521.63000000, + 82538.65000000, + 82555.67000000, + 82572.68000000, + 82589.68000000, + 82606.68000000, + 82623.68000000, + 82640.66000000, + 82657.65000000, + 82674.62000000, + 82691.60000000, + 82708.56000000, + 82725.52000000, + 82742.48000000, + 82759.43000000, + 82776.37000000, + 82793.31000000, + 82810.24000000, + 82827.17000000, + 82844.09000000, + 82861.01000000, + 82877.92000000, + 82894.82000000, + 82911.72000000, + 82928.62000000, + 82945.51000000, + 82962.39000000, + 82979.27000000, + 82996.14000000, + 83013.00000000, + 83029.87000000, + 83046.72000000, + 83063.57000000, + 83080.41000000, + 83097.25000000, + 83114.08000000, + 83130.91000000, + 83147.73000000, + 83164.55000000, + 83181.36000000, + 83198.16000000, + 83214.96000000, + 83231.76000000, + 83248.54000000, + 83265.33000000, + 83282.10000000, + 83298.87000000, + 83315.64000000, + 83332.40000000, + 83349.15000000, + 83365.90000000, + 83382.64000000, + 83399.38000000, + 83416.11000000, + 83432.84000000, + 83449.56000000, + 83466.27000000, + 83482.98000000, + 83499.69000000, + 83516.39000000, + 83533.08000000, + 83549.76000000, + 83566.45000000, + 83583.12000000, + 83599.79000000, + 83616.45000000, + 83633.11000000, + 83649.77000000, + 83666.41000000, + 83683.05000000, + 83699.69000000, + 83716.32000000, + 83732.94000000, + 83749.56000000, + 83766.18000000, + 83782.78000000, + 83799.39000000, + 83815.98000000, + 83832.57000000, + 83849.16000000, + 83865.74000000, + 83882.31000000, + 83898.88000000, + 83915.44000000, + 83932.00000000, + 83948.55000000, + 83965.09000000, + 83981.63000000, + 83998.16000000, + 84014.69000000, + 84031.22000000, + 84047.73000000, + 84064.24000000, + 84080.75000000, + 84097.25000000, + 84113.74000000, + 84130.23000000, + 84146.71000000, + 84163.19000000, + 84179.66000000, + 84196.12000000, + 84212.58000000, + 84229.04000000, + 84245.49000000, + 84261.93000000, + 84278.36000000, + 84294.80000000, + 84311.22000000, + 84327.64000000, + 84344.05000000, + 84360.46000000, + 84376.86000000, + 84393.26000000, + 84409.65000000, + 84426.04000000, + 84442.42000000, + 84458.79000000, + 84475.16000000, + 84491.52000000, + 84507.88000000, + 84524.23000000, + 84540.57000000, + 84556.91000000, + 84573.24000000, + 84589.57000000, + 84605.89000000, + 84622.21000000, + 84638.52000000, + 84654.82000000, + 84671.12000000, + 84687.41000000, + 84703.70000000, + 84719.98000000, + 84736.26000000, + 84752.53000000, + 84768.79000000, + 84785.05000000, + 84801.30000000, + 84817.55000000, + 84833.79000000, + 84850.02000000, + 84866.25000000, + 84882.48000000, + 84898.70000000, + 84914.91000000, + 84931.11000000, + 84947.31000000, + 84963.51000000, + 84979.70000000, + 84995.88000000, + 85012.06000000, + 85028.23000000, + 85044.39000000, + 85060.55000000, + 85076.71000000, + 85092.85000000, + 85109.00000000, + 85125.13000000, + 85141.26000000, + 85157.39000000, + 85173.50000000, + 85189.62000000, + 85205.72000000, + 85221.83000000, + 85237.92000000, + 85254.01000000, + 85270.09000000, + 85286.17000000, + 85302.24000000, + 85318.31000000, + 85334.37000000, + 85350.42000000, + 85366.47000000, + 85382.52000000, + 85398.55000000, + 85414.58000000, + 85430.61000000, + 85446.63000000, + 85462.64000000, + 85478.65000000, + 85494.65000000, + 85510.65000000, + 85526.63000000, + 85542.62000000, + 85558.60000000, + 85574.57000000, + 85590.53000000, + 85606.50000000, + 85622.45000000, + 85638.40000000, + 85654.34000000, + 85670.28000000, + 85686.21000000, + 85702.13000000, + 85718.05000000, + 85733.96000000, + 85749.87000000, + 85765.77000000, + 85781.67000000, + 85797.56000000, + 85813.44000000, + 85829.32000000, + 85845.19000000, + 85861.06000000, + 85876.92000000, + 85892.77000000, + 85908.62000000, + 85924.46000000, + 85940.30000000, + 85956.13000000, + 85971.95000000, + 85987.77000000, + 86003.58000000, + 86019.39000000, + 86035.19000000, + 86050.98000000, + 86066.77000000, + 86082.55000000, + 86098.33000000, + 86114.10000000, + 86129.86000000, + 86145.62000000, + 86161.37000000, + 86177.12000000, + 86192.86000000, + 86208.60000000, + 86224.32000000, + 86240.05000000, + 86255.76000000, + 86271.47000000, + 86287.18000000, + 86302.88000000, + 86318.57000000, + 86334.26000000, + 86349.94000000, + 86365.61000000, + 86381.28000000, + 86396.94000000, + 86412.60000000, + 86428.25000000, + 86443.90000000, + 86459.53000000, + 86475.17000000, + 86490.79000000, + 86506.41000000, + 86522.03000000, + 86537.64000000, + 86553.24000000, + 86568.84000000, + 86584.43000000, + 86600.01000000, + 86615.59000000, + 86631.16000000, + 86646.73000000, + 86662.29000000, + 86677.84000000, + 86693.39000000, + 86708.93000000, + 86724.47000000, + 86740.00000000, + 86755.52000000, + 86771.04000000, + 86786.55000000, + 86802.06000000, + 86817.56000000, + 86833.05000000, + 86848.54000000, + 86864.02000000, + 86879.50000000, + 86894.96000000, + 86910.43000000, + 86925.89000000, + 86941.34000000, + 86956.78000000, + 86972.22000000, + 86987.65000000, + 87003.08000000, + 87018.50000000, + 87033.91000000, + 87049.32000000, + 87064.72000000, + 87080.12000000, + 87095.51000000, + 87110.89000000, + 87126.27000000, + 87141.64000000, + 87157.01000000, + 87172.37000000, + 87187.72000000, + 87203.07000000, + 87218.41000000, + 87233.74000000, + 87249.07000000, + 87264.40000000, + 87279.71000000, + 87295.02000000, + 87310.33000000, + 87325.62000000, + 87340.92000000, + 87356.20000000, + 87371.48000000, + 87386.76000000, + 87402.02000000, + 87417.28000000, + 87432.54000000, + 87447.79000000, + 87463.03000000, + 87478.27000000, + 87493.50000000, + 87508.72000000, + 87523.94000000, + 87539.15000000, + 87554.35000000, + 87569.55000000, + 87584.75000000, + 87599.93000000, + 87615.11000000, + 87630.29000000, + 87645.46000000, + 87660.62000000, + 87675.78000000, + 87690.92000000, + 87706.07000000, + 87721.21000000, + 87736.34000000, + 87751.46000000, + 87766.58000000, + 87781.69000000, + 87796.80000000, + 87811.90000000, + 87826.99000000, + 87842.08000000, + 87857.16000000, + 87872.24000000, + 87887.30000000, + 87902.37000000, + 87917.42000000, + 87932.47000000, + 87947.52000000, + 87962.55000000, + 87977.58000000, + 87992.61000000, + 88007.63000000, + 88022.64000000, + 88037.65000000, + 88052.65000000, + 88067.64000000, + 88082.63000000, + 88097.61000000, + 88112.58000000, + 88127.55000000, + 88142.51000000, + 88157.47000000, + 88172.42000000, + 88187.36000000, + 88202.30000000, + 88217.23000000, + 88232.15000000, + 88247.07000000, + 88261.98000000, + 88276.89000000, + 88291.79000000, + 88306.68000000, + 88321.57000000, + 88336.45000000, + 88351.32000000, + 88366.19000000, + 88381.05000000, + 88395.90000000, + 88410.75000000, + 88425.60000000, + 88440.43000000, + 88455.26000000, + 88470.08000000, + 88484.90000000, + 88499.71000000, + 88514.52000000, + 88529.31000000, + 88544.10000000, + 88558.89000000, + 88573.67000000, + 88588.44000000, + 88603.21000000, + 88617.97000000, + 88632.72000000, + 88647.47000000, + 88662.21000000, + 88676.94000000, + 88691.67000000, + 88706.39000000, + 88721.10000000, + 88735.81000000, + 88750.51000000, + 88765.21000000, + 88779.90000000, + 88794.58000000, + 88809.26000000, + 88823.93000000, + 88838.59000000, + 88853.25000000, + 88867.90000000, + 88882.54000000, + 88897.18000000, + 88911.81000000, + 88926.44000000, + 88941.06000000, + 88955.67000000, + 88970.27000000, + 88984.87000000, + 88999.47000000, + 89014.05000000, + 89028.63000000, + 89043.21000000, + 89057.77000000, + 89072.33000000, + 89086.89000000, + 89101.43000000, + 89115.98000000, + 89130.51000000, + 89145.04000000, + 89159.56000000, + 89174.08000000, + 89188.58000000, + 89203.09000000, + 89217.58000000, + 89232.07000000, + 89246.55000000, + 89261.03000000, + 89275.50000000, + 89289.96000000, + 89304.42000000, + 89318.87000000, + 89333.31000000, + 89347.75000000, + 89362.18000000, + 89376.61000000, + 89391.02000000, + 89405.43000000, + 89419.84000000, + 89434.24000000, + 89448.63000000, + 89463.01000000, + 89477.39000000, + 89491.76000000, + 89506.13000000, + 89520.49000000, + 89534.84000000, + 89549.19000000, + 89563.53000000, + 89577.86000000, + 89592.18000000, + 89606.50000000, + 89620.82000000, + 89635.12000000, + 89649.42000000, + 89663.72000000, + 89678.00000000, + 89692.28000000, + 89706.55000000, + 89720.82000000, + 89735.08000000, + 89749.34000000, + 89763.58000000, + 89777.82000000, + 89792.06000000, + 89806.28000000, + 89820.50000000, + 89834.72000000, + 89848.92000000, + 89863.13000000, + 89877.32000000, + 89891.51000000, + 89905.69000000, + 89919.86000000, + 89934.03000000, + 89948.19000000, + 89962.34000000, + 89976.49000000, + 89990.63000000, + 90004.77000000, + 90018.89000000, + 90033.01000000, + 90047.13000000, + 90061.24000000, + 90075.34000000, + 90089.43000000, + 90103.52000000, + 90117.60000000, + 90131.67000000, + 90145.74000000, + 90159.80000000, + 90173.86000000, + 90187.90000000, + 90201.94000000, + 90215.98000000, + 90230.01000000, + 90244.03000000, + 90258.04000000, + 90272.05000000, + 90286.05000000, + 90300.04000000, + 90314.03000000, + 90328.01000000, + 90341.98000000, + 90355.95000000, + 90369.91000000, + 90383.86000000, + 90397.81000000, + 90411.75000000, + 90425.68000000, + 90439.61000000, + 90453.53000000, + 90467.44000000, + 90481.35000000, + 90495.25000000, + 90509.14000000, + 90523.02000000, + 90536.90000000, + 90550.77000000, + 90564.64000000, + 90578.50000000, + 90592.35000000, + 90606.20000000, + 90620.03000000, + 90633.86000000, + 90647.69000000, + 90661.51000000, + 90675.32000000, + 90689.12000000, + 90702.92000000, + 90716.71000000, + 90730.49000000, + 90744.27000000, + 90758.04000000, + 90771.80000000, + 90785.56000000, + 90799.31000000, + 90813.05000000, + 90826.79000000, + 90840.52000000, + 90854.24000000, + 90867.95000000, + 90881.66000000, + 90895.36000000, + 90909.06000000, + 90922.75000000, + 90936.43000000, + 90950.10000000, + 90963.77000000, + 90977.43000000, + 90991.08000000, + 91004.73000000, + 91018.37000000, + 91032.00000000, + 91045.63000000, + 91059.24000000, + 91072.86000000, + 91086.46000000, + 91100.06000000, + 91113.65000000, + 91127.23000000, + 91140.81000000, + 91154.38000000, + 91167.95000000, + 91181.50000000, + 91195.05000000, + 91208.59000000, + 91222.13000000, + 91235.66000000, + 91249.18000000, + 91262.70000000, + 91276.20000000, + 91289.70000000, + 91303.20000000, + 91316.69000000, + 91330.16000000, + 91343.64000000, + 91357.10000000, + 91370.56000000, + 91384.01000000, + 91397.46000000, + 91410.90000000, + 91424.33000000, + 91437.75000000, + 91451.17000000, + 91464.58000000, + 91477.98000000, + 91491.38000000, + 91504.77000000, + 91518.15000000, + 91531.52000000, + 91544.89000000, + 91558.25000000, + 91571.61000000, + 91584.95000000, + 91598.29000000, + 91611.62000000, + 91624.95000000, + 91638.27000000, + 91651.58000000, + 91664.88000000, + 91678.18000000, + 91691.47000000, + 91704.75000000, + 91718.03000000, + 91731.30000000, + 91744.56000000, + 91757.82000000, + 91771.06000000, + 91784.30000000, + 91797.54000000, + 91810.76000000, + 91823.98000000, + 91837.19000000, + 91850.40000000, + 91863.60000000, + 91876.79000000, + 91889.97000000, + 91903.15000000, + 91916.32000000, + 91929.48000000, + 91942.63000000, + 91955.78000000, + 91968.92000000, + 91982.05000000, + 91995.18000000, + 92008.30000000, + 92021.41000000, + 92034.52000000, + 92047.61000000, + 92060.70000000, + 92073.79000000, + 92086.86000000, + 92099.93000000, + 92112.99000000, + 92126.05000000, + 92139.10000000, + 92152.14000000, + 92165.17000000, + 92178.19000000, + 92191.21000000, + 92204.22000000, + 92217.23000000, + 92230.22000000, + 92243.21000000, + 92256.19000000, + 92269.17000000, + 92282.14000000, + 92295.10000000, + 92308.05000000, + 92321.00000000, + 92333.93000000, + 92346.87000000, + 92359.79000000, + 92372.71000000, + 92385.62000000, + 92398.52000000, + 92411.41000000, + 92424.30000000, + 92437.18000000, + 92450.05000000, + 92462.92000000, + 92475.78000000, + 92488.63000000, + 92501.47000000, + 92514.31000000, + 92527.14000000, + 92539.96000000, + 92552.77000000, + 92565.58000000, + 92578.38000000, + 92591.17000000, + 92603.96000000, + 92616.73000000, + 92629.50000000, + 92642.27000000, + 92655.02000000, + 92667.77000000, + 92680.51000000, + 92693.24000000, + 92705.97000000, + 92718.69000000, + 92731.40000000, + 92744.10000000, + 92756.80000000, + 92769.49000000, + 92782.17000000, + 92794.84000000, + 92807.51000000, + 92820.17000000, + 92832.82000000, + 92845.47000000, + 92858.10000000, + 92870.73000000, + 92883.35000000, + 92895.97000000, + 92908.57000000, + 92921.17000000, + 92933.77000000, + 92946.35000000, + 92958.93000000, + 92971.50000000, + 92984.06000000, + 92996.61000000, + 93009.16000000, + 93021.70000000, + 93034.23000000, + 93046.76000000, + 93059.27000000, + 93071.78000000, + 93084.29000000, + 93096.78000000, + 93109.27000000, + 93121.75000000, + 93134.22000000, + 93146.68000000, + 93159.14000000, + 93171.59000000, + 93184.03000000, + 93196.47000000, + 93208.89000000, + 93221.31000000, + 93233.72000000, + 93246.13000000, + 93258.52000000, + 93270.91000000, + 93283.29000000, + 93295.67000000, + 93308.03000000, + 93320.39000000, + 93332.74000000, + 93345.08000000, + 93357.42000000, + 93369.75000000, + 93382.07000000, + 93394.38000000, + 93406.68000000, + 93418.98000000, + 93431.27000000, + 93443.55000000, + 93455.83000000, + 93468.09000000, + 93480.35000000, + 93492.60000000, + 93504.85000000, + 93517.08000000, + 93529.31000000, + 93541.53000000, + 93553.74000000, + 93565.95000000, + 93578.14000000, + 93590.33000000, + 93602.52000000, + 93614.69000000, + 93626.86000000, + 93639.02000000, + 93651.17000000, + 93663.31000000, + 93675.44000000, + 93687.57000000, + 93699.69000000, + 93711.80000000, + 93723.91000000, + 93736.01000000, + 93748.09000000, + 93760.17000000, + 93772.25000000, + 93784.31000000, + 93796.37000000, + 93808.42000000, + 93820.46000000, + 93832.50000000, + 93844.52000000, + 93856.54000000, + 93868.55000000, + 93880.56000000, + 93892.55000000, + 93904.54000000, + 93916.52000000, + 93928.49000000, + 93940.45000000, + 93952.41000000, + 93964.36000000, + 93976.30000000, + 93988.23000000, + 94000.15000000, + 94012.07000000, + 94023.98000000, + 94035.88000000, + 94047.77000000, + 94059.65000000, + 94071.53000000, + 94083.40000000, + 94095.26000000, + 94107.11000000, + 94118.96000000, + 94130.80000000, + 94142.62000000, + 94154.45000000, + 94166.26000000, + 94178.06000000, + 94189.86000000, + 94201.65000000, + 94213.43000000, + 94225.20000000, + 94236.97000000, + 94248.73000000, + 94260.48000000, + 94272.22000000, + 94283.95000000, + 94295.68000000, + 94307.39000000, + 94319.10000000, + 94330.80000000, + 94342.50000000, + 94354.18000000, + 94365.86000000, + 94377.53000000, + 94389.19000000, + 94400.84000000, + 94412.49000000, + 94424.12000000, + 94435.75000000, + 94447.37000000, + 94458.98000000, + 94470.59000000, + 94482.18000000, + 94493.77000000, + 94505.35000000, + 94516.92000000, + 94528.49000000, + 94540.04000000, + 94551.59000000, + 94563.13000000, + 94574.66000000, + 94586.18000000, + 94597.70000000, + 94609.20000000, + 94620.70000000, + 94632.19000000, + 94643.67000000, + 94655.15000000, + 94666.61000000, + 94678.07000000, + 94689.52000000, + 94700.96000000, + 94712.39000000, + 94723.82000000, + 94735.23000000, + 94746.64000000, + 94758.04000000, + 94769.43000000, + 94780.82000000, + 94792.19000000, + 94803.56000000, + 94814.92000000, + 94826.27000000, + 94837.61000000, + 94848.94000000, + 94860.27000000, + 94871.58000000, + 94882.89000000, + 94894.19000000, + 94905.48000000, + 94916.77000000, + 94928.04000000, + 94939.31000000, + 94950.57000000, + 94961.82000000, + 94973.06000000, + 94984.29000000, + 94995.52000000, + 95006.74000000, + 95017.94000000, + 95029.14000000, + 95040.34000000, + 95051.52000000, + 95062.69000000, + 95073.86000000, + 95085.02000000, + 95096.17000000, + 95107.31000000, + 95118.44000000, + 95129.56000000, + 95140.68000000, + 95151.79000000, + 95162.88000000, + 95173.97000000, + 95185.06000000, + 95196.13000000, + 95207.19000000, + 95218.25000000, + 95229.30000000, + 95240.34000000, + 95251.37000000, + 95262.39000000, + 95273.40000000, + 95284.41000000, + 95295.40000000, + 95306.39000000, + 95317.37000000, + 95328.34000000, + 95339.30000000, + 95350.26000000, + 95361.20000000, + 95372.14000000, + 95383.07000000, + 95393.98000000, + 95404.89000000, + 95415.80000000, + 95426.69000000, + 95437.57000000, + 95448.45000000, + 95459.32000000, + 95470.18000000, + 95481.03000000, + 95491.87000000, + 95502.70000000, + 95513.52000000, + 95524.34000000, + 95535.14000000, + 95545.94000000, + 95556.73000000, + 95567.51000000, + 95578.28000000, + 95589.05000000, + 95599.80000000, + 95610.55000000, + 95621.28000000, + 95632.01000000, + 95642.73000000, + 95653.44000000, + 95664.14000000, + 95674.83000000, + 95685.52000000, + 95696.19000000, + 95706.86000000, + 95717.52000000, + 95728.16000000, + 95738.80000000, + 95749.43000000, + 95760.06000000, + 95770.67000000, + 95781.27000000, + 95791.87000000, + 95802.46000000, + 95813.03000000, + 95823.60000000, + 95834.16000000, + 95844.71000000, + 95855.25000000, + 95865.79000000, + 95876.31000000, + 95886.83000000, + 95897.33000000, + 95907.83000000, + 95918.32000000, + 95928.80000000, + 95939.27000000, + 95949.73000000, + 95960.18000000, + 95970.62000000, + 95981.06000000, + 95991.48000000, + 96001.90000000, + 96012.31000000, + 96022.71000000, + 96033.10000000, + 96043.48000000, + 96053.85000000, + 96064.21000000, + 96074.56000000, + 96084.90000000, + 96095.24000000, + 96105.56000000, + 96115.88000000, + 96126.19000000, + 96136.49000000, + 96146.78000000, + 96157.06000000, + 96167.33000000, + 96177.59000000, + 96187.84000000, + 96198.08000000, + 96208.32000000, + 96218.54000000, + 96228.76000000, + 96238.96000000, + 96249.16000000, + 96259.35000000, + 96269.53000000, + 96279.70000000, + 96289.86000000, + 96300.01000000, + 96310.15000000, + 96320.28000000, + 96330.40000000, + 96340.52000000, + 96350.62000000, + 96360.72000000, + 96370.80000000, + 96380.88000000, + 96390.95000000, + 96401.00000000, + 96411.05000000, + 96421.09000000, + 96431.12000000, + 96441.14000000, + 96451.15000000, + 96461.15000000, + 96471.15000000, + 96481.13000000, + 96491.10000000, + 96501.07000000, + 96511.02000000, + 96520.96000000, + 96530.90000000, + 96540.83000000, + 96550.74000000, + 96560.65000000, + 96570.55000000, + 96580.43000000, + 96590.31000000, + 96600.18000000, + 96610.04000000, + 96619.89000000, + 96629.73000000, + 96639.56000000, + 96649.38000000, + 96659.19000000, + 96669.00000000, + 96678.79000000, + 96688.57000000, + 96698.34000000, + 96708.11000000, + 96717.86000000, + 96727.61000000, + 96737.34000000, + 96747.06000000, + 96756.78000000, + 96766.49000000, + 96776.18000000, + 96785.87000000, + 96795.54000000, + 96805.21000000, + 96814.87000000, + 96824.51000000, + 96834.15000000, + 96843.78000000, + 96853.40000000, + 96863.00000000, + 96872.60000000, + 96882.19000000, + 96891.77000000, + 96901.34000000, + 96910.90000000, + 96920.45000000, + 96929.98000000, + 96939.51000000, + 96949.03000000, + 96958.54000000, + 96968.04000000, + 96977.53000000, + 96987.01000000, + 96996.48000000, + 97005.94000000, + 97015.39000000, + 97024.83000000, + 97034.26000000, + 97043.68000000, + 97053.09000000, + 97062.49000000, + 97071.88000000, + 97081.26000000, + 97090.63000000, + 97099.99000000, + 97109.34000000, + 97118.68000000, + 97128.01000000, + 97137.33000000, + 97146.64000000, + 97155.94000000, + 97165.23000000, + 97174.51000000, + 97183.78000000, + 97193.04000000, + 97202.28000000, + 97211.52000000, + 97220.75000000, + 97229.97000000, + 97239.18000000, + 97248.37000000, + 97257.56000000, + 97266.74000000, + 97275.91000000, + 97285.06000000, + 97294.21000000, + 97303.34000000, + 97312.47000000, + 97321.59000000, + 97330.69000000, + 97339.79000000, + 97348.87000000, + 97357.94000000, + 97367.01000000, + 97376.06000000, + 97385.10000000, + 97394.14000000, + 97403.16000000, + 97412.17000000, + 97421.17000000, + 97430.16000000, + 97439.14000000, + 97448.11000000, + 97457.07000000, + 97466.02000000, + 97474.96000000, + 97483.89000000, + 97492.80000000, + 97501.71000000, + 97510.61000000, + 97519.49000000, + 97528.37000000, + 97537.23000000, + 97546.08000000, + 97554.93000000, + 97563.76000000, + 97572.58000000, + 97581.39000000, + 97590.19000000, + 97598.98000000, + 97607.76000000, + 97616.53000000, + 97625.29000000, + 97634.03000000, + 97642.77000000, + 97651.49000000, + 97660.21000000, + 97668.91000000, + 97677.60000000, + 97686.29000000, + 97694.96000000, + 97703.62000000, + 97712.27000000, + 97720.90000000, + 97729.53000000, + 97738.15000000, + 97746.75000000, + 97755.35000000, + 97763.93000000, + 97772.50000000, + 97781.07000000, + 97789.62000000, + 97798.16000000, + 97806.69000000, + 97815.20000000, + 97823.71000000, + 97832.21000000, + 97840.69000000, + 97849.16000000, + 97857.63000000, + 97866.08000000, + 97874.52000000, + 97882.95000000, + 97891.36000000, + 97899.77000000, + 97908.17000000, + 97916.55000000, + 97924.92000000, + 97933.28000000, + 97941.63000000, + 97949.97000000, + 97958.30000000, + 97966.62000000, + 97974.92000000, + 97983.22000000, + 97991.50000000, + 97999.77000000, + 98008.03000000, + 98016.28000000, + 98024.52000000, + 98032.74000000, + 98040.96000000, + 98049.16000000, + 98057.35000000, + 98065.53000000, + 98073.70000000, + 98081.85000000, + 98090.00000000, + 98098.13000000, + 98106.25000000, + 98114.36000000, + 98122.46000000, + 98130.55000000, + 98138.62000000, + 98146.69000000, + 98154.74000000, + 98162.78000000, + 98170.81000000, + 98178.83000000, + 98186.83000000, + 98194.82000000, + 98202.81000000, + 98210.78000000, + 98218.73000000, + 98226.68000000, + 98234.61000000, + 98242.54000000, + 98250.45000000, + 98258.35000000, + 98266.23000000, + 98274.11000000, + 98281.97000000, + 98289.82000000, + 98297.66000000, + 98305.49000000, + 98313.30000000, + 98321.10000000, + 98328.90000000, + 98336.67000000, + 98344.44000000, + 98352.19000000, + 98359.94000000, + 98367.67000000, + 98375.38000000, + 98383.09000000, + 98390.78000000, + 98398.47000000, + 98406.13000000, + 98413.79000000, + 98421.44000000, + 98429.07000000, + 98436.69000000, + 98444.29000000, + 98451.89000000, + 98459.47000000, + 98467.04000000, + 98474.60000000, + 98482.15000000, + 98489.68000000, + 98497.20000000, + 98504.71000000, + 98512.20000000, + 98519.68000000, + 98527.15000000, + 98534.61000000, + 98542.06000000, + 98549.49000000, + 98556.91000000, + 98564.31000000, + 98571.71000000, + 98579.09000000, + 98586.46000000, + 98593.81000000, + 98601.16000000, + 98608.49000000, + 98615.80000000, + 98623.11000000, + 98630.40000000, + 98637.68000000, + 98644.95000000, + 98652.20000000, + 98659.44000000, + 98666.66000000, + 98673.88000000, + 98681.08000000, + 98688.27000000, + 98695.44000000, + 98702.60000000, + 98709.75000000, + 98716.89000000, + 98724.01000000, + 98731.12000000, + 98738.21000000, + 98745.29000000, + 98752.36000000, + 98759.42000000, + 98766.46000000, + 98773.49000000, + 98780.50000000, + 98787.51000000, + 98794.49000000, + 98801.47000000, + 98808.43000000, + 98815.38000000, + 98822.31000000, + 98829.23000000, + 98836.14000000, + 98843.03000000, + 98849.91000000, + 98856.78000000, + 98863.63000000, + 98870.47000000, + 98877.30000000, + 98884.11000000, + 98890.90000000, + 98897.69000000, + 98904.46000000, + 98911.21000000, + 98917.95000000, + 98924.68000000, + 98931.40000000, + 98938.10000000, + 98944.78000000, + 98951.45000000, + 98958.11000000, + 98964.75000000, + 98971.38000000, + 98978.00000000, + 98984.60000000, + 98991.18000000, + 98997.76000000, + 99004.31000000, + 99010.86000000, + 99017.39000000, + 99023.90000000, + 99030.40000000, + 99036.89000000, + 99043.36000000, + 99049.81000000, + 99056.26000000, + 99062.68000000, + 99069.10000000, + 99075.49000000, + 99081.88000000, + 99088.25000000, + 99094.60000000, + 99100.94000000, + 99107.26000000, + 99113.57000000, + 99119.87000000, + 99126.15000000, + 99132.41000000, + 99138.66000000, + 99144.89000000, + 99151.11000000, + 99157.32000000, + 99163.50000000, + 99169.68000000, + 99175.84000000, + 99181.98000000, + 99188.11000000, + 99194.22000000, + 99200.31000000, + 99206.40000000, + 99212.46000000, + 99218.51000000, + 99224.55000000, + 99230.57000000, + 99236.57000000, + 99242.56000000, + 99248.53000000, + 99254.48000000, + 99260.42000000, + 99266.35000000, + 99272.26000000, + 99278.15000000, + 99284.03000000, + 99289.89000000, + 99295.73000000, + 99301.56000000, + 99307.37000000, + 99313.17000000, + 99318.95000000, + 99324.71000000, + 99330.46000000, + 99336.19000000, + 99341.90000000, + 99347.60000000, + 99353.28000000, + 99358.95000000, + 99364.60000000, + 99370.23000000, + 99375.84000000, + 99381.44000000, + 99387.02000000, + 99392.58000000, + 99398.13000000, + 99403.66000000, + 99409.18000000, + 99414.67000000, + 99420.15000000, + 99425.61000000, + 99431.06000000, + 99436.48000000, + 99441.89000000, + 99447.29000000, + 99452.66000000, + 99458.02000000, + 99463.36000000, + 99468.68000000, + 99473.98000000, + 99479.27000000, + 99484.54000000, + 99489.79000000, + 99495.02000000, + 99500.24000000, + 99505.43000000, + 99510.61000000, + 99515.77000000, + 99520.92000000, + 99526.04000000, + 99531.15000000, + 99536.23000000, + 99541.30000000, + 99546.35000000, + 99551.38000000, + 99556.39000000, + 99561.39000000, + 99566.36000000, + 99571.32000000, + 99576.26000000, + 99581.17000000, + 99586.07000000, + 99590.95000000, + 99595.81000000, + 99600.65000000, + 99605.47000000, + 99610.27000000, + 99615.06000000, + 99619.82000000, + 99624.56000000, + 99629.28000000, + 99633.99000000, + 99638.67000000, + 99643.33000000, + 99647.97000000, + 99652.59000000, + 99657.20000000, + 99661.78000000, + 99666.34000000, + 99670.88000000, + 99675.39000000, + 99679.89000000, + 99684.37000000, + 99688.83000000, + 99693.26000000, + 99697.67000000, + 99702.07000000, + 99706.44000000, + 99710.79000000, + 99715.11000000, + 99719.42000000, + 99723.70000000, + 99727.96000000, + 99732.20000000, + 99736.42000000, + 99740.62000000, + 99744.79000000, + 99748.94000000, + 99753.06000000, + 99757.17000000, + 99761.25000000, + 99765.31000000, + 99769.34000000, + 99773.35000000, + 99777.34000000, + 99781.31000000, + 99785.25000000, + 99789.16000000, + 99793.06000000, + 99796.92000000, + 99800.77000000, + 99804.59000000, + 99808.38000000, + 99812.15000000, + 99815.89000000, + 99819.61000000, + 99823.31000000, + 99826.98000000, + 99830.62000000, + 99834.23000000, + 99837.83000000, + 99841.39000000, + 99844.93000000, + 99848.44000000, + 99851.92000000, + 99855.38000000, + 99858.81000000, + 99862.21000000, + 99865.59000000, + 99868.93000000, + 99872.25000000, + 99875.54000000, + 99878.80000000, + 99882.03000000, + 99885.23000000, + 99888.41000000, + 99891.55000000, + 99894.66000000, + 99897.75000000, + 99900.80000000, + 99903.82000000, + 99906.81000000, + 99909.77000000, + 99912.70000000, + 99915.59000000, + 99918.45000000, + 99921.28000000, + 99924.07000000, + 99926.83000000, + 99929.56000000, + 99932.25000000, + 99934.91000000, + 99937.53000000, + 99940.11000000, + 99942.66000000, + 99945.17000000, + 99947.65000000, + 99950.08000000, + 99952.48000000, + 99954.83000000, + 99957.15000000, + 99959.42000000, + 99961.66000000, + 99963.85000000, + 99966.00000000, + 99968.10000000, + 99970.16000000, + 99972.17000000, + 99974.13000000, + 99976.05000000, + 99977.91000000, + 99979.73000000, + 99981.49000000, + 99983.20000000, + 99984.85000000, + 99986.44000000, + 99987.98000000, + 99989.45000000, + 99990.85000000, + 99992.19000000, + 99993.46000000, + 99994.64000000, + 99995.75000000, + 99996.77000000, + 99997.69000000, + 99998.50000000, + 99999.18000000, + 99999.71000000 +] + +access(all) let flash_crash_severe_constants: SimConstants = SimConstants( + btcCollateralFactor: 0.80000000, + btcLiquidationThreshold: 0.85000000, + yieldAPR: 0.10000000, + directMintYT: true +) + +access(all) let flash_crash_severe_pools: {String: SimPool} = { + "moet_yt": SimPool( + size: 500000.00000000, + concentration: 0.95000000, + feeTier: 0.00050000 + ), + "moet_btc": SimPool( + size: 5000000.00000000, + concentration: 0.80000000, + feeTier: 0.00300000 + ) +} + +access(all) let flash_crash_severe_durationMinutes: Int = 2880 + +access(all) let flash_crash_severe_agents: [SimAgent] = [ + SimAgent( + count: 150, + initialHF: 1.15000000, + rebalancingHF: 1.05000000, + targetHF: 1.08000000, + debtPerAgent: 133333.00000000, + totalSystemDebt: 20000000.00000000 + ) +] + +access(all) let flash_crash_severe_expectedLiquidationCount: Int = 0 +access(all) let flash_crash_severe_expectedAllAgentsSurvive: Bool = true