Skip to content

Commit

Permalink
Merge pull request #233 from Axis-Fi/referrer-update
Browse files Browse the repository at this point in the history
fix: remove check preventing seller from being referrer
  • Loading branch information
Oighty authored Aug 21, 2024
2 parents ccc196d + 230d373 commit bab5431
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/AtomicAuctionHouse.sol
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ contract AtomicAuctionHouse is IAtomicAuctionHouse, AuctionHouse {
lotFees[params_.lotId].protocolFee,
lotFees[params_.lotId].referrerFee,
params_.referrer,
routing.seller,
ERC20(routing.quoteToken),
params_.amount
);
Expand Down
1 change: 0 additions & 1 deletion src/BatchAuctionHouse.sol
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ contract BatchAuctionHouse is IBatchAuctionHouse, AuctionHouse {
protocolFee,
referrerFee,
bidClaim.referrer,
routing.seller,
quoteToken,
bidClaim.paid - bidClaim.refund // refund is included in paid
);
Expand Down
7 changes: 2 additions & 5 deletions src/bases/AuctionHouse.sol
Original file line number Diff line number Diff line change
Expand Up @@ -606,21 +606,18 @@ abstract contract AuctionHouse is IAuctionHouse, WithModules, ReentrancyGuard, F
/// @param protocolFee_ The fee charged by the protocol
/// @param referrerFee_ The fee charged by the referrer
/// @param referrer_ The address of the referrer
/// @param seller_ The address of the seller
/// @param quoteToken_ The quote token
/// @param amount_ The amount of quote tokens
function _allocateQuoteFees(
uint48 protocolFee_,
uint48 referrerFee_,
address referrer_,
address seller_,
ERC20 quoteToken_,
uint256 amount_
) internal returns (uint256 totalFees) {
// Calculate fees for purchase
(uint256 toReferrer, uint256 toProtocol) = calculateQuoteFees(
protocolFee_, referrerFee_, referrer_ != address(0) && referrer_ != seller_, amount_
);
(uint256 toReferrer, uint256 toProtocol) =
calculateQuoteFees(protocolFee_, referrerFee_, referrer_ != address(0), amount_);

// Update fee balances if non-zero
if (toReferrer > 0) rewards[referrer_][quoteToken_] += toReferrer;
Expand Down

0 comments on commit bab5431

Please sign in to comment.