Inherits: IContinuousIndexing, IERC712
Author: M^0 Labs
Updates collateral for minters
Parameters
collateral
uint256
The amount of collateral
retrievalIds
uint256[]
The list of active proposeRetrieval requests to close
metadataHash
bytes32
The hash of metadata of the collateral update, reserved for future informational use
validators
address[]
The list of validators
timestamps
uint256[]
The list of timestamps of validators' signatures
signatures
bytes[]
The list of signatures
Returns
minTimestamp
uint40
The minimum timestamp of all validators' signatures
Proposes retrieval of minter's off-chain collateral
Parameters
collateral
uint256
The amount of collateral to retrieve
Returns
retrievalId
uint48
The unique id of created retrieval proposal
Proposes minting of M tokens
Parameters
amount
uint256
The amount of M tokens to mint
destination
address
The address to mint to
Returns
mintId
uint48
The unique id of created mint proposal
Executes minting of M tokens
Parameters
mintId
uint256
The id of outstanding mint proposal for minter
Returns
principalAmount
uint112
The amount of principal of owed M minted.
amount
uint240
The amount of M tokens minted.
Burns M tokens
If amount to burn is greater than minter's owedM including penalties, burn all up to owedM.
Parameters
minter
address
The address of the minter to burn M tokens for.
maxAmount
uint256
The max amount of M tokens to burn.
Returns
principalAmount
uint112
The amount of principal of owed M burned.
amount
uint240
The amount of M tokens burned.
Burns M tokens
If amount to burn is greater than minter's owedM including penalties, burn all up to owedM.
Parameters
minter
address
The address of the minter to burn M tokens for.
maxPrincipalAmount
uint256
The max amount of principal of owed M to burn.
maxAmount
uint256
The max amount of M tokens to burn.
Returns
principalAmount
uint112
The amount of principal of owed M burned.
amount
uint240
The amount of M tokens burned.
Cancels minting request for selected minter by validator
Parameters
minter
address
The address of the minter to cancelMint minting request for
mintId
uint256
The id of outstanding mint request
Freezes minter
Parameters
minter
address
The address of the minter to freeze
Returns
frozenUntil
uint40
The timestamp until which minter is frozen
Activate an approved minter.
MUST revert if minter
is not recorded as an approved minter in TTG Registrar.
MUST revert if minter
has been deactivated.
Parameters
minter
address
The address of the minter to activate
Deactivates an active minter.
MUST revert if the minter is still approved.
MUST revert if the minter is not active.
Parameters
minter
address
The address of the minter to deactivate.
Returns
inactiveOwedM
uint240
The inactive owed M for the deactivated minter.
The address of M token
The address of TTG Registrar contract.
The address of TTG Vault contract.
The last saved value of Minter rate.
The principal of total owed M for all active minters.
The total owed M for all active minters.
The total owed M for all inactive minters.
The total owed M for all minters.
The difference between total owed M and M token total supply.
The principal of active owed M of minter.
The active owed M of minter.
The max allowed active owed M of minter taking into account collateral amount and retrieval proposals.
This is the only present value that requires a uint256
since it is the result of a multiplication between a uint240
and a value that has a max of 65,000
(the mint ratio).
The inactive owed M of deactivated minter.
The collateral of a given minter.
The timestamp of the last collateral update of minter.
The timestamp after which an additional penalty for a missed update interval will be charged.
The timestamp after which the minter's collateral is assumed to be 0 due to a missed update.
The timestamp until which minter is already penalized for missed collateral updates.
The timestamp when minter
created their latest retrieval proposal.
Returns the last signature timestamp used by validator
to update collateral for minter
.
Parameters
minter
address
The address of the minter.
validator
address
The address of the validator.
Returns
<none>
uint256
The last signature timestamp used.
Returns the EIP-712 digest for updateCollateral method.
Parameters
minter
address
The address of the minter.
collateral
uint256
The amount of collateral.
retrievalIds
uint256[]
The list of outstanding collateral retrieval IDs to resolve.
metadataHash
bytes32
The hash of metadata of the collateral update, reserved for future informational use.
timestamp
uint256
The timestamp of the collateral update.
The mint proposal of minters, only 1 active proposal per minter
The amount of a pending retrieval request for an active minter.
The total amount of pending retrieval requests for an active minter.
The timestamp when minter becomes unfrozen after being frozen by validator.
Checks if minter was activated after approval by TTG
Checks if minter was deactivated after removal by TTG
Checks if minter was frozen by validator
Checks if minter was approved by TTG
Checks if validator was approved by TTG
The delay between mint proposal creation and its earliest execution.
The time while mint request can still be processed before it is considered expired.
The freeze time for minter.
The allowed activeOwedM to collateral ratio.
The % that defines penalty amount for missed collateral updates or excessive owedM value
The smart contract that defines the minter rate.
The interval that defines the required frequency of collateral updates.
The number of signatures required for successful collateral update.
Descaler for variables in basis points. Effectively, 100% in basis points.
Mint ratio cap. 650% in basis points.
Update collateral interval lower cap in seconds.
The EIP-712 typehash for the updateCollateral
method.
Emitted when M tokens are burned and an inactive minter's owed M balance decreased.
Parameters
minter
address
The address of the minter.
amount
uint240
The amount of M tokens burned.
payer
address
The address of the payer.
Emitted when M tokens are burned and an active minter's owed M balance decreased.
Parameters
minter
address
The address of the minter.
principalAmount
uint112
The principal amount of M tokens burned.
amount
uint240
The amount of M tokens burned.
payer
address
The address of the payer.
Emitted when a minter's collateral is updated.
Parameters
minter
address
Address of the minter
collateral
uint240
The latest amount of collateral
totalResolvedCollateralRetrieval
uint240
The total collateral amount of outstanding retrievals resolved.
metadataHash
bytes32
The hash of some metadata reserved for future informational use.
timestamp
uint40
The timestamp of the collateral update, minimum of given validators' signatures.
Emitted when a minter is activated.
Parameters
minter
address
Address of the minter that was activated
caller
address
Address who called the function
Emitted when a minter is deactivated.
Parameters
minter
address
Address of the minter that was deactivated.
inactiveOwedM
uint240
Amount of M tokens owed by the minter (in an inactive state).
caller
address
Address who called the function.
Emitted when a minter is frozen.
Parameters
minter
address
Address of the minter that was frozen
frozenUntil
uint40
Timestamp until the minter is frozen
Emitted when a mint proposal is canceled.
Parameters
mintId
uint48
The id of the canceled mint proposal.
minter
address
The address of the minter for which the mint was canceled.
canceller
address
The address of the validator who canceled the mint proposal.
Emitted when a mint proposal is executed.
Parameters
mintId
uint48
The id of the executed mint proposal.
minter
address
The address of the minter that executed the mint.
principalAmount
uint112
The principal amount of M tokens minted.
amount
uint240
The amount of M tokens minted.
Emitted when a mint proposal is created.
Parameters
mintId
uint48
The id of mint proposal.
minter
address
The address of the minter that proposed the mint.
amount
uint240
The amount of M tokens to mint.
destination
address
The address to mint to.
Emitted when a penalty is imposed on minter
for missed update collateral intervals.
Parameters
minter
address
The address of the minter.
missedIntervals
uint40
The number of update intervals missed.
penaltyAmount
uint240
The present amount of penalty charge.
Emitted when a penalty is imposed on minter
for undercollateralization.
Parameters
minter
address
The address of the minter.
excessOwedM
uint240
The present amount of owed M in excess of allowed owed M.
timeSpan
uint40
The span of time over which the undercollateralization penalty was applied.
penaltyAmount
uint240
The present amount of penalty charge.
Emitted when a collateral retrieval proposal is created.
Parameters
retrievalId
uint48
The id of retrieval proposal.
minter
address
The address of the minter.
amount
uint240
The amount of collateral to retrieve.
Emitted when a collateral retrieval proposal is resolved.
Parameters
retrievalId
uint48
The id of retrieval proposal.
minter
address
The address of the minter.
Emitted when calling activateMinter
with a minter who was previously deactivated.
Emitted when repay will burn more M than the repay specified.
Emitted when calling mintM
with a proposal that was created more than mintDelay + mintTTL
time ago.
Emitted when calling mintM
or proposeMint
by a minter who was frozen by validator.
Emitted when calling updateCollateral
with any validator timestamp in the future.
Emitted when calling a function only allowed for active minters.
Emitted when calling cancelMint
or mintM
with invalid mintId
.
Emitted when calling updateCollateral
if validators
addresses are not ordered in ascending order.
Emitted when calling activateMinter
if minter was not approved by TTG.
Emitted when calling cancelMint
or freezeMinter
if validator
was not approved by TTG.
Emitted when calling updateCollateral
if validatorThreshold
of signatures was not reached.
Emitted when principal of total owed M (active and inactive) will overflow a type(uint112).max
.
Emitted when calling mintM
if mintDelay
time has not passed yet.
Emitted when calling proposeRetrieval
if sum of all outstanding retrievals Plus new proposed retrieval amount is greater than collateral.
Emitted when calling updateCollateral
If validators
, signatures
, timestamps
lengths do not match.
Emitted when updating collateral with a timestamp earlier than allowed.
Emitted when calling updateCollateral
with any validator timestamp older than the last signature timestamp for that minter and validator.
Emitted when calling deactivateMinter
with a minter still approved in TTG Registrar.
Emitted when calling proposeMint
, mintM
, proposeRetrieval
If minter position becomes undercollateralized.
activeOwedM
is a uint256
because it may represent some resulting owed M from computations.
Emitted when calling burnM
if amount is 0.
Emitted in constructor if M Token is 0x0.
Emitted when calling proposeMint
if amount is 0.
Emitted when calling proposeMint
if destination is 0x0.
Emitted when calling proposeRetrieval
if collateral is 0.
Emitted in constructor if TTG Registrar is 0x0.
Emitted in constructor if TTG Distribution Vault is set to 0x0 in TTG Registrar.
Emitted when calling updateCollateral
with any validator timestamp of 0.