

Leo Martinez taught himself to code, built trading algorithms, and realized the same infrastructure could solve a different problem entirely.
A useful way to understand what Leo Martinez builds: think of a stock exchange, except instead of matching buyers and sellers of equities, you’re matching advertisers with AI platforms that need revenue. The advertisers want users. The platforms want money so they can stay free. Somebody has to sit in the middle and make both sides work, in real time, millions of times a day.
That’s Gravity, the company Leo co-founded. The path that got him here wasn’t conventional, but it explains why the company is built the way it is.
Leo didn’t come up through computer science or finance. He grew up in Vancouver, struggled in school, and dropped out of college his first semester after enrolling to study kinesiology. He pivoted to personal training, starting by giving away over 100 free sessions at the Four Seasons Hotel Vancouver—paying the facility fee out of his own pocket—to build enough experience to get hired at Equinox. Within three months he was a top-selling trainer there, and over four years he reached the highest commission bracket and was named Trainer of the Year at Equinox Canada.
He left fitness at 22. The income was good but tied directly to hours, and he wanted to build something with more leverage. He tried trading crypto and lost about $20,000 in two days, which led him to study how professional trading firms actually operated. What he found was algorithms and quantitative models, not intuition.
In 2020, before AI coding tools existed, he taught himself to program from scratch.
“It was incredibly humbling. Things that are simple to learn now were just so hard for me. It took me ages to do the most basic things. There was no AI to help, and I didn’t know anyone else who could code.”
Over time he built proprietary market-making algorithms that generated over $30 million a month in profitable trading volume using his own capital. His systems later became part of quantitative infrastructure alongside an investment group deploying roughly $200 million across crypto and equity markets.
In 2023, Leo reconnected with Zach at a crypto conference in Mexico City. Zach had spent years in ad-tech, had managed millions of dollars in ad spend for clients, and had built Flax Labs—a marketing agency focused on measuring the actual profitability of ad units rather than just revenue.
“He was showing me everything he’d built, and then tried to understand what I was building and trading, and tried to find correlations we could work together on. It wasn’t a ‘let’s build something’ conversation. Just jamming on ideas.”
Leo had always been impressed by the way Zach worked, and the timing was right—he didn’t have other projects competing for his attention. In September 2024, he joined Zach at Flax Labs as CTO. Zach had already built out the core profit-per-ad measurement software; Leo helped iterate on and refine it.
The problem Flax addressed sounds obvious once you hear it: the standard metric in advertising—ROAS, or return on ad spend—tracks revenue, not profit. Those can be very different numbers. A campaign can look strong on revenue while actually losing money. You wouldn’t necessarily see that in your Meta ads dashboard.
“We were measuring the actual profit of an ad unit, and then based on profitability, we could scale budgets up and down in real time—on a unit-by-unit basis, hour by hour.”
Working at Flax is where Leo started seeing how closely advertising infrastructure resembled the trading systems he’d already built.
Leo explains Gravity by starting with market making, because the parallel is close to exact.
“Market making is really a problem of managing inventory. You’re managing supply and demand—matching buyers and sellers and trying to keep both sides happy. An ad network is the same thing. Buyers are the advertisers who set daily budgets to purchase ads. Sellers are platforms selling that ad space. In both cases, you’re trying to match the best buyer with the best seller. There are nuances, but it’s quite similar.”
This isn’t just an analogy. Gravity’s systems handle real-time bidding, inventory allocation, and pricing across millions of ad impressions per day. The infrastructure Leo built for trading—managing two-sided marketplaces, making fast decisions with incomplete information—turned out to be fairly directly applicable. Most ad-tech founders come from advertising. Most quant traders stay in finance. Leo built in both, and Gravity sits at the intersection.
In January 2025, Zach stepped down as CEO of Flax Labs and Leo stepped down as CTO. Together they started what would become Gravity—originally called Iris—with a thesis that was straightforward: advertising funded the internet, and it can fund AI the same way.
“We put ads inside of AI. The reason is to subsidize the cost so users can use AI platforms for free, just like how Google search is free because of advertising. Otherwise, we’d all have to pay a monthly subscription fee, and probably no one would do that.”
The historical precedent is clear. The early internet was expensive. Usage didn’t scale until advertising created a model where the best tools could be offered at no cost to the user. Google, YouTube, and Instagram all run on this model. Leo and Zach believe AI is following the same trajectory.
“It just seems like the next evolution. We’re spending so much money on AI right now. It kind of just became obvious over time.”
The idea took about eight months of iteration at Gravity to get right. It also plays to both founders’ strengths—Zach’s experience managing large-scale ad spend, and Leo’s background building marketplace infrastructure.
Gravity raised its seed round in October 2025 at a current valuation of $75 million. The company now serves millions of ads per day to AI platforms. Leo regularly travels to Silicon Valley to build alongside the team, drawn by the same logic he’s applied throughout his career.
“I’m a firm believer that your location really matters in business. There’s nowhere better in the world to build a tech company than in Silicon Valley. If we want to give ourselves the best chance of success, being here was kind of the only choice.”
Early fundraising during the iteration phase was difficult. Once the ad-network model took shape, demand outpaced what they could accept.
“Zach did a really amazing job. We had way more demand than we were able to accept. It wasn’t easy, but it was quick when it finally happened.”
Leo doesn’t have a CS degree or a conventional tech background. What he does have is experience building high-performance systems in one industry and applying that thinking to another. That crossover—treating ad infrastructure like a marketplace problem because he spent years building marketplace infrastructure—is Gravity’s core advantage, and it’s the reason the company is positioned to define how AI gets funded.
“I think there are fewer rules than people think. You can really just do anything you want to. That was the biggest thing I’ve learned, and that mindset has completely changed my life.”
For more information, visit trygravity.ai