Skip to main content

What are Connectors?

Connectors are verified smart contracts that interface between DSA accounts and external DeFi protocols. Each connector provides standardized methods to interact with a specific protocol, enabling safe and composable multi-protocol transactions.
Connectors act as adapters - they translate DSA spell calls into protocol-specific function calls while maintaining security and composability.

Connector Architecture

Naming Convention

Connectors follow a consistent naming pattern:
{PROTOCOL}-{VERSION?}-{VARIANT}
Examples:
  • AAVE-V3-A - Aave V3, variant A
  • COMPOUND-V3-A - Compound V3, variant A
  • UNISWAP-V3-SWAP-A - Uniswap V3 swap functionality, variant A
  • 1INCH-V6-A - 1inch V6, variant A
The variant letter (A, B, C, etc.) indicates different versions or implementations of the same protocol connector. Newer variants typically include bug fixes or feature enhancements.

Connector Versions

DSA supports two connector version systems:
  • Version 1 (V1): Legacy connectors for older DSA accounts
  • Version 2 (V2): Current standard with enhanced features (recommended)
Always use Version 2 connectors with Version 2 DSA accounts for optimal compatibility.

Multi-Chain Support

Connectors are deployed across multiple blockchain networks:
Chain ID: 1Most comprehensive connector ecosystem with 100+ available connectors.

Available Connectors

Lending & Borrowing

Connectors: AAVE-V1-A, AAVE-V2-A, AAVE-V3-A, AAVE-V3-LIDO-A, AAVE-V3-ETHERFIInteract with Aave’s lending markets:
  • Deposit/withdraw assets
  • Borrow/repay loans
  • Enable/disable collateral
  • Claim rewards
  • Import positions
spell.add({
  connector: 'AAVE-V3-A',
  method: 'deposit',
  args: [tokenAddress, amount, 0, 0]
})
Connectors: COMPOUND-A, COMPOUND-V3-A, COMPOUND-V3-REWARDS-AInteract with Compound markets:
  • Supply/withdraw assets
  • Borrow/repay loans
  • Claim COMP rewards
  • Manage collateral
spell.add({
  connector: 'COMPOUND-V3-A',
  method: 'supply',
  args: [market, tokenAddress, amount, 0, 0]
})
Connectors: MORPHO-AAVE-V2-A, MORPHO-AAVE-V3-A, MORPHO-COMPOUND-V2-A, MORPHO-BLUE-AAccess optimized lending rates through Morpho:
  • Supply to optimized markets
  • Borrow at better rates
  • Claim MORPHO rewards
spell.add({
  connector: 'MORPHO-BLUE-A',
  method: 'supply',
  args: [marketId, amount, 0, 0]
})
Connectors: SPARK-A, SPARK-CLAIM-A, SPARK-PSM-AInteract with Spark Protocol (MakerDAO’s lending protocol):
  • Deposit/withdraw assets
  • Borrow/repay loans
  • Claim rewards
  • PSM (Peg Stability Module) operations
Connectors: EULER-A, EULER-REWARDS-A, EULER-IMPORT-AAccess Euler Finance:
  • Deposit/withdraw assets
  • Borrow/repay loans
  • Claim EUL rewards
  • Import positions
Connectors: NOTIONAL-V2-AFixed-rate lending and borrowing through Notional:
  • Lend at fixed rates
  • Borrow at fixed rates
  • Provide liquidity

Decentralized Exchanges

Connectors: UNISWAP-A, UNISWAP-V2-A, UNISWAP-V3-A, UNISWAP-V3-SWAP-A, UNISWAP-V3-STAKER-BTrade and provide liquidity on Uniswap:
  • Swap tokens (V2 & V3)
  • Add/remove liquidity
  • Collect fees
  • Stake LP tokens
