Spark on Ethereum
Deployments
Action: deposit
Parameters
Name | Type | Description |
---|---|---|
targets | string[] (required) | ETH | DSR_sDAI | SKY_USDS | Token symbols | Token addresses |
Target: ERC-20
For targets that are ERC-20 tokens, the following functions are allowed:
TARGET
below refers to the ERC-20 token address of each element given in
targets
.
TARGET · approve
Approve SparkLendingPoolV3
to spend TARGET
tokens on behalf of the avatar.
-
Contract:
TARGET
-
Function:
approve(address,uint256)
Parameter Constraint spender
equal to SparkLendingPoolV3
amount
-
SparkLendingPoolV3 · supply
Deposit TARGET
and receive spToken
tokens in exchange.
-
Contract:
SparkLendingPoolV3
-
Function:
supply(address,uint256,address,uint16)
Parameter Constraint asset
equal to TARGET
amount
- onBehalfOf
equal to AVATAR
referralCode
-
SparkLendingPoolV3 · setUserUseReserveAsCollateral
Set/unset deposited asset as collateral.
-
Contract:
SparkLendingPoolV3
-
Function:
setUserUseReserveAsCollateral(address,bool)
Parameter Constraint asset
equal to TARGET
useAsCollateral
-
SparkLendingPoolV3 · withdraw
Redeem spToken
and withdraw TARGET
tokens.
-
Contract:
SparkLendingPoolV3
-
Function:
withdraw(address,uint256,address)
Parameter Constraint asset
equal to TARGET
amount
- to
equal to AVATAR
RewardsController · claimRewards
Claim rewards.
-
Contract:
RewardsController
-
Function:
claimRewards(address[],uint256,address,address)
Parameter Constraint assets
- amount
- to
equal to AVATAR
reward
-
RewardsController · claimAllRewards
Claim all rewards.
-
Contract:
RewardsController
-
Function:
claimAllRewards(address[],address)
Parameter Constraint assets
- to
equal to AVATAR
Target: ETH
For "ETH"
as an element of targets
, the following functions are allowed:
spWETH · approve
Approve WrappedTokenGatewayV3
to spend spWETH
tokens on behalf of the avatar.
-
Contract:
spWETH
-
Function:
approve(address,uint256)
Parameter Constraint spender
equal to WrappedTokenGatewayV3
amount
-
WrappedTokenGatewayV3 · depositETH
Deposit ETH and receive spWETH
tokens in exchange.
-
Contract:
WrappedTokenGatewayV3
-
Function:
depositETH(address,address,uint16)
Ξ allow sending ETHParameter Constraint address
equal to SparkLendingPoolV3
onBehalfOf
equal to AVATAR
referralCode
-
SparkLendingPoolV3 · setUserUseReserveAsCollateral
Set/unset deposited asset as collateral.
-
Contract:
SparkLendingPoolV3
-
Function:
setUserUseReserveAsCollateral(address,bool)
Parameter Constraint asset
equal to TARGET
useAsCollateral
-
WrappedTokenGatewayV3 · withdrawETH
Redeem spWETH
and withdraw ETH tokens.
-
Contract:
WrappedTokenGatewayV3
-
Function:
withdrawETH(address,uint256,address)
Parameter Constraint address
equal to SparkLendingPoolV3
amount
- to
equal to AVATAR
RewardsController · claimRewards
Claim rewards.
-
Contract:
RewardsController
-
Function:
claimRewards(address[],uint256,address,address)
Parameter Constraint assets
- amount
- to
equal to AVATAR
reward
-
RewardsController · claimAllRewards
Claim all rewards.
-
Contract:
RewardsController
-
Function:
claimAllRewards(address[],address)
Parameter Constraint assets
- to
equal to AVATAR
Target: DSR_sDAI
DAI · approve
Approve sDAI
to spend DAI
tokens on behalf of the avatar.
-
Contract:
DAI
-
Function:
approve(address,uint256)
Parameter Constraint spender
equal to sDAI
amount
-
sDAI · deposit
Deposit DAI
and receive sDAI
tokens in exchange.
-
Contract:
sDAI
-
Function:
deposit(uint256,address)
Parameter Constraint assets
- receiver
equal to AVATAR
sDAI · redeem
Redeem sDAI
and withdraw DAI
.
-
Contract:
sDAI
-
Function:
redeem(uint256,address,address)
Parameter Constraint shares
- receiver
equal to AVATAR
owner
equal to AVATAR
sDAI · withdraw
Redeem sDAI
and withdraw DAI
tokens.
-
Contract:
sDAI
-
Function:
withdraw(uint256,address,address)
Parameter Constraint shares
- receiver
equal to AVATAR
owner
equal to AVATAR
Target: SKY_USDS
DAI · approve
Approve MigrationActions
to spend DAI
tokens on behalf of the avatar.
-
Contract:
DAI
-
Function:
approve(address,uint256)
Parameter Constraint spender
equal to MigrationActions
amount
-
USDS · approve - MigrationActions as spender
Approve MigrationActions
to spend USDS
tokens on behalf of the avatar.
-
Contract:
USDS
-
Function:
approve(address,uint256)
Parameter Constraint spender
equal to MigrationActions
amount
-
USDS · approve - sUSDS as spender
Approve sUSDS
to spend USDS
tokens on behalf of the avatar.
-
Contract:
USDS
-
Function:
approve(address,uint256)
Parameter Constraint spender
equal to sUSDS
amount
-
MigrationActions · migrateDAIToUSDS
Burns DAI
and mints USDS
tokens for the receiver.
-
Contract:
MigrationActions
-
Function:
migrateDAIToUSDS(address,uint256)
Parameter Constraint receiver
equal to AVATAR
assetsIn
-
MigrationActions · migrateDAIToSUSDS
Burns DAI
and mints sUSDS
tokens for the receiver.
-
Contract:
MigrationActions
-
Function:
migrateDAIToSUSDS(address,uint256)
Parameter Constraint receiver
equal to AVATAR
assetsIn
-
MigrationActions · downgradeUSDSToDAI
Burns USDS
and mints DAI
tokens for the receiver.
-
Contract:
MigrationActions
-
Function:
downgradeUSDSToDAI(address,uint256)
Parameter Constraint receiver
equal to AVATAR
assetsIn
-
sUSDS · deposit
Deposit USDS
and receive sUSDS
tokens in exchange.
-
Contract:
sUSDS
-
Function:
deposit(uint256,address)
Parameter Constraint assets
- receiver
equal to AVATAR
sUSDS · withdraw
Redeem sUSDS
and withdraw USDS
tokens.
-
Contract:
sUSDS
-
Function:
withdraw(uint256,address,address)
Parameter Constraint assets
- receiver
equal to AVATAR
owner
equal to AVATAR
sUSDS · redeem
Redeem sUSDS
and withdraw USDS
tokens.
-
Contract:
sUSDS
-
Function:
redeem(uint256,address,address)
Parameter Constraint shares
- receiver
equal to AVATAR
owner
equal to AVATAR
Action: borrow
Parameters:
Name | Type | Description |
---|---|---|
targets | string[] (required) | ETH | Token symbols | Token addresses |
Target: ERC-20
For targets that are ERC-20 tokens, the following functions are allowed:
TARGET
below refers to the ERC-20 token address of each element given in
targets
.
TARGET · approve
Approve SparkLendingPoolV3
to spend TARGET
tokens on behalf of the avatar.
-
Contract:
TARGET
-
Function:
approve(address,uint256)
Parameter Constraint spender
equal to SparkLendingPoolV3
amount
-
SparkLendingPoolV3 · borrow
Receive TARGET
and receive debtToken
tokens.
-
Contract:
SparkLendingPoolV3
-
Function:
borrow(address,uint256,uint256,uint16,address)
Parameter Constraint asset
equal to TARGET
amount
- interestRateMode
- referralCode
- onBehalfOf
equal to AVATAR
SparkLendingPoolV3 · repay
Repay borrowed TARGET
tokens.
-
Contract:
SparkLendingPoolV3
-
Function:
repay(address,uint256,uint256,address)
Parameter Constraint asset
equal to TARGET
amount
- rateMode
- onBehalfOf
equal to AVATAR
Target: ETH
For "ETH"
as an element of targets
, the following functions are allowed:
variableDebtWETH · approveDelegation
Set the amount of allowance for WrappedTokenGatewayV3
to borrow variableDebtWETH
tokens.
-
Contract:
variableDebtWETH
-
Function:
approveDelegation(address,uint256)
Parameter Constraint delegatee
equal to WrappedTokenGatewayV3
amount
-
WrappedTokenGatewayV3 · borrowETH
Receive ETH and variableDebtWETH
tokens.
-
Contract:
WrappedTokenGatewayV3
-
Function:
borrowETH(address,uint256,uint256,uint16)
Parameter Constraint address
equal to AaveLendingPoolV3
amount
- interestRateMode
- referralCode
-
WrappedTokenGatewayV3 · repayETH
Repay borrowed ETH.
-
Contract:
WrappedTokenGatewayV3
-
Function:
repayETH(address,uint256,uint256,address)
Ξ allow sending ETHParameter Constraint address
equal to AaveLendingPoolV3
amount
- rateMode
- onBehalfOf
equal to AVATAR