Skip to main content
Source: src/Strategy.sol · src/modules/CallValidatorModule.sol

Responsibility

Strategy is a restricted execution wallet for fund capital. The Fund pushes assets into a strategy, and operators holding CALLER_ROLE deploy that capital into external protocols (DEXes, lending markets, …) through a generic call interface — but only calls that have been explicitly allowlisted can execute. Key properties:
  • Each strategy has its own access control (ACLModule with its own admin), separate from the Fund’s roles. The fund admin and the strategy operator can be different parties.
  • The Fund can always pull assets back (pullAsset is onlyFund, invoked via Fund.pullAssetFromStrategy), so the operator can deploy capital but never lock the Fund out of it.
  • The strategy can never call the Fund (target == fund is rejected), preventing the operator from reaching Fund-privileged paths.
Strategies are deployed through Fund.createStrategyFundManager.createStrategyForFund, which binds the strategy to the fund and puts its proxy under the same ProxyAdmin owner as the Fund’s.

Call allowlisting (CallValidatorModule)

Two allowlist granularities, both keyed per (caller, target, selector):
  1. Plain callsaddCalls([{caller, target, selector}]) permits caller to invoke target.selector(…) with any arguments.
  2. Constrained callsaddConstrainedCalls([...]) additionally pins specific 32-byte words of the calldata: constrainedOffsets[i] is a byte offset and constrainedValues[i] the exact word required there. Example: allow transfer(address,uint256) only when the recipient word (offset 4) equals a specific address — the amount stays free.
At execution time the caller picks the matching overload of call. For constrained calls, the caller passes the same offsets/values used at registration (they’re part of the allowlist key), and the module verifies the actual calldata matches every pinned word.

Function reference

Execution

Fund actions

Allowlist management (strategy’s own ACL)

Views

fund(), getAllowedCalls(), getAllowedConstrainedCalls(), getCall(hash), getConstrainedCall(hash), getCallHash(caller, target, selector), getConstrainedCallHash(caller, target, selector, offsets, values). StandaloneStrategy — the same engine detached from Fund control, for deploying on a different chain than the Fund.