spell.add({
  connector: 'UNISWAP-V3-SWAP-A',
  method: 'swap',
  args: [tokenIn, tokenOut, amountIn, minAmountOut, 0, 0]
})
Connectors: 1INCH-V3-A, 1INCH-V4-A, 1INCH-V5-A, 1INCH-V6-AGet best swap rates through 1inch aggregator:
  • Swap tokens at optimal rates
  • Split orders across DEXs
  • Limit orders
Connectors: PARASWAP-V5-A, PARASWAP-V6-AAggregate liquidity through Paraswap:
  • Multi-path swaps
  • Gas-optimized routing
  • Best price execution
Connectors: ZEROX-A, ZEROX-V4-A, ZEROX-V5-AProfessional trading through 0x:
  • Swap tokens
  • Access aggregated liquidity
  • RFQ system
Connectors: SUSHISWAP-ATrade on SushiSwap DEX:
  • Swap tokens
  • Add/remove liquidity
  • Stake SUSHI
Connectors: KYBER-AGGREGATOR-AAccess Kyber Network aggregated liquidity:
  • Best rate swaps
  • Multi-source routing
Connectors: OKX-A, OKX-V6-ATrade through OKX DEX:
  • Token swaps
  • Aggregated liquidity
Connectors: ODOS-V2-AOptimized routing through Odos:
  • Multi-path swaps
  • Gas-efficient routing

Stablecoins & Governance

Connectors: MAKERDAO-A, MAKERDAO-CLAIM-AManage Maker vaults (CDPs):
  • Open/close vaults
  • Deposit/withdraw collateral
  • Mint/burn DAI
  • Claim MKR rewards
spell.add({
  connector: 'MAKERDAO-A',
  method: 'open',
  args: [ilkType, 0]
})
Connectors: LIQUITY-A, B-LIQUITY-AManage Liquity troves:
  • Open/close troves
  • Deposit/withdraw ETH collateral
  • Borrow/repay LUSD
  • Stake LQTY
Connectors: REFLEXER-AInteract with Reflexer (RAI):
  • Open/manage safes
  • Mint/burn RAI
  • Manage collateral
Connectors: CURVE-USD-AAccess Curve’s crvUSD stablecoin:
  • Mint/burn crvUSD
  • Manage collateral
  • Leverage positions
Connectors: USDS-AInteract with USDS stablecoin:
  • Mint/burn USDS
  • Manage positions

Liquid Staking & ETH Derivatives

Connectors: LIDO-STETH-A, WSTETH-AStake ETH through Lido:
  • Stake ETH for stETH
  • Wrap stETH to wstETH
  • Unwrap wstETH
spell.add({
  connector: 'LIDO-STETH-A',
  method: 'deposit',
  args: [amount, 0, 0]
})
Connectors: EETH-A, WEETH-A, WEETHS-A, ETHERFI-MINT-AAccess EtherFi liquid staking:
  • Stake ETH for eETH
  • Wrap to weETH
  • Mint liquid staking tokens
Connectors: WETH-AWrap/unwrap ETH:
  • Convert ETH to WETH
  • Convert WETH to ETH
spell.add({
  connector: 'WETH-A',
  method: 'deposit',
  args: [amount, 0, 0]
})

Yield & Vaults

Connectors: YEARN-VAULT-AInteract with Yearn vaults:
  • Deposit to vaults
  • Withdraw from vaults
  • Claim yields
Connectors: FLUID-A, FLUID-STAKING-A, FLUID-VAULT-T2-A, FLUID-VAULT-T3-A, FLUID-VAULT-T4-AAccess Fluid Protocol:
  • Vault operations
  • Staking
  • Rewards claiming
Connectors: MSTABLE-AUse mStable baskets:
  • Mint mAssets
  • Redeem mAssets
  • Swap within baskets

Bridges & Cross-Chain

Connectors: POLYGON-BRIDGE-ABridge assets to Polygon:
  • Deposit to Polygon
  • Withdraw from Polygon
spell.add({
  connector: 'POLYGON-BRIDGE-A',
  method: 'deposit',
  args: [tokenAddress, amount, 0, 0]
})
Connectors: HOP-MAINNET-AFast cross-chain transfers via Hop:
  • Bridge to L2s
  • Bridge between L2s
  • Liquidity provision
