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

Auction House Overhaul #12

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

mpeyfuss
Copy link
Member

@mpeyfuss mpeyfuss commented Dec 10, 2024

TLAuctionHouse has received a complete overhaul

  • Unified listing interface so that auctions and sales aren't configured separately
  • Distinguish primary and secondary sales via a creator lookup helper contract
  • Utilize a royalty lookup helper contract that wraps the Royalty Engine so that this can be deployed on chains where the Royalty Engine is not deployed
  • Bids and purchases now can specify an NFT recipient, allowing for cross-chain actions

Here is some documentation on the overhaul:
image
image
image

README.md Outdated Show resolved Hide resolved
Comment on lines +23 to +33
function getCreator(address nftAddress, uint256 /* tokenId */ ) external view returns (address) {
// first make sure nftAddress is a contract
if (nftAddress.code.length == 0) return address(0);

// passthrough for Ownable `owner` function, with more functionality planned in the future
try Ownable(nftAddress).owner() returns (address owner) {
return owner;
} catch {
return address(0);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like it can be easily abused, nothing enforces that the address returned by owner is the creator

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require a custom contract intended to circumvent this right? The other options are to always enforce royalties or to not enforce them. If you always enforce them, math gets kinda tricky for anyone doing exhibitions/collabs or if the royalty address is different from the artist address. If you don't enforce them on the contract, you have to rely on the frontend potentially passing in expected royalties or some other mechanism for determining primary vs secondary sale and paying out royalties. We've gotten push back from people running exhibitions where if royalties are paid on primary (which doesn't really make sense imo), it's too confusing. This felt like the best approach for standard nfts.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, i think its fine as long as the front end isnt relying on it. i mean overall i think that this space needs some work but given theres nothing better i think its okay as is

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah the frontend isn't relying on this for anything really. Right now it's mainly a placeholder contract that can be swapped out for something more robust in the future, like a registry wrapper or something.

src/helpers/RoyaltyLookup.sol Outdated Show resolved Hide resolved
src/helpers/RoyaltyLookup.sol Outdated Show resolved Hide resolved
src/helpers/RoyaltyLookup.sol Outdated Show resolved Hide resolved
src/TLAuctionHouse.sol Outdated Show resolved Hide resolved
src/TLAuctionHouse.sol Outdated Show resolved Hide resolved
src/TLAuctionHouse.sol Outdated Show resolved Hide resolved
src/TLAuctionHouse.sol Outdated Show resolved Hide resolved
src/TLAuctionHouse.sol Show resolved Hide resolved
_payout(payoutReceiver, currencyAddress, remainingValue);

// transfer nft to recipient
IERC721(nftAddress).transferFrom(address(this), recipient, tokenId);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe an over-optimization but if this reverts for whatever reason, should the funds be returned to the bidder rather than paid out? cc @koloz193

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

every other action in this function accounts for errors received.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id say yea

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, otherwise funds just get locked

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't really happen, but just in case

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, just realized, if this function reverts, sending the nft back to the seller probably reverts too. So not much we can do to catch it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants