👻AaveV3Payback

Description

Action ID: 0x17683e81

Payback a token a user borrowed from an AaveV3 market.

SDK Action

    const aavePaybackAction = new dfs.actions.aaveV3.AaveV3PaybackAction(
        useOnDefaultMarket, market, amount, from, rateMode, tokenAddr, assetId, useOnBehalf, onBehalf
    );

Contract

This is a DFS STANDARD_ACTION.

User needs to approve the DSProxy to pull the tokenAddr tokens (fetched from assetId)

Input:

    /// @param amount Amount of tokens to be paid back
    /// @param from Where are we pulling the payback tokens amount from
    /// @param rateMode Type of borrow debt Stable: 1, Variable: 2
    /// @param assetId The id of the underlying asset to be repaid
    /// @param useDefaultMarket If true the action will inject aave default market
    /// @param useOnBehalf If true the action will inject _onBehalf addr
    /// @param market Address provider for specific market
    /// @param onBehalf For what user we are paying back the debt, defaults to proxy
    struct Params {
        uint256 amount;
        address from;
        uint8 rateMode;
        uint16 assetId;
        bool useDefaultMarket;
        bool useOnBehalf;
        address market;
        address onBehalf;
    }

Return value:

return bytes32(paybackAmount);

Events:

bytes memory logData = abi.encode(_market, tokenAddr, _amount, _rateMode, _from, _onBehalf)

emit ActionEvent("AaveV3Payback", logData);

logger.logActionDirectEvent("AaveV3Payback", logData);

Last updated