Unveil {X} (Start the game with this identity face down in the command zone. Turn it face up any time for its unveil cost.)
When The Grenadier is unveiled, create X colorless artifact tokens named Explosive with “{2}, {T}, Sacrifice this artifact: Destroy target nonland permanent. Its controller loses 2 life.”
The X in the unveiling triggered ability has the same value as the X paid in the Unveil ability. This is pretty easy to derive since there is no other source of X.