Skip to content

Add propose_vault_strategy_moves actions for Ethereum and Base#2945

Open
naddison36 wants to merge 1 commit into
masterfrom
nicka/auto-strategies
Open

Add propose_vault_strategy_moves actions for Ethereum and Base#2945
naddison36 wants to merge 1 commit into
masterfrom
nicka/auto-strategies

Conversation

@naddison36

@naddison36 naddison36 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds proposeVaultStrategyMoves, a Talos action for proposing ordered Vault strategy deposits, withdrawals, and rebalances through the Strategist 2/8 Safe.

Supported Vaults:

  • OUSD and OETH on Ethereum
  • SuperOETH on Base
  • Sonic is out of scope

This uses Safe Transaction Service delegation—not a Safe module. Proposals still require two Safe owner confirmations.

Execution flow

By default, the action:

  1. Starts an isolated Hardhat fork pinned to the latest block.
  2. Executes vault.rebase().
  3. Takes a Vault Value Checker snapshot.
  4. Executes the requested strategy movements in order.
  5. Derives expected profit and Vault change from the fork.
  6. Validates the effective values with checkDelta.
  7. Builds and estimates the atomic Safe MultiSend.
  8. Proposes it to the Strategist Safe.

The proposed batch is always:

rebase → snapshot → movements → checkDelta

Any simulation, movement, checker, estimation, or nonce validation failure stops before proposal submission.

Movement interface

Movements use an ordered semicolon-separated list:

--moves "withdraw:OUSDMorphoV2StrategyProxy:500000;deposit:OUSDCurveAMOProxy:250000"

Supported operations:

  • deposit:<strategy-name-or-address>:<amount>
  • withdraw:<strategy-name-or-address>:<amount>
  • withdrawAll:<strategy-name-or-address>

Deployment names and addresses are supported. Strategy approval and asset compatibility are validated before simulation.

Value Checker

Expected profit and Vault change are derived independently from the local fork unless explicitly overridden.

Vault Profit variance Vault-change variance
OUSD 100 OUSD 100 OUSD
OETH 1 OETH 1 OETH
SuperOETH 1 ETH 10 ETH

Using --skip-fork requires explicit --expected-profit and --expected-vault-change. Expected values never silently default to zero.

Nonce handling

  • Defaults to the next nonce after pending Safe proposals.
  • Supports an explicit nonce for competing replacement proposals.
  • Rejects consumed or executed nonces.
  • Warns about nonce gaps and existing proposals.
  • Returns an existing identical proposal instead of creating a duplicate.
  • Rechecks the onchain nonce before signing and submission.

Talos integration

Adds separate disabled manual schedules because Talos locks --network:

  • propose_vault_strategy_moves_mainnet
  • propose_vault_strategy_moves_base

Required configuration:

  • SAFE_API_KEY
  • PROVIDER_URL for Ethereum forks
  • BASE_PROVIDER_URL for Base forks
  • The Talos signer registered as a Safe Transaction Service delegate on each chain

Testing

  • pnpm lint:ts
  • pnpm hardhat test test/tasks/vault-strategy-moves.js — 17 passing
  • Ethereum OUSD local-fork smoke test
  • Base SuperOETH local-fork smoke test
  • Safe MultiSend construction smoke test
  • git diff --check

Authenticated Safe submission was not performed because a production SAFE_API_KEY was unavailable in the development environment.

Code Change Checklist

To be completed before internal review begins:

  • The contract code is complete
  • Executable deployment file
  • Fork tests that test after the deployment file runs
  • Unit tests *if needed
  • The owner has done a full checklist review of the code + tests

Internal review:

  • Two approvals by internal reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant