DeFi Saver
Search…
Introduction

What is DeFi Saver?

This is technical documentation about the DeFi Saver SDK. If you are looking for information about using the DeFi Saver app, please visit our help center.
DeFi Saver is an advanced management dashboard for all your DeFi needs.
The following documentation will go over the Solidity architecture that powers DeFi Saver and provide an in-depth explanation on how it works.
With DeFi Saver you can manage and interact between decentralized finance protocols. By creating strategies you can create advanced actions that will be executed automatically when certain conditions are met. The code is open source and runs on the Ethereum blockchain.
Basic overview of system components.

Main concepts

Term
Description
Action
A contract which will perform a specific action (e.g. Maker Repay). It inherits the standard ActionBase. Actions are proxy/logic contracts that are called through DSProxy and can’t hold any state.
Trigger
A contract which will perform a check if a certain condition is met (e.g. whether Maker Vault's collateralization ratio is lower than specified). It inherits the standard TriggerInterface.
Task/Recipe
A task is a series of actions that are bundled together and executed in one sequence. Actions can share return values and use them as inputs inside a task.
A task can be either executed immediately or through a strategy. If a flash loan action is used within a task, it must be the first action.
Strategy
Is the main building block. A Strategy is an array of triggers and a task, where the task will be executed if all the specified trigger conditions are met. Users build their own strategies which are executed by bots.
Template
Each strategy has a specific template. Templates have a name and hold a list of action and trigger IDs which will be executed. As many strategies will perform the same actions just for different users, templates are reusable schemes that help us avoid redundancy and that can be easily sharable.
Last modified 6mo ago