Learn
Ethereum

Spark on Ethereum

Deployments

NameAddress
SparkLendingPoolV30xC13e21B648A5Ee794902342038FF3aDAB66BE987 (opens in a new tab)
WrappedTokenGatewayV30xBD7D6a9ad7865463DE44B05F04559f65e3B11704 (opens in a new tab)
spWETH0x59cD1C87501baa753d0B5B5Ab5D8416A45cD71DB (opens in a new tab)
variableDebtWETH0x2e7576042566f8D6990e07A1B61Ad1efd86Ae70d (opens in a new tab)
sDAI0x83F20F44975D03b1b09e64809B757c47f942BEeA (opens in a new tab)
RewardsController0x4370D3b6C9588E02ce9D22e684387859c7Ff5b34 (opens in a new tab)
MigrationActions0xf86141a5657Cf52AEB3E30eBccA5Ad3a8f714B89 (opens in a new tab)
USDS0xdC035D45d973E3EC169d2276DDab16f1e407384F (opens in a new tab)
sUSDS0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD (opens in a new tab)

Action: deposit

Parameters

NameTypeDescription
targetsstring[] (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)

    ParameterConstraint
    spenderequal to SparkLendingPoolV3
    amount-

SparkLendingPoolV3 · supply

Deposit TARGET and receive spToken tokens in exchange.

  • Contract: SparkLendingPoolV3

  • Function: supply(address,uint256,address,uint16)

    ParameterConstraint
    assetequal to TARGET
    amount-
    onBehalfOfequal to AVATAR
    referralCode-

SparkLendingPoolV3 · setUserUseReserveAsCollateral

Set/unset deposited asset as collateral.

  • Contract: SparkLendingPoolV3

  • Function: setUserUseReserveAsCollateral(address,bool)

    ParameterConstraint
    assetequal to TARGET
    useAsCollateral-

SparkLendingPoolV3 · withdraw

Redeem spToken and withdraw TARGET tokens.

  • Contract: SparkLendingPoolV3

  • Function: withdraw(address,uint256,address)

    ParameterConstraint
    assetequal to TARGET
    amount-
    toequal to AVATAR

RewardsController · claimRewards

Claim rewards.

  • Contract: RewardsController

  • Function: claimRewards(address[],uint256,address,address)

    ParameterConstraint
    assets-
    amount-
    toequal to AVATAR
    reward-

RewardsController · claimAllRewards

Claim all rewards.

  • Contract: RewardsController

  • Function: claimAllRewards(address[],address)

    ParameterConstraint
    assets-
    toequal 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)

    ParameterConstraint
    spenderequal to WrappedTokenGatewayV3
    amount-

WrappedTokenGatewayV3 · depositETH

Deposit ETH and receive spWETH tokens in exchange.

  • Contract: WrappedTokenGatewayV3

  • Function: depositETH(address,address,uint16) Ξ allow sending ETH

    ParameterConstraint
    addressequal to SparkLendingPoolV3
    onBehalfOfequal to AVATAR
    referralCode-

SparkLendingPoolV3 · setUserUseReserveAsCollateral

Set/unset deposited asset as collateral.

  • Contract: SparkLendingPoolV3

  • Function: setUserUseReserveAsCollateral(address,bool)

    ParameterConstraint
    assetequal to TARGET
    useAsCollateral-

WrappedTokenGatewayV3 · withdrawETH

Redeem spWETH and withdraw ETH tokens.

  • Contract: WrappedTokenGatewayV3

  • Function: withdrawETH(address,uint256,address)

    ParameterConstraint
    addressequal to SparkLendingPoolV3
    amount-
    toequal to AVATAR

RewardsController · claimRewards

Claim rewards.

  • Contract: RewardsController

  • Function: claimRewards(address[],uint256,address,address)

    ParameterConstraint
    assets-
    amount-
    toequal to AVATAR
    reward-

RewardsController · claimAllRewards

Claim all rewards.

  • Contract: RewardsController

  • Function: claimAllRewards(address[],address)

    ParameterConstraint
    assets-
    toequal to AVATAR

Target: DSR_sDAI

DAI · approve

Approve sDAI to spend DAI tokens on behalf of the avatar.

  • Contract: DAI

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal to sDAI
    amount-

sDAI · deposit

Deposit DAI and receive sDAI tokens in exchange.

  • Contract: sDAI

  • Function: deposit(uint256,address)

    ParameterConstraint
    assets-
    receiverequal to AVATAR

sDAI · redeem

Redeem sDAI and withdraw DAI.

  • Contract: sDAI

  • Function: redeem(uint256,address,address)

    ParameterConstraint
    shares-
    receiverequal to AVATAR
    ownerequal to AVATAR

sDAI · withdraw

Redeem sDAI and withdraw DAI tokens.

  • Contract: sDAI

  • Function: withdraw(uint256,address,address)

    ParameterConstraint
    shares-
    receiverequal to AVATAR
    ownerequal to AVATAR

Target: SKY_USDS

DAI · approve

Approve MigrationActions to spend DAI tokens on behalf of the avatar.

  • Contract: DAI

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal 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)

    ParameterConstraint
    spenderequal 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)

    ParameterConstraint
    spenderequal to sUSDS
    amount-

MigrationActions · migrateDAIToUSDS

Burns DAI and mints USDS tokens for the receiver.

  • Contract: MigrationActions

  • Function: migrateDAIToUSDS(address,uint256)

    ParameterConstraint
    receiverequal to AVATAR
    assetsIn-

MigrationActions · migrateDAIToSUSDS

Burns DAI and mints sUSDS tokens for the receiver.

  • Contract: MigrationActions

  • Function: migrateDAIToSUSDS(address,uint256)

    ParameterConstraint
    receiverequal to AVATAR
    assetsIn-

MigrationActions · downgradeUSDSToDAI

Burns USDS and mints DAI tokens for the receiver.

  • Contract: MigrationActions

  • Function: downgradeUSDSToDAI(address,uint256)

    ParameterConstraint
    receiverequal to AVATAR
    assetsIn-

sUSDS · deposit

Deposit USDS and receive sUSDS tokens in exchange.

  • Contract: sUSDS

  • Function: deposit(uint256,address)

    ParameterConstraint
    assets-
    receiverequal to AVATAR

sUSDS · withdraw

Redeem sUSDS and withdraw USDS tokens.

  • Contract: sUSDS

  • Function: withdraw(uint256,address,address)

    ParameterConstraint
    assets-
    receiverequal to AVATAR
    ownerequal to AVATAR

sUSDS · redeem

Redeem sUSDS and withdraw USDS tokens.

  • Contract: sUSDS

  • Function: redeem(uint256,address,address)

    ParameterConstraint
    shares-
    receiverequal to AVATAR
    ownerequal to AVATAR

Action: borrow

Parameters:

NameTypeDescription
targetsstring[] (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)

    ParameterConstraint
    spenderequal to SparkLendingPoolV3
    amount-

SparkLendingPoolV3 · borrow

Receive TARGET and receive debtToken tokens.

  • Contract: SparkLendingPoolV3

  • Function: borrow(address,uint256,uint256,uint16,address)

    ParameterConstraint
    assetequal to TARGET
    amount-
    interestRateMode-
    referralCode-
    onBehalfOfequal to AVATAR

SparkLendingPoolV3 · repay

Repay borrowed TARGET tokens.

  • Contract: SparkLendingPoolV3

  • Function: repay(address,uint256,uint256,address)

    ParameterConstraint
    assetequal to TARGET
    amount-
    rateMode-
    onBehalfOfequal 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)

    ParameterConstraint
    delegateeequal to WrappedTokenGatewayV3
    amount-

WrappedTokenGatewayV3 · borrowETH

Receive ETH and variableDebtWETH tokens.

  • Contract: WrappedTokenGatewayV3

  • Function: borrowETH(address,uint256,uint256,uint16)

    ParameterConstraint
    addressequal to AaveLendingPoolV3
    amount-
    interestRateMode-
    referralCode-

WrappedTokenGatewayV3 · repayETH

Repay borrowed ETH.

  • Contract: WrappedTokenGatewayV3

  • Function: repayETH(address,uint256,uint256,address) Ξ allow sending ETH

    ParameterConstraint
    addressequal to AaveLendingPoolV3
    amount-
    rateMode-
    onBehalfOfequal to AVATAR