Connectors are standard proxy logics contract that let DeFi Smart Account (DSA) interact with various smart contracts, and make the important actions accessible like cross protocol interoperability.
DSAs are powerful because they can easily be extended with connectors. Every new connector that is added is immediately usable by any developer building on top of DSAs. Connectors can either be base connectors to protocols, auth connectors, higher level connectors with more specific use cases like optimized lending, or connectors to native liquidity pools.
You can create a PR to request a support for specific protocol or external contracts. The process to add a new connector is explained here. Following is the list of all the supported connectors. Following is the list of all the primary connectors used to cast spells:
Read this post to learn about getId and setId used in the connectors
Add an address authority
authority
- Address of the authority to add
Remove an address authority
authority
- Address of the authority to remove
Deposit a token or ETH to DSA.
erc20
- Address of the token to deposit. ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
amt
- Amount of token to deposit
In case of an ERC20 Token, allowance must be given to DSA before depositing
Withdraw a token or ETH from DSA.
erc20
- Address of the token to withdraw. ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
amt
- Amount of token to withdraw
Open a Maker vault of the collateralType
. E.g. "ETH-A", "USDC-B", etc...
Close a Maker vault
vault
- Vault ID (Use 0 for last opened vault)
Deposit collateral to a Maker vault.
vault
- Vault ID (Use 0 for last opened vault)
amt
- Amount of collteral to deposit
Withdraw collateral from a Maker vault.
vault
- Vault ID (Use 0 for last opened vault)
amt
- Amount of collteral to withdraw
Borrow DAI from a Maker vault.
vault
- Vault ID (Use 0 for last opened vault)
amt
- Amount of DAI to borrow
Payback DAI to a Maker vault.
vault
- Vault ID (Use 0 for last opened vault)
amt
- Amount of DAI to payback
Withdraw leftover collateral after liquidation.
vault
- Vault ID (Use 0 for last opened vault)
amt
- Amount of collateral to withdraw
depositAndBorrow(vault, depositAmt, borrowAmt, getIdDeposit, getIdBorrow, setIdDeposit, setIdBorrow)
Deposit collateral & borrow DAI from a vault.
vault
- Vault ID (Use 0 for last opened vault)
depositAmt
- Amount of collateral to deposit
borrowAmt
- Amount of DAI to borrow
Deposit token to Compound.
token
- Address of the token to deposit
amt
- Amount of token to deposit
Withdraw token from Compound.
token
- Address of the token to withdraw
amt
- Amount of token to withdraw
Borrow token from Compound.
token
- Address of the token to borrow
amt
- Amount of token to borrow
Payback debt to Compound.
token
- Address of the token to payback
amt
- Amount of token to payback
Claim unclaimed COMP
Claim unclaimed COMP
tokens
- List of tokens supplied or borrowed
Claim unclaimed COMP
supplyTokens
- List of tokens supplied
borrowTokens
- List of tokens borrowed
Delegate COMP votes
delegatee
- Address of the delegatee
Deposit token to Aave.
token
- Address of the token to deposit
amt
- Amount of token to deposit
Withdraw token from Aave.
token
- Address of the token to withdraw
amt
- Amount of token to withdraw
Borrow token from Aave.
token
- Address of the token to borrow
amt
- Amount of token to borrow
Payback debt to Aave.
token
- Address of the token to payback
amt
- Amount of token to payback
Deposit token to Aave.
token
- Address of the token to deposit
amt
- Amount of token to deposit
Withdraw token from Aave.
token
- Address of the token to withdraw
amt
- Amount of token to withdraw
Borrow token from Aave.
token
- Address of the token to borrow
amt
- Amount of token to borrow
rateMode
- Borrow interest rate mode (1 = Stable & 2 = Variable)
Payback debt to Aave.
token
- Address of the token to payback
amt
- Amount of token to payback
rateMode
- Borrow interest rate mode (1 = Stable & 2 = Variable)
Deposit token to dYdX.
token
- Address of the token to deposit
amt
- Amount of token to deposit
Withdraw token from dYdX.
token
- Address of the token to withdraw
amt
- Amount of token to withdraw
Borrow token from dYdX.
token
- Address of the token to borrow
amt
- Amount of token to borrow
Payback debt to dYdX.
token
- Address of the token to payback
amt
- Amount of token to payback
Deposit liquidity to tokenA/tokenB pool
tokenA
- Address of token A
tokenB
- Address of token B
amtA
- Amount of token A to deposit
unitAmt
- Unit amount of amtB/amtA with slippage.
slippage
- Slippage amount in wei
Withdraw liquidity from tokenA/tokenB pool
tokenA
- Address of token A
tokenB
- Address of token B
uniAmt
- Amount of LP tokens to withdraw
unitAmtA
- Unit amount of amtA/uniAmt with slippage.
unitAmtB
- Unit amount of amtB/uniAmt with slippage.
Buy a token/ETH
buyAddr
- Address of the buying token
sellAddr
- Address of the selling token
buyAmt
- Amount of tokens to buy
unitAmt
- Unit amount of sellAmt/buyAmt with slippage
Sell a token/ETH
buyAddr
- Address of the buying token
sellAddr
- Address of the selling token
sellAmt
- Amount of tokens to sell
unitAmt
- Unit amount of buyAmt/sellAmt with slippage
Sell ETH/ERC20 using 1proto
buyAddr
- Address of the buying token
sellAddr
- Address of the selling token
sellAmt
- Amount of tokens to sell
unitAmt
- Unit amount of buyAmt/sellAmt with slippage
Sell ETH/ERC20 using 1proto
buyAddr
- Address of the buying token
sellAddr
- Address of the selling token
sellAmt
- Amount of tokens to sell
unitAmt
- Unit amount of buyAmt/sellAmt with slippage
[]distribution
- Distribution of swap across different dex.
disableDexes
- Disable a dex. (To disable none: 0)
Sell ETH/ERC20 using 1inch
Use 1Inch API for calldata
buyAddr
- Address of the buying token
sellAddr
- Address of the selling token
sellAmt
- Amount of tokens to sell
unitAmt
- Unit amount of buyAmt/sellAmt with slippage
callData
- Data from 1inch API