Skip to content

Commit

Permalink
fix: remove protocol fee split
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathandiep committed Jun 28, 2024
1 parent 9927200 commit c9330bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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;
uint256 protocolFeeForRecipient = this.protocolFee();
rewardToken.safeTransfer(protocolFeeRecipient, protocolFeeForRecipient);

uint256 remainingBalanceForOwner = rewardToken.balanceOf(address(this)) - (referralClaimTotal - totalReferralsFeesClaimed);
Expand Down
6 changes: 3 additions & 3 deletions test/Quest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ contract TestQuest is Test, TestUtils, Errors, Events {
// simulate ETH from TOTAL_PARTICIPANTS claims
vm.deal(address(quest), (CLAIM_FEE * TOTAL_PARTICIPANTS * 2) / 3);

uint256 totalFees = calculateTotalProtocolFees(TOTAL_PARTICIPANTS, REWARD_AMOUNT_IN_WEI, QUEST_FEE) / 2;
uint256 totalFees = calculateTotalProtocolFees(TOTAL_PARTICIPANTS, REWARD_AMOUNT_IN_WEI, QUEST_FEE);
uint256 questBalance = SampleERC20(rewardTokenAddress).balanceOf(address(quest));
uint256 questBalanceMinusFees = questBalance - totalFees;

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

assertEq(
protocolFeeRecipientBalance,
quest.protocolFee() / 2,
quest.protocolFee(),
"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.protocolFee(),
"Protocol fee recipient should get their share of the rewards"
);

Expand Down

0 comments on commit c9330bc

Please sign in to comment.