FCT_Tokenomics

Implements the tokenomics algorithm.

Process the FCT return struct (from the FCT_Engine) and returns payers and payees for the FCT_Actuator to use.

Main Functions

setFeesAndShares

function setFeesAndShares(
        uint16 baseFeesBPS,
        uint16 bonusFeesBPS,
        uint16 forFreeFeesBPS,
        uint16 activatorShare,
        uint16 builderShare,
        uint16 officialBuilderShare
) external onlyRole(DAO_ROLE)

Defines activation fees and payment split between the activator and the FCT builder.

calcPayments

 function calcPayments(
        PaymentIn memory paymentIn,
        bytes32 id,
        bytes memory data
    )
        external
        view
        returns (
            Payment[] memory paymentsOut,
            address builderOut,
            bytes32 nameHashOut
)

Calculates all fees for an FCT. Aggregates payments by adjacent payers. Returns a list of payers, effective gas for each one of them that represents the cumulative cost (base+fee+bonus), builder and activator shares, and the builder identity.

estimateExtraCommonGas

Returns the estimated gas for doing the actual payments, so it can be added to in advance to payers fees.

Last updated