This plug supplies 3 WETH to the Aave market at 0x2f39d218133afab8f2b819b1066c7e434ad94e9e and borrows 4500 USDC when a stored counter is at or below zero, and otherwise repays USDC. It reads and writes the weeks_elapsed counter in the plug's own storage, requiring no caller inputs beyond that state. It runs at most 53 times at a 6 year interval, taking the borrow branch while the counter stays low and the repay branch afterward. Running it by hand risks miscounting the schedule or acting on a stale debt figure.
Actions · 15
Repeatuptoxevery
Limits how many times this plug can execute within a time interval.
Readstoredvalueofin
Reads a stored value from the socket's persistent storage by key.
Is
Compares two values with a chosen operator and returns a boolean.
Steers control flow by comparing two values: branch, loop, or require the condition holds.
Supplyto
Supplies an asset to an Aave market, minting aTokens to the wallet.
Borrowfrom
Borrows an asset from an Aave market against collateral you have supplied.
Else
Opens the else branch of a conditional.
Getassetdataofin
Reads an Aave reserve's live rates and token addresses, with supply and borrow APYs.
Getbalanceofheldby
Reads a token balance held by an address, native or ERC-20.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Repayto
Repays borrowed assets to an Aave market from the socket's balance.
Endblock
Closes the innermost open block, whether a conditional branch or a loop.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Setstoredvalueofinto
Writes a value to the socket's persistent storage under a scope and key.