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
  • Trigger ID
  • SDK Action
  • Subscription Parameters
  • Calldata Parameters
  • IsChangeable

Was this helpful?

  1. Deployed Triggers
  2. Utils

ChainlinkPriceTrigger

Description

Trigger contract that verifies if current token price is over/under the price specified during subscription

Notes

If there's no chainlink oracle available for the token, price will be fetched from AaveV2, Spark and AaveV3 (in that order). Checks chainlink oracle for current price and triggers if it's in a correct state.

Trigger ID

0xac6bb72a

SDK Action

const chainLinkPriceTrigger = new dfs.triggers.ChainLinkPriceTrigger(
    tokenAddr,
    price,
    state
);

Subscription Parameters

/// @param tokenAddr address of the token which price we trigger with
/// @param price price in USD of the token that represents the triggerable point
/// @param state represents if we want the current price to be higher or lower than price param
struct SubParams {
    address tokenAddr;
    uint256 price;
    uint8 state;
}

Calldata Parameters

None

IsChangeable

false

PreviousUtilsNextClosePriceTrigger

Last updated 2 months ago

Was this helpful?