Very cool idea, but unfortunately this does create some rule resolution issues.
The problem with an on-buy ability that moves a card is that the card hasn't been gained yet. So after the card moves to the top of the player's deck, it would then be gained and move to the discard pile. Either that or it makes on-gain effects lose track of the card. It's messy, regardless.
I'm not convinced that this problem exists. The rules read as though buying is a different form of gaining, and that the purchase and placement are part of one process. The effect of my card replaces the placement altogether; it's not stepping in between, it's rewriting.
What if you could reveal the card when a player gained a card during the buy phase? Or just during their buy phase, if you don't want it to work for the Curses that Ill-Gotten Gains gives out?
That would mirror conventional wording more. And offer up a few cute interactions. Looking through the sets, both the "gained during a buy phase" version and my version only have questionable interactions with Possession and Watchtower. (Everything else is rather straight-forward on how it should play out.) Possession would fortunately work the same as with Royal Seal... except I'm not entirely sure how that interaction works. If you've Possessed someone with Royal Seal and you, say, want to buy a Curse and put it on top of their deck, can you? I'd usually think no, but they're both trying to replace where the card ends up which leads me to think the possessing player would have a choice in the matter. Watchtower has a similar issue of which replacement takes precedence. If a player buys a Curse then reveals Watchtower to trash it, then I reveal Tower to top it, whose wins? Furthermore, who has precedence over reacting first?
That last issue might be cause for change. Possibly something like "Whenever a bought card is put into a discard pile..."