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. Aave V3

AaveV3ATokenPayback

Description

Allows a user to repay with aTokens of the underlying debt asset eg. Pay DAI debt using aDAI tokens. This is a L2 specific action which has executeActionDirectL2() where a tightly packed data is sent.

Notes

User needs to approve its wallet to pull aTokens. If amount bigger than the current debt is sent just the max. debt amount will be pulled/paid.

Action ID

0x62c722e3

SDK Action

const aaveV3ATokenPaybackAction = new dfs.actions.aaveV3.AaveV3ATokenPaybackAction(
    useDefaultMarket,
    market,
    amount,
    from,
    rateMode,
    aTokenAddr,
    assetId
);

Action Type

STANDARD_ACTION

Input Parameters

    /// @param amount Amount of tokens to be paid back.
    /// @param from Address to send the payback tokens from.
    /// @param rateMode Rate mode.
    /// @param assetId Asset id.
    /// @param useDefaultMarket Whether to use the default market.
    /// @param market Aave Market address.
    struct Params {
        uint256 amount;
        address from;
        uint8 rateMode;
        uint16 assetId;
        bool useDefaultMarket;
        address market;
    }

Return Value

return bytes32(paybackAmount);

Events and Logs

emit ActionEvent("AaveV3ATokenPayback", logData);
logger.logActionDirectEvent("AaveV3ATokenPayback", logData);
bytes memory logData = abi.encode(params);
PreviousAave V3NextAaveV3Borrow

Last updated 2 months ago

Was this helpful?