Imagine an activity like the Forges or Reckoning where at the start you can place or "bet" any weapon or armor piece of your choice.
If you fail the activity, the item is lost.
If you succeed, the item gets either rerolled (for items that are already legendary) or upgraded into a legendary gun with a set of legendary perks and the appropriate amount of slots. Oh, and all the stats, even the hidden ones, get little bumps too upon upgrading (the degree and extend of said bumps could be randomized).
[spoiler]I don't assume that this pitch goes anywhere but dreaming is nice.[/spoiler]
-
It would make the game impossible to balance.