feeIncentiveSubsidy function

BigInt feeIncentiveSubsidy(
  1. BigInt fee,
  2. BigInt feeIncentiveBalance
)

expiry_market::fee_incentive_subsidy_amount — a sponsor pays part of the trader's MINT fee, bounded by the expiry's remaining sponsored balance. Mints only; redeems pay in full.

Implementation

BigInt feeIncentiveSubsidy(BigInt fee, BigInt feeIncentiveBalance) {
  _assertUint(fee, 'fee');
  _assertUint(feeIncentiveBalance, 'feeIncentiveBalance');
  return _min(_mulDown(fee, FEE_INCENTIVE_SUBSIDY_RATE), feeIncentiveBalance);
}