DeFi Kit presets
DeFi Kit is a library of tested permission sets for common DeFi protocols, maintained by karpatkey. One preset call returns the complete permission set for one protocol action: the approvals, the protocol calls, and the conditions. Use presets instead of hand-written permissions where they exist.
Use a preset
Call the action through the SDK’s defikit helper in a permissions.ts file of your
constellation:
import { defikit } from '@zodiaceco/sdk/actions'
export default [
defikit.lido.deposit({ label: 'Stake ETH with Lido' }),
defikit.aave_v3.deposit({
label: 'Lend on Aave',
market: 'Core',
targets: ['USDC', 'WBTC'],
}),
] satisfies PermissionsAn entry records the protocol, the action, and its parameters — push fetches
nothing. The permission set behind it is resolved when the constellation is deployed,
so a stored revision always reflects the current preset. The label names the action
in the app and never reaches the chain. The chain comes from the constellation; DeFi
Kit serves Ethereum, Optimism, Gnosis, Base, and Arbitrum.
What a preset writes
- The preset pins the protocol contracts and functions. A
depositaction includes the matching withdraw path and, where the protocol has one, the reward claim. - The preset pins recipient and
onBehalfparameters to the avatar. Withdrawals and claims pay out to the Safe only. - The preset leaves amount parameters open. An allowance cannot be attached to a preset afterwards — see Allowances and DeFi Kit presets.
Find the action
The module name is not always the protocol name from the app or from DefiLlama. Common cases on Ethereum:
Every call also takes a label, omitted here for brevity.
| You want | Call |
|---|---|
| Stake ETH with Lido | lido.deposit() |
| Stake ETH with Rocket Pool | rocket_pool.deposit() |
| Lend on Aave v3 | aave_v3.deposit({ market, targets }) |
| Sky savings (sUSDS) | spark.deposit({ targets: ["SKY_sUSDS"] }) |
| Morpho curated vaults | morphoVaults.deposit({ targets }) — vault names or addresses |
| Morpho Blue markets | morphoMarkets.deposit({ targets }) — bytes32 market ids |
| Swap on CoW Protocol | cowswap.swap({ sell, buy }) |
The sky module holds the legacy Maker proxy actions, not the sUSDS savings
flow. Some actions answer a wrong or missing targets value with an empty
permission set instead of an error. The deploy refuses an entry that resolves
to no permissions, so a wrong value surfaces when the revision is opened or
deployed — review the change set in the app before signing.
Operational notes
Some actions read chain state when you call them, for example
rocket_pool.deposit(). The RPC endpoints are fixed inside the package,
without an override option. When an endpoint is down, the call retries without
an end instead of an error. Pin the package version and test preset resolution
in CI before you depend on it.
The market and vault lists of a preset are data inside the package. Update the package
to pick up new markets, vaults, and tokens. A protocol without a module in the kit, for
example Aave v4, needs hand-written permissions: register the contracts in
zodiac.config.ts and use the allow kit with conditions.
Next steps
- Meter amounts on hand-written permissions: Allowances
- The merge rule behind “presets stay open”: One function, several conditions
- The full action catalog: kit.karpatkey.com