Inherits: IContinuousIndexing
Author: M^0 Labs
The latest updated index.
The latest updated rate.
The latest timestamp when the index was updated.
Constructs the ContinuousIndexing contract.
Updates the latest index and latest accrual time in storage.
Returns
currentIndex_
uint128
index The new stored index for computing present amounts from principal amounts.
The current index that would be written to storage if updateIndex
is called.
Returns the principal amount (rounded down) given the present amount, using the current index.
Parameters
presentAmount_
uint240
The present amount.
Returns
<none>
uint112
The principal amount rounded down.
Returns the principal amount (rounded up) given the present amount and an index.
Parameters
presentAmount_
uint240
The present amount.
Returns
<none>
uint112
The principal amount rounded up.
Returns the present amount (rounded down) given the principal amount and an index.
Parameters
principalAmount_
uint112
The principal amount.
index_
uint128
An index.
Returns
<none>
uint240
The present amount rounded down.
Returns the present amount (rounded up) given the principal amount and an index.
Parameters
principalAmount_
uint112
The principal amount.
index_
uint128
An index.
Returns
<none>
uint240
The present amount rounded up.
Returns the principal amount given the present amount, using the current index.
Parameters
presentAmount_
uint240
The present amount.
index_
uint128
An index.
Returns
<none>
uint112
The principal amount rounded down.
Returns the principal amount given the present amount, using the current index.
Parameters
presentAmount_
uint240
The present amount.
index_
uint128
An index.
Returns
<none>
uint112
The principal amount rounded up.
To be overridden by the inheriting contract to return the current rate.