DeFi Saver
  • Introduction
  • Protocol
    • Core
      • DFS Registry
      • Strategy Executor
      • Recipe Executor
      • Safe Module Auth
      • Proxy Auth
      • Bot Auth
      • Strategy Storage
      • Sub Storage
      • Bundle Storage
    • Actions
    • Triggers
    • Strategies
    • TxSaver
    • Security & Audits
      • Pause Control
      • Admin access control
    • Deployed contracts
  • Deployed strategies
  • Deployed Actions
    • Exchange
      • DFS Sell
      • LimitSell
    • Flash loans
      • FLAction
    • Utils
      • ApproveToken
      • AutomationV2Unsub
      • ChangeProxyOwner
      • CreateSub
      • GasFeeTaker
      • GasFeeTakerL2
      • HandleAuth
      • KingClaim
      • MerklClaim
      • PermitToken
      • PullToken
      • RemoveTokenApproval
      • SDaiWrap
      • SDaiUnwrap
      • SendToken
      • SendTokenAndUnwrap
      • SendTokensAndUnwrap
      • SendTokens
      • StarknetClaim
      • SubInputs
      • SumInputs
      • ToggleSub
      • TokenBalance
      • TokenizedVaultAdapter
      • TransferNFT
      • UnwrapEth
      • UpdateSub
      • WrapEth
    • Checkers
      • AaveV2RatioCheck
      • AaveV3OpenRatioCheck
      • AaveV3RatioCheck
      • CompV2RatioCheck
      • CompV3RatioCheck
      • CurveUsdCollRatioCheck
      • FluidRatioCheck
      • LiquityRatioCheck
      • LiquityRatioIncreaseCheck
      • LiquityV2RatioCheck
      • LiquityV2TargetRatioCheck
      • McdRatioCheck
      • MorphoAaveV2RatioCheck
      • MorphoBlueRatioCheck
      • MorphoBlueTargetRatioCheck
      • SparkRatioCheck
    • Aave V2
      • AaveBorrow
      • AaveCollateralSwitch
      • AavePayback
      • AaveSupply
      • AaveWithdraw
      • AaveClaimAave
      • AaveClaimStkAave
      • AaveUnstake
    • Aave V3
      • AaveV3ATokenPayback
      • AaveV3Borrow
      • AaveV3ClaimRewards
      • AaveV3CollateralSwitch
      • AaveV3Payback
      • AaveV3SetEMode
      • AaveV3Withdraw
      • AaveV3Supply
      • GhoClaimAave
      • GhoUnstake
    • BProtocol
      • BprotocolLiquitySPDeposit
      • BprotocolLiquitySPWithdraw
    • Compound V2
      • CompGetDebt
      • CompCollateralSwitch
      • CompSupply
      • CompWithdraw
      • CompPayback
      • CompBorrow
      • CompClaim
    • Compound V3
      • CompV3Withdraw
      • CompV3Transfer
      • CompV3Supply
      • CompV3Payback
      • CompV3Claim
      • CompV3Borrow
      • CompV3Allow
    • Convex
      • ConvexDeposit
      • ConvexWithdraw
      • ConvexClaim
    • Chicken bonds
      • CBCreate
      • CBRedeem
      • CBChickenIn
      • CBChickenOut
      • CBCreateReboundSub
      • CBUpdateReboundSub
      • FetchBondId
    • âž°Curve
      • âž°CurveClaimFees
      • âž°CurveDeposit
      • âž°CurveGaugeDeposit
      • âž°CurveGaugeWithdraw
      • âž°CurveMintCrv
      • âž°CurveStethPoolDeposit
      • âž°CurveWithdraw
      • âž°CurveStethPoolWithdraw
    • âž¿CurveUsd
      • âž¿CurveUsdAdjust
      • âž¿CurveUsdBorrow
      • âž¿CurveUsdCreate
      • âž¿CurveUsdGetDebt
      • âž¿CurveUsdLevCreate
      • âž¿CurveUsdLevCreateTransient
      • âž¿CurveUsdPayback
      • âž¿CurveUsdRepay
      • âž¿CurveUsdRepayTransient
      • âž¿CurveUsdSelfLiquidate
      • âž¿CurveUsdSelfLiquidateWithColl
      • âž¿CrvUsdSelfLiqWithCollTransient
      • âž¿CurveUsdSupply
      • âž¿CurveUsdWithdraw
    • DyDx
      • DyDxWithdraw
    • Ether.Fi
      • EtherFiStake
      • EtherFiUnwrap
      • EtherFiWrap
    • EulerV2
      • EulerV2Borrow
      • EulerV2CollateralSwitch
      • EulerV2Payback
      • EulerV2PaybackWithShares
      • EulerV2PullDebt
      • EulerV2ReorderCollaterals
      • EulerV2Supply
      • EulerV2Withdraw
    • Fluid
      • FluidVaultT1Adjust
      • FluidVaultT1Borrow
      • FluidVaultT1Open
      • FluidVaultT1Payback
      • FluidVaultT1Supply
      • FluidVaultT1Withdraw
      • FluidClaim
    • GUni
      • GUniDeposit
      • GUniWithdraw
    • InstaDapp
      • InstPullTokens
    • Lido
      • LidoUnwrap
      • LidoWrap
      • LidoStake
    • Liquity
      • LiquityAdjust
      • LiquityBorrow
      • LiquityClaim
      • LiquityClose
      • LiquityEthGainToTrove
      • LiquityOpen
      • LiquityPayback
      • LiquityRedeem
      • LiquitySPDeposit
      • LiquitySPWithdraw
      • LiquityStake
      • LiquitySupply
      • LiquityUnstake
      • LiquityWithdraw
    • LiquityV2
      • LiquityV2Adjust
      • LiquityV2AdjustInterestRate
      • LiquityV2AdjustZombieTrove
      • LiquityV2Borrow
      • LiquityV2Claim
      • LiquityV2Close
      • LiquityV2Open
      • LiquityV2Payback
      • LiquityV2SPClaimColl
      • LiquityV2SPDeposit
      • LiquityV2SPWithdraw
      • LiquityV2Supply
      • LiquityV2Withdraw
    • LlamaLend
      • LlamaLendBoost
      • LlamaLendBorrow
      • LlamaLendCreate
      • LlamaLendGetDebt
      • LlamaLendLevCreate
      • LlamaLendPayback
      • LlamaLendRepay
      • LlamaLendSelfLiquidate
      • LlamaLendSelfLiquidateWithColl
      • LlamaLendSupply
      • LlamaLendWithdraw
    • LSV
      • LSVBorrow
      • LSVPayback
      • LSVSupply
      • LSVWithdraw
    • Maker
      • McdBoostComposite
      • McdClaim
      • McdDsrDeposit
      • McdDsrWithdraw
      • McdGenerate
      • McdGive
      • McdMerge
      • McdOpen
      • McdPayback
      • McdRatio
      • McdRepayComposite
      • McdSupply
      • McdTokenConverter
      • McdWithdraw
    • MorphoOptimizers
      • AaveV2
        • MorphoAaveV2Borrow
        • MorphoAaveV2Payback
        • MorphoAaveV2Supply
        • MorphoAaveV2Withdraw
      • AaveV3
        • MorphoAaveV3Borrow
        • MorphoAaveV3Payback
        • MorphoAaveV3SetManager
        • MorphoAaveV3Supply
        • MorphoAaveV3Withdraw
      • MorphoClaim
    • MorphoBlue
      • MorphoBlueBorrow
      • MorphoBlueClaim
      • MorphoBluePayback
      • MorphoBlueReallocateLiquidity
      • MorphoBlueSetAuth
      • MorphoBlueSetAuthWithSig
      • MorphoBlueSupply
      • MorphoBlueSupplyCollateral
      • MorphoBlueWithdraw
      • MorphoBlueWithdrawCollateral
      • MorphoTokenWrap
    • Reflexer
      • ReflexerOpen
      • ReflexerPayback
      • ReflexerGenerate
      • ReflexerSupply
      • ReflexerWithdraw
      • ReflexerWithdrawStuckFunds
    • Renzo
      • RenzoStake
    • Sky
      • SkyClaimRewards
      • SkyStake
      • SkyUnstake
    • Spark
      • SparkBorrow
      • SparkClaimRewards
      • SparkCollateralSwitch
      • SparkPayback
      • SparkSetEMode
      • SparkSpTokenPayback
      • SparkSupply
      • SparkSwapBorrowRateMode
      • SparkWithdraw
    • Uniswap V2
      • UniWithdraw
      • UniSupply
    • Uniswap V3
      • UniCreatePoolV3
      • UniMintV3
      • UniSupplyV3
      • UniCollectV3
      • UniWithdrawV3
    • Yearn
      • YearnWithdraw
      • YearnSupply
  • Deployed Triggers
    • Utils
      • ChainlinkPriceTrigger
      • ClosePriceTrigger
      • GasPriceTrigger
      • OffchainPriceTrigger
      • Token Balance
      • Timestamp
      • TrailingStopTrigger
    • AaveV2
      • AaveV2RatioTrigger
    • AaveV3
      • AaveV3QuotePriceTrigger
      • AaveV3RatioTrigger
      • AaveV3TrailingQuotePriceTrigger
    • Chicken bonds
      • CBReboundTrigger
    • Compound
      • CompoundRatioTrigger
    • CompoundV3
      • CompoundV3RatioTrigger
    • âž¿CurveUsd
      • âž¿CurveUsdCollRatioTrigger
      • âž¿CurveUsdHealthRatioTrigger
      • âž¿CurveUsdSoftLiquidationTrigger
      • âž¿CurveUsdBorrowRateTrigger
    • Fluid
      • FluidRatioTrigger
    • Liquity
      • LiquityDebtInFrontTrigger
      • LiquityRatioTrigger
      • LiquityDebtInFrontWithLimitTrigger
    • LiquityV2
      • LiquityV2QuotePriceTrigger
      • LiquityV2RatioTrigger
    • Maker
      • McdRatioTrigger
    • MorphoOptimizers
      • MorphoAaveV2RatioTrigger
    • MorphoBlue
      • MorphoBluePriceTrigger
      • MorphoBlueRatioTrigger
    • Reflexer
      • ReflexerRatioTrigger
    • Spark
      • SparkQuotePriceTrigger
      • SparkRatioTriggre
