This plug computes a Morpho position's health factor by multiplying collateral_value by lltv and dividing by debt, rounding down. It asks the caller for collateral_value, lltv, and debt at execution time. It requires debt to be above zero before computing, since a zero debt would leave the division unresolved. Computing this by hand or reading it off a stale collateral, lltv, or debt figure yields a health factor that misstates how close the position sits to liquidation.
Actions · 6
Is
Compares two values with a chosen operator and returns a boolean.
Setto
Assigns a value to a named variable that later steps reference.
Steers control flow by comparing two values: branch, loop, or require the condition holds.
Calculatetimesdividedbyrounded
Multiplies two values and divides by a third in one step, rounding up or down.
Setto
Assigns a value to a named variable that later steps reference.
Bubble
Surfaces a value as an output of this plug.
Related plugs · 8
Not ready to run as it stands: it waits on values or a position of your own.