The original owner of NFT A can then just wait until the floor price doubles, perform the swap again to get back their NFT B, return NFT A into the contract (which is instantly listed at 10 ETH), immediately buy it for 10 ETH, and then resell NFT B on OpenSea for 20 ETH