Powered by GitBook
On this page
  • Description
  • Action ID
  • SDK Action
  • Action Type
  • Input Parameters
  • Return Value
  • Events and Logs

Was this helpful?

  1. Deployed Actions
  2. Spark

SparkSpTokenPayback

Description

Allows user to repay with spTokens of the underlying debt asset eg. Pay DAI debt using spDAI tokens.

Notes

Allows user to repay with spTokens of the underlying debt asset eg. Pay DAI debt using spDAI tokens.

Action ID

0xe673c4c4

SDK Action

const sparkSpTokenPaybackAction = new dfs.actions.spark.SparkSpTokenPaybackAction(
    useDefaultMarket,
    market,
    amount,
    from,
    rateMode,
    spTokenAddr,
    assetId
);

Action Type

STANDARD_ACTION

Input Parameters

    /// @param amount Amount of tokens to payback
    /// @param from Address to pull the payback tokens from
    /// @param rateMode Type of borrow debt [Stable: 1, Variable: 2]
    /// @param assetId The id of the token to be repaid
    /// @param useDefaultMarket Whether to use the default market
    /// @param market Address of the market to payback from
    struct Params {
        uint256 amount;
        address from;
        uint8 rateMode;
        uint16 assetId;
        bool useDefaultMarket;
        address market;
    }

Return Value

return bytes32(paybackAmount);

Events and Logs

emit ActionEvent("SparkSpTokenPayback", logData);
logger.logActionDirectEvent("SparkSpTokenPayback", logData);
bytes memory logData = abi.encode(params);
PreviousSparkSetEModeNextSparkSupply

Last updated 2 months ago

Was this helpful?