The owner of target permanent shuffles it into their library, then reveals the top card of their library. If it’s a permanent card, they put it onto the battlefield.
The owner of a token is the player under whose control the token was put onto the battlefield. If a token is shuffled into a player's library this way, that player shuffles before revealing the top card of that library.
22-09-2011
wotc
If the permanent is an illegal target by the time Chaos Warp tries to resolve, it won't resolve and none of its effects will occur. No library will be shuffled and no card will be revealed.
22-09-2011
wotc
A permanent card is a card with one or more of the following card types: artifact, creature, enchantment, land, or planeswalker.
22-09-2011
wotc
If the revealed card is a permanent card but can't enter (perhaps because it's an Aura with nothing to enchant), it remains on top of that library.
22-09-2011
wotc
If the revealed card is not a permanent card, it remains on top of that library.
Random a card of Magic: The Gathering (MTG), but you can also roll the D20 dice, random a Planeswalker, have fun with the random rules and more.