There's a joke at the end of Spider-Man: Homecoming in which Happy, Tony Stark's loyal body-man, produces an engagement ring from his pocket and says, "I've been carrying this since 2008!"

It's a gentle nudge meant to remind us of the rich history these characters share, with both each other and their loyal viewers. Next year, the Marvel Cinematic Universe will turn 10 years old. In that time, it has upended Hollywood’s blockbuster business model, establishing the formula for overlapping big-budget franchises connected by shared characters and setting.

The MCU’s longevity and continued success is a testament to its strength; there may be no stronger brand amongst studio blockbusters. But the ring scene in Homecoming is also a reminder that the Marvel movie universe is no longer young — and specifically, that Robert Downey Jr., whose Iron Man/Tony Stark is the franchise’s founding and central player, is getting older.

Downey is now 52, and although he has carried the role so far, at some point he won't be able to — or simply won't want to — play Iron Man anymore. This is one of the challenges inherent in building a mega-movie franchise like Marvel's.

Unlike the serialized comic books the studio’s films are based on — which could allow characters to age slowly or not at all, and which never had to deal with lapsed contracts for favorite characters — Marvel’s star performers, which include Downey Jr. as well as the Chrises Evans (Captain America), Pratt (Guardians of the Galaxy’s Peter Quill), and Hemsworth (Thor), will eventually move on from their roles. And when that inevitably happens, the MCU will have to evolve.

But in many ways, its evolution has already begun.

For a big-screen money machine like the MCU, this forced change represents a certain kind of peril. But in the long run, it could be the path to keeping the MCU alive and thriving for generations.

As the MCU’s first generation of heroes joins the AARP, Marvel should look to the X-Men films as a cautionary tale

To understand the predicament in which Marvel could find itself, it helps to look at the X-Men film franchise, which, despite originating in Marvel’s print comics, is owned by Fox.

When X-Men debuted in 2000, before the MCU existed, it was a true ensemble project. But it quickly became clear that the core of the franchise that followed was a trio of characters and actors: Ian McKellen as Magneto, Patrick Stewart as Professor X, and Hugh Jackman as Wolverine. When the series began, Jackman was in his early 30s, but both Stewart and McKellan were already pushing 60.

In the years since, both Magneto and Professor X have been played, often quite effectively, by younger actors (James McAvoy and Michael Fassbender, respectively). But on several occasions, both have come back to reprise older versions of their roles. The series can’t quite seem to move on from the stars who first defined the series.

Indeed, Jackman has continued to play Wolverine, carrying the character, and in some sense the X-Men movie brand — appearing in a trio of solo films, and stopping by for cameos in several X-Men films he's otherwise not in — through two decades on screen. If anything, he’s grown into an even more impressive physical presence (his workout routine is exhausting simply to read), but at 48 he is clearly aging out of the role. This year’s Wolverine solo adventure, Logan, reunited him with Stewart (now 76) in a somber, elegiac look at aging superheroes. It’s almost certain to be the last time either actor plays their respective X-roles, especially since both of their characters died.

Logan is among the best of the X-films, in large part because it leans into the aging of the actors, drawing on the ways their bodies and voices have changed, as well as the years of history viewers have with both. It works because it brings the X-Men franchise and its core characters to their logical end.

But today’s expanded movie universes aren’t allowed to end. Their whole point is to provide a stream of guaranteed box-office hits, pre-sold to viewers who are predisposed to love the characters and the brand. They are feature-length advertisements for more feature-length advertisements, each one designed to sell the next thing as much as itself. And that’s where the X-films have faltered.

