# Functions
ApproxExponential is the taylor series expansion of e^x centered around x=0, truncated to the cubic term.
BorrowAPYInvariant checks that Borrow APY have all positive values.
ComputeCloseFactor derives the maximum portion of a borrower's current borrowedValue that can currently be repaid in a single liquidate transaction.
ComputeLiquidation takes the conditions preceding a liquidation and outputs the amounts of base token that should be repaid, collateral uToken burned, and reward token allocated as a result of the transaction, after accounting for limiting factors with as little rounding as possible.
ExchangeRatesInvariant checks that all denoms have an uToken exchange rate >= 1.
InefficientBorrowAmountInvariant checks that borrow amounts have all positive values This runs in O(N) time where N is the number of participating addresses, so it should not be enabled in production.
InefficientCollateralAmountInvariant checks that collateral amounts have all positive values.
InterestScalarsInvariant checks that all denoms have an interest scalar >= 1.
Interpolate takes a line defined by two points (xMin, yMin) and (xMax, yMax), then finds the y-value of the point on that line for an input x-value.
No description provided by the author
NewMigrator creates a Migrator.
NewMsgServerImpl returns an implementation of MsgServer for the x/leverage module.
No description provided by the author
RegisterInvariants registers the leverage module invariants.
ReserveAmountInvariant checks that reserve amounts have non-negative balances.
SupplyAPYInvariant checks that Supply APY have all positive values.
# Constants
180 seconds = 3 minutes.