Connectors: CONNEXT-ACross-chain swaps through Connext:
  • Transfer assets across chains
  • Cross-chain liquidity
Connectors: INTEROP-A, INTEROP-STAGING-AInter-protocol operations:
  • Cross-protocol interactions
  • Batch operations

Utility Connectors

Connectors: BASIC-A, BASIC-B, BASIC-C, BASIC-D, BASIC-D-V2Fundamental operations:
  • Deposit ETH/tokens to DSA
  • Withdraw ETH/tokens from DSA
  • Transfer between addresses
// Deposit ETH to DSA
spell.add({
  connector: 'BASIC-D-V2',
  method: 'deposit',
  args: [
    '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
    amount,
    0,
    0
  ]
})
Connectors: AUTHORITY-AManage DSA authorities:
  • Add authority
  • Remove authority
  • Toggle authority status
spell.add({
  connector: 'AUTHORITY-A',
  method: 'add',
  args: [newAuthorityAddress]
})
Connectors: INSTAPOOL-A, INSTAPOOL-B, INSTAPOOL-C, INSTAPOOL-DFlash loan functionality:
  • Borrow flash loans
  • Repay flash loans
  • Multiple token flash loans
// Borrow flash loan
spell.add({
  connector: 'INSTAPOOL-D',
  method: 'flashBorrow',
  args: [tokenAddress, amount, 0, 0]
})

// ... use borrowed funds ...

// Repay flash loan
spell.add({
  connector: 'INSTAPOOL-D',
  method: 'flashPayback',
  args: [tokenAddress, 0, 0]
})
Connectors: LITE-A, LITE-BLightweight utility operations:
  • Basic transfers
  • Simple swaps
  • Gas-optimized actions
Connectors: SWAP-AGGREGATOR-AGeneric swap aggregation:
  • Route through multiple DEXs
  • Best price finding
  • Unified swap interface
Connectors: AVO-APPROVE-A, AVO-APPROVE-MULTISIG-AApproval management for Avocado wallets:
  • Set token approvals
  • Manage permissions
  • Multisig approvals

Rewards & Claims

Connectors: INST-STAKING-A, INST-STAKING-B, INST-A, INST-LM-AStake and earn INST tokens:
  • Stake INST
  • Unstake INST
  • Claim rewards
  • Liquidity mining
Connectors: MERKLE-CLAIM-A, MERKLE-CLAIM-LRT-A, FLUID-MERKLE-CLAIM-AClaim airdropped tokens:
  • Claim merkle drops
  • Batch claims
  • Protocol-specific claims
Connectors: AAVE-CLAIM-A, MAKERDAO-CLAIM-A, SPARK-CLAIM-A, SPK-CLAIM-A, MORPHO-CLAIM-AClaim protocol rewards:
  • AAVE rewards
  • MKR rewards
  • SPARK rewards
  • MORPHO rewards
Connectors: STAKE-ERC20-A, GELATO-AAVE-A, UNISWAP-V3-STAKE-AStake and earn:
  • Generic ERC20 staking
  • Protocol-specific staking
  • LP token staking

Specialized Connectors

Connectors: REFINANCE-ARefinance debt positions:
  • Move debt between protocols
  • Optimize interest rates
  • Batch position migration
Connectors: AAVE-V1-IMPORT-A, AAVE-V2-IMPORT-B, COMPOUND-IMPORT-C, EULER-IMPORT-A, SPARK-IMPORT-AImport existing positions to DSA:
  • Migrate positions to DSA
  • Maintain existing debt/collateral
  • Enable DSA composability
Connectors: GELATO-AAVE-AAutomated strategies:
  • Automated limit orders
  • Stop-loss orders
  • Automated rebalancing
Connectors: POOLTOGETHER-ANo-loss lottery:
  • Deposit to prize pools
  • Withdraw deposits
  • Claim prizes
