ITransferValidator
This interface is intended for validating the solvency of an account when transfers occur.
Functions
validateOnUpdate
Validates the solvency of an account for a given token transfer operation.
Implementation should properly protect against any creation of new debt or transfer of existing debt or collateral that would leave any individual address with insufficient collateral to cover all debts.
function validateOnUpdate(address validate, address update, bool alwaysUpdate) external;
Parameters
| Name | Type | Description |
|---|---|---|
validate | address | The address of the account being checked for solvency and having its saturation updated |
update | address | The address of the account having its saturation updated |
alwaysUpdate | bool | Whether to always update the saturation, even if the account is not borrowing |
tokens
Return the IAmmalgamERC20 token corresponding to the token type
function tokens(
uint256 tokenType
) external view returns (IAmmalgamERC20);
Parameters
| Name | Type | Description |
|---|---|---|
tokenType | uint256 | The type of token for which the scaler is being computed. Can be one of BORROW_X, DEPOSIT_X, BORROW_Y, DEPOSIT_Y, BORROW_L, or DEPOSIT_L. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | IAmmalgamERC20 | The IAmmalgamERC20 token |