X-Men: Apocalypse, the most recent entry in the main series (the X-movie continuity is complicated, and honestly doesn't fully hold together) brought in a new cast of young actors to play key roles, with McAvoy and Fassbender serving as its anchors. But the film was a dud. Without the principals who had defined the series early on, it seemed to have no idea what to do.

Marvel's approach may be formulaic — but the next phase of the MCU isn't just more of the same

It’s not too difficult to imagine Marvel becoming bogged down in a universe defined by a handful of characters played by aging actors. Last year’s Captain America: Civil War set up a universe with two centers of moral (and narrative) gravity — Downey Jr.’s Iron Man on the one hand and Chris Evans’s Captain America on the other.

Evans said he might quit playing the role when his contract is up after the fourth Avengers film that’s currently scheduled for 2019. But then he walked back the remark, suggesting he might be willing to keep playing the character. Downey Jr., meanwhile, has been coy about how long he'll keep playing Iron Man, saying recently that he wants to quit before it becomes "embarrassing."

In some ways, it’s hard to envision the MCU without Captain America or Iron Man. But it’s clear that Marvel is already planning ahead, trying to make the most of the talent it has developed while also building a future that doesn’t overly rely on the MCU’s first generation of stars.

For one thing, Hollywood now treats visible signs of aging as a technical problem to be solved. Over the past decade, digital “makeup” designed to make older actors look young again has grown increasingly sophisticated. This is most apparent in showy effects set pieces like the one in Civil War that transformed the middle-aged Downey Jr. into a teenage Tony Stark, or the scene in Ant-Man that presented a much younger Michael Douglas. But digital makeup is also used in more subtle ways, to achieve an effect that is more akin to plastic surgery — making actors look like slightly more youthful versions of themselves. Expensive effects can’t counteract aging entirely, but they go a long way to mitigating it.

At some point, though, Marvel’s biggest stars are still going to move on from their roles. For Marvel, then, the trick is to build do what Fox never did with the X-films and build a franchise that isn’t dependent on a few above-the-title names. That’s a lot of what the studio’s recent and upcoming releases manage to accomplish.

The two Guardians of the Galaxy films have already established a quartet of new heroes and stars, with yet another affable 30-something named Chris in the lead role. Last fall’s Doctor Strange brought yet another cynical, selfish, wisecracking, extremely powerful middle-aged rich guy into the universe — a potential understudy for the position that Tony Stark now inhabits.

And now Spider-Man, of course, has been brought into the fold from rival studio Sony (although Sony still owns the rights to the character) in a deal that gives Marvel access to one of the most popular and well-known characters in comics. The appearance of Iron Man in Homecoming serves as a kind of passing of the torch. In some sense, Stark isn’t just teaching Peter Parker how to be a mature and responsible hero; he’s showing him how to anchor a billion-dollar franchise.

Plus, thanks to the complex and unusual contractual arrangements between Sony and Marvel, Spider-Man may have to hold down not just one franchise, but two. At just 21 years old, Holland, who is reportedly signed to play Spider-Man in six different films, has plenty of years left to play a superhero, should he want to continue.

But Marvel isn’t just queuing up replacements. The studio is also expanding the MCU with new characters like Black Panther and Captain Marvel, each of whom are set to get solo films — and, potentially, sub-franchises — of their own.

Meanwhile, MCU mastermind Kevin Feige has indicated that Marvel’s films will change direction after many of the current major plot threads are wrapped up in the fourth Avengers film. With the reality-bending Infinity Gauntlet, which has sometimes been used to overhaul Marvel’s print-comics universe, in the mix, don’t be surprised to see major characters die or change radically as Marvel's movie universe enters what its overseers refer to as Phase 4.

Marvel, in other words, is trying to avoid the problems that have sometimes plagued the X-franchise, which ultimately became too dependent on a handful of actors and their characters, and broke down when they weren’t around. Instead of focusing on a small number of popular characters and performers, Marvel is building a deep well of talent and story, one that can survive the retirement of any individual hero.

It’s a good business strategy, because it spreads out risk, reducing the studio’s dependency on any single performer. But it’s also a recipe for continued creative vitality, because it forces Marvel’s creative minds to pursue fresh stories, settings, and motivations. It simultaneously relies on formula while incorporating growth, change, and evolution into the equation. And in a business where the dominant strategy for tentpole productions amounts to, “Repeat what has already worked, but bigger,” that’s no small feat.

Indeed, competitors have already seemed to pick up on Marvel’s strategy: The big hope for Fox’s X-franchise at this point is to launch a side franchise built around the antics of Ryan Reynolds’s Deadpool.

Maybe someday Marvel’s universe will collapse under its own weight, as the producers attempt to juggle too many characters and too many nine-figure blockbusters at once. Maybe someday the universe will have to reset and reboot, as Marvel’s print comics have done so many times.

But so far the MCU strategy has worked remarkably well. Indeed, Marvel has come closer than any other studio to building the holy grail of blockbuster filmmaking: a popular, critically acclaimed, massively profitable franchise that can truly live forever.