Morpho: Get Borrow APR
0x484428507A212cA56D71baa27Ca6089a6dB63a88

What this does

This plug computes a Morpho borrow APR by scaling a per-second borrow rate to an annual figure. It asks the caller for borrow_rate_per_second, the per-second borrow rate to annualize. It runs on demand, converting one year of 365 days into seconds and multiplying that span by the supplied rate. Doing this by hand or against a stale per-second rate produces an annual borrow figure that misstates the current cost of borrowing.

Actions · 4

  • Get duration
    Get as seconds
    Converts a count of time units into seconds.
  • Calculate
    Calculate
    Applies a binary arithmetic operation to two values and returns the result.
  • Set
    Set to
    Assigns a value to a named variable that later steps reference.
  • Bubble
    Bubble
    Surfaces a value as an output of this plug.

Related plugs · 8