Read Contract - getPosition() Response:
tuple : Addressval1val2val3Collateral Amountval5Debt Amount
Get Exact Debt and Balance from above instructions.
Get Vault_ID from "My Positions" page "Position #" column.
Write as Proxy - 2. operateAction()
This takes fields (operation, params).
See below for how they are defined.
Make sure assets have been approved in UI for now (etherscan instructions to come)
operation values:0 : Open Position1 : Borrow2 : Repay3 : Liquidateparams:[Vault_ID,Amount1,Amount2]// Must be in square brackts// No spaces// All numbers in quotes// Vault ID normal size, not in WEI// Both amounts in WEI
Repay Example: operateAction(2, [Vault Number, Repay Amount, Withdraw Amount])
Borrow Example: operateAction(1, [Vault Number, Deposit Amount, Borrow Amount])
With Values Example for Repay 1 LINK-USD, Withdraw 1 LINK: operation: 2 params: ["99999","1000000000000000","1000000000000000"]