- Using Foundry, it is running 5 differents situations (see below), and store data in a JSON.
- The JSON are then used to generate graph for a better visualisation.
- Graphs are stored in a new generate folder
data/graphs/
yarn run node:base
make test
make graphs
make all
Input parameters:
Share: Target amount of WETH in the pool between tick -1 and 0, 1e18 is 100%.Amount: Amount of WETH that will be deposited initially.
What's happening:
- Alice deposit
Amountof WETH in the Vault and receiveAmountof OETHb. - Strategy set the
setAllowedPoolWethShareIntervalusing ±5% ofShare. - Vault allocate
WETHto the AMO. - Strategy rebalance by swapping
WETH. - Vault
withdrawAllfrom AMO.
What's verified:
- That the
(Vault Balance - TotalSupply) / 1e18 > 0
Input parameters:
Share: Target amount of WETH in the pool between tick -1 and 0, 1e18 is 100%.Amount: Amount of OETHb that will be buy in the pool.
What's happening:
- Alice deposit
DEFAULT_INITIAL_DEPOSITof WETH in the Vault and receiveDEFAULT_INITIAL_DEPOSITof OETHb. - Strategy set the
setAllowedPoolWethShareIntervalusing ±5% ofShare. - Vault allocate
WETHto the AMO. - Strategy rebalance by swapping
WETH. - Alice swap
Amountof WETH for OETHb (situation A) or OETHb for WETH (situation B) - Vault
withdrawAllfrom AMO.
What's verified:
- That the
(Vault Balance - TotalSupply) / 1e18 > 0
Input parameters:
Share: Target amount of WETH in the pool between tick -1 and 0, 1e18 is 100%.Amount: Amount of OETHb that will be provided as liquidity in the pool.Ticks: Ticks values where liquidity will be deposited
What's happening:
- Alice deposit
DEFAULT_INITIAL_DEPOSITof WETH in the Vault and receiveDEFAULT_INITIAL_DEPOSITof OETHb. - Strategy set the
setAllowedPoolWethShareIntervalusing ±5% ofShare. - Vault allocate
WETHto the AMO. - Strategy rebalance by swapping
WETH. - Alice provide
amountof liquidity betweenticksandticks + 1(situation A) or-ticks - 1and-ticks(situation B) - Vault
withdrawAllfrom AMO.
What's verified:
- That the
(Vault Balance - TotalSupply) / 1e18 > 0
- Removed.
Input parameters:
Share: Target amount of WETH in the pool between tick -1 and 0, 1e18 is 100%.Amount: Amount of OETHb that will be provided as liquidity in the pool.Ticks: Ticks values where liquidity will be deposited
What's happening:
- Alice deposit
DEFAULT_INITIAL_DEPOSITof WETH in the Vault and receiveDEFAULT_INITIAL_DEPOSITof OETHb. - Strategy set the
setAllowedPoolWethShareIntervalusing ±5% ofShare. - Vault allocate
WETHto the AMO. - Strategy rebalance by swapping
WETH. - Alice provide
DEFAULT_INITIAL_DEPOSITof liquidity between-ticksand-ticks - 1(situation A) orticks + 1and-ticks(situation B) - Alice swap
amountofWETHforOETHb(situation A), ofOETHbforWETH(situation B). - Strategy rebalance by swapping
OETHb(situation A),WETH(situation B). - Vault
withdrawAllfrom AMO.
What's verified:
- That the
(Vault Balance - TotalSupply) / 1e18 > 0
Input parameters:
Share: Target amount of WETH in the pool between tick -1 and 0, 1e18 is 100%.Amount: Amount of OETHb that will be provided as liquidity in the pool.Ticks: Ticks values where liquidity will be deposited
What's happening:
- Alice deposit
DEFAULT_INITIAL_DEPOSITof WETH in the Vault and receiveDEFAULT_INITIAL_DEPOSITof OETHb. - Strategy set the
setAllowedPoolWethShareIntervalusing ±5% ofShare. - Vault allocate
WETHto the AMO. - Strategy rebalance by swapping
WETH. - Alice provide
DEFAULT_INITIAL_DEPOSITof liquidity between-ticksand-ticks - 1 - Alice swap
DEFAULT_INITIAL_DEPOSITofWETHforOETHb. - Alice provide
amountof liquidity between ticks -1 and 0. - Strategy rebalance by swapping
OETHb. - Vault
withdrawAllfrom AMO.
What's verified:
- That the
(Vault Balance - TotalSupply) / 1e18 > 0