# DeFi Saver 自动化没执行：核对订阅、触发、授权与回执

整理：链小知（AI 辅助）
资料核对日期：2026-10-12
引用地址：https://lianxiaozhi.com/tools/guides/defi-saver-subscription-trigger-execution-record-check
难度：进阶
核验方式：官方文档整理，未执行真实账户操作

使用已有配置和执行记录排查isEnabled、订阅hash、链分支、oracle与bot权限；不把启用或阈值穿越当清算保护成功。

## 使用工具
- [DeFi Saver 仓位与自动化](https://lianxiaozhi.com/tools/defi-saver) · [官方入口](https://defisaver.com/)

## 前置条件
- 准备原链/实际执行器与SubStorage版本、钱包类型、subId、策略或bundle、订阅及更新事件、原触发参数、已有执行/失败回执。
- 只分析已有资料与固定代码，不查询仓位/oracle/Graph/RPC、不运行bot，不订阅、取消、调整参数或模拟执行。

## 1. 先核具体协议市场和钱包资格

按当前Compatibility定位市场而不是只写Aave或Compound。Aave v3 Core与Prime/EtherFi的自动化行不同；链例外列OP Mainnet的Compound、Linea/Plasma的Aave、Base的Compound USDS等限制，不能拿主品牌支持覆盖这些例外。

Safe、DSProxy、EOA/operator路径另核。技术Smart wallets矩阵列Safe/DSProxy策略功能；EOA帮助只允许特定协议/动作通过Safe operator，Recipe Creator和TxSaver仍不属于其普遍功能。

核对结果：市场、链、策略与钱包类型均有具体依据，无全协议保护承诺。
依据：[DeFi Saver 自动化协议、市场及链例外](https://help.defisaver.com/automations/compatibility.md)
依据：[DeFi Saver 智能钱包类型与功能矩阵](https://docs.defisaver.com/protocol/core/smart-wallets.md)
依据：[DeFi Saver：EOA 仓位的功能与 Safe operator](https://help.defisaver.com/general/compatibility/wallet-compatibility/what-features-do-eoa-wallets-have-access-to.md)

## 2. 固定subId与主网/L2结构

subId为指定SubStorage中的订阅索引，不能当strategyId或跨链通用编号。主网固定StoredSubData为walletAddr、isEnabled、strategySubHash；StrategySub包含strategyOrBundleId、isBundle、triggerData、subData。

旧文档字段叫userProxy/id；固定代码叫walletAddr/strategyOrBundleId，需按原ABI解码而非猜字段等价。主网主要存hash，完整数据可在原Subscribe/UpdateData事件；固定L2还存完整StrategySub并提供getStrategySub，不能把主网getSub当完整参数。

核对结果：链、存储地址、索引及ABI版本对应；完整订阅材料来源明确。
依据：[DeFi Saver Sub Storage 文档（旧字段名称）](https://docs.defisaver.com/protocol/core/sub-storage.md)
依据：[固定主网 SubStorage：订阅事件、权限、开关](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/SubStorage.sol)
依据：[固定 StrategyModel：Recipe、StoredSubData与StrategySub](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/StrategyModel.sol)
依据：[固定 SubStorageL2：完整订阅及状态存储](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/l2/SubStorageL2.sol)
依据：[DeFi Saver Strategy Executor 主网与L2区别](https://docs.defisaver.com/protocol/core/strategy-executor.md)

## 3. 追踪更新、启用及订阅所属钱包

对原Subscribe/UpdateData/ActivateSub/DeactivateSub按区块和顺序整理；更新后旧StrategySub不能继续当当前hash输入。isEnabled=true只允许进入后续检查，不代表bot已经执行或保护生效。

固定SubStorage修改和开关权限属于记录的walletAddr，而不是任意连接EOA。修改交易失败不改变原状态；只有UI关闭也不能确认链上DeactivateSub成功，更不能保证把所有模块授权一并撤回。

核对结果：最新有效状态有成功事件或已有读取，订阅开关与授权撤销分开。
依据：[固定主网 SubStorage：订阅事件、权限、开关](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/SubStorage.sol)
依据：[固定 SubStorageL2：完整订阅及状态存储](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/l2/SubStorageL2.sol)
依据：[固定 StrategyModel：Recipe、StoredSubData与StrategySub](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/StrategyModel.sol)

## 4. 核触发值与协议预言机时点

保留triggerData与原触发输入的具体单位、ABI、比较方向和时点。协议oracle价格/比率与第三方行情截图不同；帮助说明bot按分钟检查，并受协议oracle更新影响，但不保证一分钟内成交。

所有trigger须通过；固定RecipeExecutor在钱包上下文中检查而非仅StrategyExecutor入口。TriggerNotActiveError带失败索引，应对应原trigger顺序；没有相关原数据就不能凭阈值曾被穿越判触发器故障。

核对结果：触发证据来自对应协议和配置时点，失败索引未代替实际值。
依据：[DeFi Saver 自动化触发与协议预言机](https://help.defisaver.com/automations/when-are-automation-transactions-made.md)
依据：[DeFi Saver Strategy Executor 主网与L2区别](https://docs.defisaver.com/protocol/core/strategy-executor.md)
依据：[固定 RecipeExecutor：触发、动作、日志与回滚](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/RecipeExecutor.sol)

## 5. 按认证、hash与授权分层排错

固定主网StrategyExecutor先核bot认证、再核完整StrategySub的hash及isEnabled；保留BotNotApproved、SubDatHashMismatch、SubNotEnabled原文和参数。它们与trigger false是不同阶段，缺ABI时不猜分类。

后续StrategyExecutorCommon按DSProxy或其他钱包走ProxyAuth/ModuleAuth再调用RecipeExecutor；连接会话正常不证明模块授权存在。L2执行接口不接受相同完整_sub参数，按实际版本分支看原记录，不重算或提交新参数。

核对结果：错误阶段、原版本和钱包授权路由对应，已启用没有替代权限证明。
依据：[固定 StrategyExecutor：认证、hash与启用检查](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/StrategyExecutor.sol)
依据：[固定 StrategyExecutorCommon：钱包授权路由](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/StrategyExecutorCommon.sol)
依据：[DeFi Saver Strategy Executor 主网与L2区别](https://docs.defisaver.com/protocol/core/strategy-executor.md)
依据：[固定 RecipeExecutor：触发、动作、日志与回滚](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/RecipeExecutor.sol)

## 6. 分开触发费、swap费、Gas与失败交易

当前Automations/Fees页列执行Gas从仓位收，触发交易0.05%，swap另按0.25/0.1/0.01%；只是启用并持续开启不收该类一次或连续服务费。该页0.05%的精确基数未明，记录原收费动作/参数，不任意按全仓或Gas算。

旧Features/Automation页将费用分两类、stablecoin组列0.1%，无swap时0.05%；保留原交易时期和新旧页差异，不能直接用当前分类重写旧回执。flash loan源及文档0.09%亦按原协议/市场另核；失败交易的Gas不等自动化服务完成。

核对结果：费用来自具体执行和动作，旧新费表、估算、实际收费及失败Gas分开。
依据：[DeFi Saver 当前 Automations 费用页](https://help.defisaver.com/automations/fees.md)
依据：[DeFi Saver 旧 Features/Automation 费用页](https://help.defisaver.com/features/automation/automation-fees)
依据：[DeFi Saver Recipe Creator 动作费用](https://help.defisaver.com/features/recipe-creator/fees.md)

## 7. 判断执行后状态与剩余风险

固定RecipeExecutor对非continuous策略会在动作执行前禁用订阅，但后续失败会整体回滚；changeable trigger可更新订阅数据。仅看到disabled不能直接认定成功执行，需结合原成功回执和后续订阅事件。

查已有协议事件及仓位债务/抵押/资产的实际变化，减仓或偿债与只是触发不同。网络拥堵、RPC/报价服务、oracle、升级和快速市场变化都可能阻碍及时执行；未有结果证据时写待核，不写已防清算或无风险。

核对结果：已区分配置、触发、执行、状态更新和经济结果；未保证及时保护。
依据：[固定 RecipeExecutor：触发、动作、日志与回滚](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/RecipeExecutor.sol)
依据：[固定主网 SubStorage：订阅事件、权限、开关](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/SubStorage.sol)
依据：[DeFi Saver 自动化的网络、合约及市场风险](https://help.defisaver.com/automations/are-there-risks-when-using-automation.md)

## 常见错误
- isEnabled和阈值成立不是执行成功；disabled也可能是手动开关或一次性策略结果。
- 文档bot检查周期不等确认时间或保护承诺，费用与协议支持均需具体版本。

## 完成检查
- 已定位可证的订阅、认证、触发或执行阶段，未知项单列。
- 是否发生债务/资产变化有独立记录；未执行任何自动化动作。

## 相关知识
- [健康因子与清算：Aave 借款仓位怎么看](https://lianxiaozhi.com/learn/health-factor-and-liquidation)
- [钱包签消息与签交易有什么区别？不付 Gas 的签名也要读内容](https://lianxiaozhi.com/learn/wallet-message-vs-transaction)

## 官方依据
- [DeFi Saver 自动化协议、市场及链例外](https://help.defisaver.com/automations/compatibility.md)
- [DeFi Saver 智能钱包类型与功能矩阵](https://docs.defisaver.com/protocol/core/smart-wallets.md)
- [DeFi Saver：EOA 仓位的功能与 Safe operator](https://help.defisaver.com/general/compatibility/wallet-compatibility/what-features-do-eoa-wallets-have-access-to.md)
- [DeFi Saver Sub Storage 文档（旧字段名称）](https://docs.defisaver.com/protocol/core/sub-storage.md)
- [固定主网 SubStorage：订阅事件、权限、开关](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/SubStorage.sol)
- [固定 StrategyModel：Recipe、StoredSubData与StrategySub](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/StrategyModel.sol)
- [固定 SubStorageL2：完整订阅及状态存储](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/l2/SubStorageL2.sol)
- [DeFi Saver Strategy Executor 主网与L2区别](https://docs.defisaver.com/protocol/core/strategy-executor.md)
- [DeFi Saver 自动化触发与协议预言机](https://help.defisaver.com/automations/when-are-automation-transactions-made.md)
- [固定 RecipeExecutor：触发、动作、日志与回滚](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/RecipeExecutor.sol)
- [固定 StrategyExecutor：认证、hash与启用检查](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/StrategyExecutor.sol)
- [固定 StrategyExecutorCommon：钱包授权路由](https://raw.githubusercontent.com/defisaver/defisaver-v3-contracts/33e17858f914de884b6feab409dfbe07c6141450/contracts/core/strategy/StrategyExecutorCommon.sol)
- [DeFi Saver 当前 Automations 费用页](https://help.defisaver.com/automations/fees.md)
- [DeFi Saver 旧 Features/Automation 费用页](https://help.defisaver.com/features/automation/automation-fees)
- [DeFi Saver Recipe Creator 动作费用](https://help.defisaver.com/features/recipe-creator/fees.md)
- [DeFi Saver 自动化的网络、合约及市场风险](https://help.defisaver.com/automations/are-there-risks-when-using-automation.md)
