BENQI Health Factor Alert
Worried about Liquidations? Sleep easy.
Last updated
Worried about Liquidations? Sleep easy.
Last updated
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.
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.
Type: See Triggers, select Poll Function because we want to periodically check our loan health factor.
Network: BENQI is on Avalanche
Contract Address: We've created a simple helper contract that takes a users address and returns their health factor: 0xeD08DBb806455ae8CE9dF57770AE7268be058DC2
Poll Period: This is the how often the health factor is checked, in blocks. Let's set it to 100 blocks (every few minutes)
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 (0x486Af39519B4Dc9a7fCcd318217352830E8AD9b4) and YOUR ADDRESS for the second argument.
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).
Here we'll setup a notification to a discord channel. Detail description of message can be found here
Webhook URL: See this guide
Display Name: BENQI Health Factor Alert!
Avatar URL: Let's use the BENQI Logo https://i.seadn.io/gcs/files/f3564ef33373939b024fb791f21ec37b.png?auto=format&w=1000
Message: Here is a detailed description of message formatting in DeNotify. Enter the following:
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!
You can now sleep easy, knowing you'll get an alert when your loan is at risk.
Please submit feedback, bug reports or feature requests here, and share DeNotify with your friends!