Strategy Executor
This is the main and only entry point to trigger the execution of strategies. The public function executeStrategy()
is only callable by certain addresses, which is enforced by the BotAuth
contract. Besides those checks, there are a few others; first because the bot calling is sending the full StrategySub
struct the hash is checked if it's valid. Second, each sub can be enabled/disabled by the user that created it, and there is also a check if the sub is allowed. Once the conditions are passed auth contract is called. In case user is using Safe
smart wallet, SafeModuleAuth
is called which is authorized by the owner of safe to execute transactions from safe module. In case of DSProxy
smart wallet, ProxyAuth
is called (which holds users DSProxy
authorizations). From auth contract, RecipeExecutor
is called which will execute a recipe in context of user's wallet.
Triggers are not checked in the StrategyExecutor
but rather in RecipeExecutor
to enable changeable triggers and some minor gas cost savings.
Below is the interface of the contract:
Last updated