At the end of the running time of the lottery pool, the winner is selected randomly by a smart contract and the principle amount is automatically swapped for the auctioned NFT. The pool creator claims the money raised from the sale, while the winner will claim the NFT from the pool.