Skip to content

Commit

Permalink
fix: remove referral subtraction as it is no longer deducted from pro…
Browse files Browse the repository at this point in the history
…tocol fee
  • Loading branch information
jonathandiep committed Jun 26, 2024
1 parent abe37c9 commit f6ec43b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/Quest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ contract Quest is ReentrancyGuardUpgradeable, PausableUpgradeable, Ownable, IQue
protocolFeeRecipient.safeTransferETH(protocolPayout);

// transfer reward tokens
uint256 protocolFeeForRecipient = (this.protocolFee() / 2) - referralClaimTotal;
uint256 protocolFeeForRecipient = this.protocolFee() / 2;
rewardToken.safeTransfer(protocolFeeRecipient, protocolFeeForRecipient);

uint256 remainingBalanceForOwner = rewardToken.balanceOf(address(this)) - (referralClaimTotal - totalReferralsFeesClaimed);
Expand Down
4 changes: 2 additions & 2 deletions test/Quest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ contract TestQuest is Test, TestUtils, Errors, Events {

assertEq(
protocolFeeRecipientBalance,
(quest.protocolFee() / 2) - quest.referralClaimTotal(),
quest.protocolFee() / 2,
"Protocol fee recipient should get their share of the rewards"
);

Expand Down Expand Up @@ -497,7 +497,7 @@ contract TestQuest is Test, TestUtils, Errors, Events {

assertEq(
protocolFeeRecipientBalance,
(quest.protocolFee() / 2) - quest.referralClaimTotal(),
quest.protocolFee() / 2,
"Protocol fee recipient should get their share of the rewards"
);

Expand Down

0 comments on commit f6ec43b

Please sign in to comment.