What you can do
| find-wallet | Find a user's DeFi Saver smart wallet | DFSProxyRegistryV2.getMcdProxy(owner) on the chain; the zero address means none |
| run-recipe | Execute a recipe through the user's smart wallet | build the recipe (name, callData[], subData[], actionIds[], paramMapping[]) with each action's id from DFSRegistry.getAddr, then call the user's wallet proxy to run RecipeExecutor.executeRecipe |
| lookup-address | Get the current address of a DeFi Saver contract | DFSRegistry.getAddr(bytes4 id) on the chain; do not hardcode executor addresses |
Recipes run with the power of the user's smart wallet. A wrong recipe can move or approve funds, so simulate and check each action before sending.
Automated strategies are executed by DeFi Saver's bots. Users must authorize subscriptions, and they can be cancelled.
Contracts are upgradable through the DFSRegistry, which has a wait period on changes. Addresses can change over time.
Each underlying lending protocol carries its own liquidation and market risk.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).DFSProxyRegistryV2registry on ethereum0x0cCB1F91beb8590949880D2a61C26C11d6280319
read getMcdProxy(address)
DeFi Saver smart wallet (DSProxy) for an owner address.
read getAllProxies(address)
All wallet proxies tracked for an owner address.
read MCD_REGISTRY()
Address of the Maker registry used by the proxy registry.
DFSRegistryregistry on ethereum0x287778F121F134C66212FB16c9b53eC991D32f5b
read getAddr(bytes4)
Current address of a DeFi Saver contract by its 4-byte id. Use this instead of hardcoding executors or actions.
read isRegistered(bytes4)
True when a 4-byte id is registered in DFSRegistry.
RecipeExecutorother on ethereum0x6e7dEde13E011Eee74E0c731A06c158377fc1Cae
write executeRecipe((string,bytes[],bytes32[],bytes4[],uint8[][]))
Ethereum recipe executor. Runs a recipe, a list of encoded actions, from the user's DeFi Saver smart wallet. Designed to be called from the user's DeFi Saver wallet.
write executeRecipeFromTxSaver((string,bytes[],bytes32[],bytes4[],uint8[][]),(uint256,address,uint256,uint256,bool))
Ethereum recipe executor. Same as executeRecipe, with TxSaver gas settings (max cost, fee token, price, deadline, whether to take the fee from the position).
StrategyExecutorother on ethereum0x3727C31D4D4c5270290FFb20C4C358C84c0792C9
write executeStrategy(uint256,uint256,bytes[],bytes[],(uint64,bool,bytes[],bytes32[]))
Run an automated strategy for a subscription. Called by DeFi Saver's automation bots when a trigger fires, not by users.
DFSProxyRegistryV2registry on arbitrum0x4fe554C08d0e0a1f52ba83F334f65bc618140D89
read getMcdProxy(address)
DeFi Saver smart wallet for an owner address on arbitrum, or the zero address if none.
read getAllProxies(address)
All wallet proxies tracked for an owner address on arbitrum.
RecipeExecutorother on arbitrum0x1674Df46e92A393d6B29139BF8C2d2885F40F7B2
write executeRecipe((string,bytes[],bytes32[],bytes4[],uint8[][]))
Arbitrum recipe executor. Runs a recipe, a list of encoded actions, from the user's DeFi Saver smart wallet. Designed to be called from the user's DeFi Saver wallet.
write executeRecipeFromTxSaver((string,bytes[],bytes32[],bytes4[],uint8[][]),(uint256,address,uint256,uint256,bool))
Arbitrum recipe executor. Same as executeRecipe, with TxSaver gas settings (max cost, fee token, price, deadline, whether to take the fee from the position).
DFSProxyRegistryV2registry on base0x28C8bCf583bD10dc718A7596d1bEFF23990d1907
read getMcdProxy(address)
DeFi Saver smart wallet for an owner address on base, or the zero address if none.
read getAllProxies(address)
All wallet proxies tracked for an owner address on base.
RecipeExecutorother on base0xB81865b724eF6DAc41DFf125E5445701924ea19D
write executeRecipe((string,bytes[],bytes32[],bytes4[],uint8[][]))
Base recipe executor. Runs a recipe, a list of encoded actions, from the user's DeFi Saver smart wallet. Designed to be called from the user's DeFi Saver wallet.
write executeRecipeFromTxSaver((string,bytes[],bytes32[],bytes4[],uint8[][]),(uint256,address,uint256,uint256,bool))
Base recipe executor. Same as executeRecipe, with TxSaver gas settings (max cost, fee token, price, deadline, whether to take the fee from the position).
DFSProxyRegistryV2registry on optimism0xa1651732a4F6a9aec2261304a7E2cd5790A224e5
read getMcdProxy(address)
DeFi Saver smart wallet for an owner address on optimism, or the zero address if none.
read getAllProxies(address)
All wallet proxies tracked for an owner address on optimism.
RecipeExecutorother on optimism0x3296C0f3Ff67B00306e5Ce251CDfA1E0160F5742
write executeRecipe((string,bytes[],bytes32[],bytes4[],uint8[][]))
Optimism recipe executor. Runs a recipe, a list of encoded actions, from the user's DeFi Saver smart wallet. Designed to be called from the user's DeFi Saver wallet.
write executeRecipeFromTxSaver((string,bytes[],bytes32[],bytes4[],uint8[][]),(uint256,address,uint256,uint256,bool))
Optimism recipe executor. Same as executeRecipe, with TxSaver gas settings (max cost, fee token, price, deadline, whether to take the fee from the position).
StrategyExecutorL2other on arbitrum0xe4719f2d5b85F589B809AC8A1b9463238836325c
write executeStrategy(uint256,uint256,bytes[],bytes[])
Run an automated strategy on Arbitrum. Called by DeFi Saver's automation bots when a trigger fires, not by users.