Connectors: UBIQUITY-AUbiquity Dollar operations:
  • Mint/burn uAD
  • Manage collateral
Connectors: UNIVERSE-AUniverse protocol integration:
  • NFT-backed loans
  • Collateral management
Connectors: DSA-SPELL-AAdvanced spell operations:
  • Nested spells
  • Meta-transactions
  • Batch operations

Using Connectors

Basic Usage

To use a connector, add it to your spell:
const spell = dsa.Spell()

spell.add({
  connector: 'CONNECTOR-NAME',
  method: 'methodName',
  args: [arg1, arg2, ...]
})

await spell.cast()

Finding Connector Methods

Each connector has specific methods for interacting with its protocol. Common method patterns: Lending Protocols:
  • deposit(token, amount, getId, setId)
  • withdraw(token, amount, getId, setId)
  • borrow(token, amount, rateMode, getId, setId)
  • payback(token, amount, rateMode, getId, setId)
DEX Protocols:
  • swap(tokenIn, tokenOut, amount, minReturn, getId, setId)
  • addLiquidity(token0, token1, amount0, amount1, ...)
  • removeLiquidity(token0, token1, liquidity, ...)
Utility:
  • deposit(token, amount, getId, setId) - Deposit to DSA
  • withdraw(token, amount, to, getId, setId) - Withdraw from DSA
Refer to the connector source code for detailed method signatures and parameters.

Connector Addresses

Connector addresses are network-specific and managed by the SDK:
// Connectors are automatically resolved based on chainId
const dsa = new DSA(web3, 1) // Ethereum mainnet

spell.add({
  connector: 'AAVE-V3-A', // SDK resolves to correct address for chain 1
  method: 'deposit',
  args: [/* ... */]
})

Creating Custom Connectors

Developers can create custom connectors for new protocols:
1

Implement Connector Interface

Create a connector contract following the standard interface
2

Add Protocol Logic

Implement methods to interact with the target protocol
3

Add Storage ID Support

Implement getId/setId for composability
4

Test Thoroughly

Test all methods and edge cases
5

Submit for Review

Submit to the Instadapp connector repository for review and deployment
See the DSA Connectors Repository for more information.

Best Practices

1. Use Latest Versions

Always use the latest connector versions for bug fixes and improvements:
// Good: Use latest version
spell.add({ connector: 'AAVE-V3-A', ... })

// Avoid: Using older versions unless necessary
spell.add({ connector: 'AAVE-V1-A', ... })

2. Verify Connector Availability

Check if a connector exists on your target chain before using it:
const chainId = await dsa.web3.eth.getChainId()
if (chainId === 1) {
  // Use mainnet-specific connectors
  spell.add({ connector: 'COMPOUND-V3-A', ... })
}

3. Handle Connector Upgrades

Be aware of connector variants (A, B, C):
// BASIC-D-V2 is newer than BASIC-D
spell.add({ connector: 'BASIC-D-V2', ... })

4. Combine Connectors Efficiently

Minimize gas by ordering connector calls logically:
const spell = dsa.Spell()

// 1. Withdraw from protocol
spell.add({ connector: 'COMPOUND-V3-A', method: 'withdraw', ... })

// 2. Swap tokens
spell.add({ connector: 'UNISWAP-V3-SWAP-A', method: 'swap', ... })

// 3. Deposit to another protocol
spell.add({ connector: 'AAVE-V3-A', method: 'deposit', ... })

await spell.cast()

Connector Security

All connectors are audited and verified before deployment, but always:
  • Test on testnets first
  • Start with small amounts
  • Understand the underlying protocol risks
  • Review connector source code for critical operations

Verified Contracts

All official connectors are:
  • ✅ Open source
  • ✅ Audited by security firms
  • ✅ Deployed from verified code
  • ✅ Maintained by Instadapp team

Next Steps

View Connector Source

Browse connector implementations

Build Strategies

Learn how to combine connectors

Build docs developers (and LLMs) love