In the future memories cannot be created, but they can be bought and sold. A market develops. The people with the happiest memories could become rich.
The catch is: you're left without memories. So the people who are the richest cease to know who they are. Once they were happy. Now they are rich but lack all memories. (It's inverse-Citizen Kane. You're not shut up in your mansion with memories but with zip.)
Eventually, the rich-but-unhappy exchange all their money for the memories of the poor-but-happy. And the poor-but-happy become the rich-but-miserable, while the rich-but-unhappy become poor and happy.
--E. R. O'Neill