CollateralSufficient
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CollateralSufficient.type
Members list
Value members
Concrete methods
Calculates the required collateral amount based on the transaction fee and collateral percentage from protocol parameters.
Calculates the required collateral amount based on the transaction fee and collateral percentage from protocol parameters.
Value parameters
- collateralPercentage
-
the collateral percentage from protocol parameters
- fee
-
the transaction fee
Attributes
- Returns
-
the required collateral amount
Checks if the actual collateral amount is sufficient according to the protocol's collateral percentage requirement.
Checks if the actual collateral amount is sufficient according to the protocol's collateral percentage requirement.
The collateral is considered sufficient if: actualCollateral * 100 >= fee * collateralPercentage
Value parameters
- actualTotalSumOfCollateralCoins
-
the actual sum of all collateral input coins
- collateralPercentage
-
the collateral percentage from protocol parameters (e.g., 150 means 150%)
- transactionFee
-
the transaction fee
Attributes
- Returns
-
true if the collateral is sufficient, false otherwise