The fate of Scott Lang is unclear after he was stranded in the Quantum Realm in Ant-Man and the Wasp. But his predicament might actually lead to him finding and defeating Thanos in Avengers 4, according to a new theory.

In order to escape the Quantum Realm, the theory claims that Ant-Man will jump into one of the time vortexes that Janet van Dyne warned him about. He winds up ten years into the future, where he finds an apocalyptic world that’s still in ruins from Thanos’ snap—the universe is essentially in the exact opposite state prophesied by Thanos.

Scott finds his daughter Cassie, who tells him about the snap. (Remember, he was in the Quantum Realm when the snap happened, so he has no knowledge of Thanos or his plans.) Realizing that the Quantum Realm could potentially reverse what Thanos did, Ant-Man seeks out Tony Stark, who is still mourning the loss of his friends, especially Peter Parker. When they reunite, Tony is astonished that Scott hasn’t aged a day, which Scott explains is due to the time jump.

Putting their minds together, Tony uses B.A.R.F.—the system we saw Tony use in Captain America: Civil War—in order to see Scott’s memories and gain knowledge about the Quantum Realm. Tony realizes that they can use the Quantum Energy Scott was collecting for Ghost to travel back in time to undo the damage done by Thanos.

The question is: How do they decide where to go back in time? They find Loki. The theory explains:

They use their new “Quantum Time Machine Watches” to go back in time to the Battle of New York (the only time they for sure have Loki in custody). Old Man Stark poses as a shield agent (a la set photos) to get the information and we learn a couple of tidbits about Loki’s relationship with Thanos.

Turns out, Loki knows about the farm Thanos retires on at the end of Avengers: Infinity War. The theory argues that Loki ended up there after falling into the abyss after the first Thor movie. Once Loki and Thanos meet, Thanos sends Loki to collect the other Infinity Stone on Earth.

As an aside, the theory never addresses why Steve Rogers was also seen in set photos to be wearing a time travel watch during the Battle of New York. Steve survived the snap, so it’s strange for the version of the character from the Battle of New York to be wearing the technology.

Anyhow, once Scott and Tony have the information they need, they realize they won’t be able to jump forward in time again. Luckily, the theory claims the Time Stone will appear thanks to Doctor Strange, who sent the stone through time before handing it to Thanos on Titan. This ties in with another huge theory about Doctor Strange and his ultimate plans.

The theory goes on to say that the Time Stone can only jump one Avenger into the future, so Tony volunteers to stay behind while Scott goes back to present day where he teams up with the remaining Avengers, including Captain Marvel. An epic fight will then take place at Thanos’ farm.

While this theory gives Ant-Man a terrific arc, it never addresses the other prominent theories currently floating around, including the showdown with the Living Tribunal or the idea that the Avengers will utilize time travel to collect the Infinity Stones for their own Infinity Gauntlet.

Either way, the ideas behind the Ant-Man theory sound plausible and very likely, considering Marvel already said the Quantum Realm will play an important part of Avengers 4.

We’ll learn more about Ant-Man’s role when Avengers 4 hits theaters on May 3, 2019.