Skip to content

Commit

Permalink
Add comment on the two types of affiliate fees
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized committed Nov 24, 2023
1 parent 51a192b commit 83f02ac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contracts/modules/SuperMinterV1_1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,15 @@ contract SuperMinterV1_1 is ISuperMinterV1_1, EIP712 {
/* --------------------- AFFILIATE FEES --------------------- */

if (l.affiliated = _isAffiliatedWithProof(d, l.affiliate, p.affiliateProof)) {
// There are two kinds of affiliate fees:
// - The BPS based affiliateFee, which will be deducted from the artist's fee.
// - The per-mint flat affiliate incentive fee, which will be be deducted from the platform's fee.

// Deduct the BPS based affiliate fee from the artist's fee.
l.finalArtistFee -= f.affiliateFee;
// Deduct the affiliate incentive from the platform's fee.
l.finalPlatformFee -= f.affiliateIncentive;
// Sum up the BPS based affiliate fee and the affiliate incentive.
l.finalAffiliateFee = f.affiliateFee + f.affiliateIncentive;
affiliateFeesAccrued[p.affiliate] += l.finalAffiliateFee;
} else {
Expand Down

0 comments on commit 83f02ac

Please sign in to comment.