The Fluidkey Earn Module is a Safe module that allows Fluidkey to automatically deposit funds into an ERC-4626 vault on behalf of the Safe. It is based on the AutoSavings module authored by Rhinestone.
The Fluidkey Earn Module has successfully been audited by Ackee in March 2025. The audit report can be found here.
- Salt:
0x10000000000000000000000000000000000000000000000000000000f10ed4ee
(production) and0x100000000000000000000000000000000000000000000000000000000000de4e
(development) - Create3 factory: `` (production)
and
0x94FF96E920964cAb500e898eC4F2a8E3CEA5a7c6
(development) - Owner:
0x9E3eba321427941868cB4123De97DAB145C9e7CD
- Address:
0x3BDb857AFe9b51d8916D80240d2ADe40D4d3f2f9
(production) and0x5A05781eE63E38A11707b3A688F8C2b02413E0eD
(development)
To deploy using the Create3 factory, first ensure you have set up your environment variables:
# .env
PRIVATE_KEY=your_private_key_here
Then run the deployment script to deploy the CREATE3Factory locked to the generated bytecode, and to get the calldata for the deployment:
forge script script/Deployer.s.sol \
--rpc-url ${RPC_URL} \
--broadcast \
-vvv \
--sig "run(address,address,address,bytes32)" \
<authorized_relayer> \
<wrapped_native_address> \
<owner> \
<salt>
The script, on top of deploying the CREATE3Factory, will output:
- The bytecode hash of the module
- The expected address of the CREATE3Factory
- The calldata for deploying the FluidkeyEarnModule via the CREATE3Factory
This calldata can then be used in a Safe transaction or other wallet to perform the actual deployment.
Caution
Make sure to use the correct wrapped native asset address for the chain you are deploying to as this cannot be changed once the contract is deployed.
To generate the calldata for setting or updating vault configurations in the Fluidkey Earn Module:
forge script script/ConfigSetter.s.sol -vvv
The script output includes:
- The complete calldata for the
setConfig
method - The configuration hash in both decimal and hex format
- The calldata needed for the
onInstall
method when installing the module on a Safe
To verify the contract on Etherscan, run the following command:
forge verify-contract \
--chain-id <chain_id> \
--num-of-optimizations 200 \
--watch \
--constructor-args $(cast abi-encode "constructor(address,address,address)" <authorized_relayer> <wrapped_native_address> <owner>) \
--etherscan-api-key <etherscan_api_key> \
--compiler-version v0.8.23 \
<contract_address> \
src/FluidkeyEarnModule.sol:FluidkeyEarnModule