Morpho: Get Borrow APR
0x484428507A212cA56D71baa27Ca6089a6dB63a88

What this does

This plug computes an annualized Morpho borrow APR from a per-second borrow rate. It asks the caller to supply borrow_rate_per_second at execution time. It fires on demand, multiplying that rate by the number of seconds in one year (365 days) and returning the product as borrow_apr. Computing the annualization by hand risks arithmetic errors or using a stale per-second rate, producing an APR that misstates current borrowing cost.

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