Loud Mocha Platypus
High
Buyer pre-escrows the potential purchase funds of an NFT during buyOrderFactory.createBuyOrder(). This creates a buyOrder.sol
contract for him locally, where an owner of the NFT can potentially accept this buy offer via sellNFT()
.
When the owner of the NFT accepts the buy offer via sellNFT()
the NFT mistakenly gets sent to the buyOrder.sol
contract. This contract has no way to send the NFT anywhere, and it should have instead been sent to the buyer of the NFT.
See Summary.
See Summary.
See Summary.
See Summary.
See Summary.
None
// https://github.com/sherlock-audit/2024-11-debita-finance-v3/blob/main/Debita-V3-Contracts/contracts/buyOrders/buyOrder.sol#L99-#L103
// The `buyInformation.owner` is the user who called `buyOrderFactory.createBuyOrder()`
// and escrowed their buy tokens in advance.
// They are the owner of the `buyOrder` contract, and so the NFT should be going to them, because they bought it.
IERC721(buyInformation.wantedToken).transferFrom(
msg.sender,
- address(this),
+ buyInformation.owner,
receiptID
);