MCDRatioCheck

Description

Action ID: 0x39274269

Checks if ratio is in target range

SDK Action

const mcdRatioCheckAction = new dfs.actions.checkers.MakerRatioCheckAction(
        ratioState,
        checkTarget,
        targetRatio,
        vaultId,
        ratioActionPositionInRecipe,
    );

Contract

This is a DFS CHECK_ACTION.

2% offset acceptable

Input:

    /// @param ratioState Enum if we're doing a Boost or Repay strategy
    /// @param checkTarget True to check if we're in target range
    /// @param targetRatio Ratio that the strategy is supposed to hit (within allowed offset)
    /// @param vaultId Id of the MCD vault we're targeting
    /// @param startRatioIndex index in returnValues where ratio before actions is stored
    struct Params {
        RatioState ratioState;
        bool checkTarget;
        uint256 ratioTarget;
        uint256 vaultId;
        uint256 startRatioIndex;
    }

Return value:

return bytes32(inputData.ratioTarget);

Events:

emit ActionEvent("McdRatioCheck", abi.encode(inputData, currRatio));

Last updated