65 lines
1.2 KiB
YAML
65 lines
1.2 KiB
YAML
version: 1
|
|
network: mainnet
|
|
protocols: [aave-v3]
|
|
|
|
assumptions:
|
|
baseCurrency: USD
|
|
minHealthFactor: 1.05
|
|
|
|
accounts:
|
|
trader:
|
|
funded:
|
|
- token: WETH
|
|
amount: "10"
|
|
|
|
steps:
|
|
- name: Approve WETH to Aave Pool
|
|
action: erc20.approve
|
|
args:
|
|
token: WETH
|
|
spender: aave-v3:Pool
|
|
amount: "max"
|
|
|
|
- name: Supply WETH
|
|
action: aave-v3.supply
|
|
args:
|
|
asset: WETH
|
|
amount: "10"
|
|
onBehalfOf: $accounts.trader
|
|
assert:
|
|
- aave-v3.healthFactor >= 1.5
|
|
|
|
- name: Borrow USDC near limit
|
|
action: aave-v3.borrow
|
|
args:
|
|
asset: USDC
|
|
amount: "12000"
|
|
rateMode: variable
|
|
assert:
|
|
- aave-v3.healthFactor >= 1.1
|
|
|
|
- name: Oracle shock (-12% WETH)
|
|
action: failure.oracleShock
|
|
args:
|
|
feed: CHAINLINK_WETH_USD
|
|
pctDelta: -12
|
|
|
|
- name: Check HF after shock
|
|
action: assert
|
|
args:
|
|
expression: "aave-v3.healthFactor < 1.0"
|
|
# This should pass - HF should be below 1.0 after shock
|
|
|
|
- name: Repay part of debt
|
|
action: aave-v3.repay
|
|
args:
|
|
asset: USDC
|
|
amount: "1500"
|
|
rateMode: variable
|
|
|
|
- name: Check HF after repay
|
|
action: assert
|
|
args:
|
|
expression: "aave-v3.healthFactor >= 1.0"
|
|
|