-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Settle * Settle Option Round story test * Exercise options * Update marketAgg setup * Simulation Run * Refund all balances * cleanup * run multiple rounds * Export Simulation Results JSON * Loop rounds * Add timestamp to file * checkIgnore * Read marketData json function * Mock timestamps
- Loading branch information
Showing
18 changed files
with
1,116 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { getAccount, getProvider } from "./utils/helpers/common"; | ||
import { declareContracts } from "./utils/deployment/declareContracts"; | ||
import { deployContracts } from "./utils/deployment/deployContracts"; | ||
import { TestRunner } from "./utils/facades/TestRunner"; | ||
import { Constants, MarketData } from "./utils/facades/types"; | ||
import { simulationTesting } from "./simulationTests"; | ||
import { SimulationParameters } from "./utils/facades/RoundSimulator"; | ||
async function main(environment: string, port?: string) { | ||
const provider = getProvider(environment, port); | ||
const devAccount = getAccount(environment, provider); | ||
let hashes = await declareContracts(devAccount); | ||
let { ethAddress, vaultAddress } = await deployContracts( | ||
environment, | ||
devAccount, | ||
hashes | ||
); | ||
|
||
//@Note remove this when testRunner refactor by Jithin is finished | ||
|
||
const constants: Constants = { | ||
depositAmount: BigInt(10000000000000), | ||
reservePrice: BigInt(4000000000), | ||
strikePrice: BigInt(8000000000), | ||
settlementPrice: BigInt(16000000000), | ||
capLevel: 5000, | ||
}; | ||
|
||
const testRunner = new TestRunner( | ||
provider, | ||
vaultAddress, | ||
ethAddress, | ||
constants | ||
); | ||
|
||
|
||
await testRunner.ethFacade.supplyERC20( | ||
devAccount, | ||
provider, | ||
ethAddress, | ||
vaultAddress | ||
); | ||
await simulationTesting(testRunner); | ||
} | ||
|
||
main(process.argv[2], process.argv[3]); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
[ | ||
{ | ||
"starting_timestamp": 1671082204, | ||
"ending_timestamp": 1673760608, | ||
"reserve_price": 1133806091.8973722, | ||
"strike_price": 17635296321.331875, | ||
"settlement_price": 21386087366.87111, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1673760608, | ||
"ending_timestamp": 1676439005, | ||
"reserve_price": 2289497207.1168942, | ||
"strike_price": 21386087366.87111, | ||
"settlement_price": 29034664790.817963, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1676439005, | ||
"ending_timestamp": 1678858200, | ||
"reserve_price": 1279595660.5008752, | ||
"strike_price": 29034664790.817963, | ||
"settlement_price": 38493145481.02064, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1678858200, | ||
"ending_timestamp": 1681536603, | ||
"reserve_price": 875665408.7313896, | ||
"strike_price": 38493145481.02064, | ||
"settlement_price": 25439135433.663445, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1681536603, | ||
"ending_timestamp": 1684128611, | ||
"reserve_price": 2633366765.449701, | ||
"strike_price": 25439135433.663445, | ||
"settlement_price": 74555216167.31648, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1684128611, | ||
"ending_timestamp": 1686807007, | ||
"reserve_price": 1356220491.835023, | ||
"strike_price": 74555216167.31648, | ||
"settlement_price": 20136894952.505894, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1686807007, | ||
"ending_timestamp": 1689399000, | ||
"reserve_price": 1952777064.7434845, | ||
"strike_price": 20136894952.505894, | ||
"settlement_price": 22828235819.938293, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1689399000, | ||
"ending_timestamp": 1692077411, | ||
"reserve_price": 2146702361.445386, | ||
"strike_price": 22828235819.938293, | ||
"settlement_price": 19320316991.848763, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1692077411, | ||
"ending_timestamp": 1694755801, | ||
"reserve_price": 1644783441.6741364, | ||
"strike_price": 19320316991.848763, | ||
"settlement_price": 15696616976.733692, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1694755801, | ||
"ending_timestamp": 1697347808, | ||
"reserve_price": 1467840115.5542483, | ||
"strike_price": 15696616976.733692, | ||
"settlement_price": 7419675169.569965, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1697347808, | ||
"ending_timestamp": 1700026208, | ||
"reserve_price": 554611569.0124147, | ||
"strike_price": 7419675169.569965, | ||
"settlement_price": 37644135519.247475, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1700026208, | ||
"ending_timestamp": 1702618206, | ||
"reserve_price": 3834880492.891962, | ||
"strike_price": 37644135519.247475, | ||
"settlement_price": 39788123292.43376, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1702618206, | ||
"ending_timestamp": 1705296605, | ||
"reserve_price": 5010998700.134231, | ||
"strike_price": 39788123292.43376, | ||
"settlement_price": 26352409279.067184, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1705296605, | ||
"ending_timestamp": 1707975009, | ||
"reserve_price": 2102480779.8673804, | ||
"strike_price": 26352409279.067184, | ||
"settlement_price": 40189317122.14552, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1707975009, | ||
"ending_timestamp": 1710480615, | ||
"reserve_price": 1358716570.77586, | ||
"strike_price": 40189317122.14552, | ||
"settlement_price": 58500408944.033165, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1710480615, | ||
"ending_timestamp": 1713159006, | ||
"reserve_price": 7431323768.285521, | ||
"strike_price": 58500408944.033165, | ||
"settlement_price": 24358911017.007843, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1713159006, | ||
"ending_timestamp": 1715751017, | ||
"reserve_price": 1105329970.4182699, | ||
"strike_price": 24358911017.007843, | ||
"settlement_price": 5681275902.434905, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1715751017, | ||
"ending_timestamp": 1718429397, | ||
"reserve_price": 517729381.0134145, | ||
"strike_price": 5681275902.434905, | ||
"settlement_price": 10706888590.398533, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1718429397, | ||
"ending_timestamp": 1721021409, | ||
"reserve_price": 1008885496.8860922, | ||
"strike_price": 10706888590.398533, | ||
"settlement_price": 3907948839.4517756, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1721021409, | ||
"ending_timestamp": 1721160731, | ||
"reserve_price": 347501891.0070594, | ||
"strike_price": 3907948839.4517756, | ||
"settlement_price": 5191304671.922286, | ||
"cap_level": 3000 | ||
}, | ||
{ | ||
"starting_timestamp": 1721160731, | ||
"ending_timestamp": 1721160731, | ||
"reserve_price": 361402055.1651912, | ||
"strike_price": 5191304671.922286, | ||
"settlement_price": 5191304671.922286, | ||
"cap_level": 3000 | ||
} | ||
] |
Oops, something went wrong.