ROBO LABS
  • About us
  • Denotify
    • DeNotify
      • Triggers
      • Notifications
        • Message Formatting
      • Helper Contracts
    • Guides
      • Account Balance Alert
      • Track Crypto Punk NFT Transfers
      • AAVE Health Factor Alert
      • BENQI Health Factor Alert
  • Arkiver
    • Arkiver
      • How It Works
      • Technical Guides
      • Examples
Powered by GitBook
On this page
  • Step 1. Fire up DeNotify and click "Add New Alert"
  • Step 2: Setup the Trigger
  • Step 3: Setup Notification
  • Voila
  1. Denotify
  2. Guides

BENQI Health Factor Alert

Worried about Liquidations? Sleep easy.

PreviousAAVE Health Factor AlertNextArkiver

Last updated 2 years ago

Do you check your phone regularly to find out if you're going to get liquidated? That sucks. We know. This alert will give you peace of mind that you're going to get a push notification if your loan is at risk of liquidation before it happens.

Step 1. Fire up DeNotify and click "Add New Alert"

Step 2: Setup the Trigger

Here's the TLDR first, but we'll explain it below

Name: This is just for you to identify the alert in your list of alerts.

Network: BENQI is on Avalanche

Poll Period: This is the how often the health factor is checked, in blocks. Let's set it to 100 blocks (every few minutes)

With Decimals: The helper contract returns the health factor with 18 decimals

Condition: We want a trigger when the health factor is below 1.1, so select Less Than

Compared With: This the constant the health factor will be compared to, we're choosing 1.1

Alert Behaviour: When the health factor drops below 1.1, we just want to be alerted once, so we chose Latched. If we chose Everytime, we would be alerted every poll period (100 blocks).

Step 3: Setup Notification

Display Name: BENQI Health Factor Alert!

**Warning, Health Factor Alert!!**
------------------------------
The health factor for address {fixedArgs_1} is {args_0 / 1e18}. 
I suggest you adjust your position!

This will yield a message similar to this:

Warning, Health Factor Alert!! ------------------------------- The health factor for address {fixedArgs_1} is {args_0 / 1e18}. I suggest you adjust your position!

Voila

You can now sleep easy, knowing you'll get an alert when your loan is at risk.

Type: See , select Poll Function because we want to periodically check our loan health factor.

Contract Address: We've created a simple that takes a users address and returns their health factor: 0xeD08DBb806455ae8CE9dF57770AE7268be058DC2

Function: this is the function of the contract we want to call. Select compHealthFactor and for the arguments use the comptroller address for the first and YOUR ADDRESS for the second argument.

Here we'll setup a notification to a discord channel. Detail description of message can be found

Webhook URL: See this

Avatar URL: Let's use the BENQI Logo

Message: Here is a detailed description of in DeNotify. Enter the following:

Please submit feedback, bug reports or feature requests , and share DeNotify with your friends!

Triggers
helper contract
(0x486Af39519B4Dc9a7fCcd318217352830E8AD9b4)
here
https://i.seadn.io/gcs/files/f3564ef33373939b024fb791f21ec37b.png?auto=format&w=1000
message formatting
here
guide