44 lines
764 B
YAML
44 lines
764 B
YAML
version: 1
|
|
network: mainnet
|
|
protocols: [compound-v3]
|
|
|
|
assumptions:
|
|
baseCurrency: USD
|
|
minHealthFactor: 1.05
|
|
|
|
accounts:
|
|
trader:
|
|
funded:
|
|
- token: WETH
|
|
amount: "2"
|
|
|
|
steps:
|
|
- name: Approve WETH to Compound Comet
|
|
action: erc20.approve
|
|
args:
|
|
token: WETH
|
|
spender: compound-v3:comet
|
|
amount: "max"
|
|
|
|
- name: Supply WETH as collateral
|
|
action: compound-v3.supply
|
|
args:
|
|
asset: WETH
|
|
amount: "2"
|
|
|
|
- name: Borrow USDC (withdraw base asset)
|
|
action: compound-v3.borrow
|
|
args:
|
|
amount: "3000"
|
|
|
|
- name: Check borrow balance
|
|
action: assert
|
|
args:
|
|
expression: "compound-v3.borrowBalance > 0"
|
|
|
|
- name: Repay part of debt
|
|
action: compound-v3.repay
|
|
args:
|
|
amount: "1000"
|
|
|