Features
Automations
Overview
Automations play a pivotal role in Supa by adding a layer of versatility and efficiency to contract actions. By utilizing Gelato, automations transform contract actions into reusable deployment containers, enriched with user-defined conditions.
Creation of Automations
- Access: Go to supa.finance/automations and click on “Create”.
- Process: Start by selecting a macro, then add conditional options to tailor it to your needs.
Types of Conditions
- Flexibility: Choose from on-chain or off-chain triggers to run your macros.
Dynamic Inputs
- Dynamic inputs allow the modification of macro code values, creating more adaptable automations.
- Types:
- Native Token Balance: Fetches the balance of native tokens, such as ETH, AETH, or MATIC.
- Token Balance: Retrieves the balance of ERC-20 tokens in the deploying Supa Wallet.
- Current Time: Provides the current time in Unix timestamp format.
- TokenID: Useful for referencing NFTs generated during automation.
- Outputs from Other Contracts: Utilize outputs from previous contract calls as inputs.
- Uniswap v3 Inputs: Specific helpers for Uniswap v3, including swap slippage, liquidity amounts, and tick positions.
Conditions
- Types:
- Timestamp: Unix timestamp format for scheduling.
- Action Type: Includes options such as blocker, last, loop, and once, defining how and when conditions execute.
- If Types: Logical operators such as and, or, and nested for complex condition structures.
- Time Interval: Schedule execution on a recurring basis (monthly, weekly, daily, hourly, etc.).
Custom Conditions
- On-chain: Fetch a contract’s ABI to call specific functions and set them as conditions.
- Off-chain: Call any public API returning a JSON object, with JSON data query support for logic application.
- Dual-sided: Compare two custom conditions, such as prices from different sources.
Tracked Price
- Enables price tracking in swap macros, allowing conditions based on price changes.
Deployment
- Click ‘Deploy’, choose the Supa Wallet for deployment, and execute the transaction.
- Requires a minimum of 5 Power Credits (PC) to run an automation.
Forkable Automations
- Users can copy and modify forkable automations, claiming ownership upon saving.
Public and Private Automations
- Public Automations: Added to the marketplace for community use and sharing.
- Private Automations: Visible only to the creator, ensuring privacy.
Cost
- Automations consume Power Credits (PC) at a rate of 0.0005 PC/min.
- 1 PC equals approximately 2,000 runs.
Utilize these features in Supa to create sophisticated, customizable automations that enhance your interaction with the web3 space.