Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove check preventing seller from being referrer #233

Merged
merged 5 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading