Just after midnight one Tuesday in early 2018, the vice president of Venezuela commandeered the nation’s TV airwaves. Looking composed despite the hour, in a blue suit and red tie, he announced that the government was about to make history by becoming the first on Earth to sell its own cryptocurrency. It would be known as the Petro.

Three blocks away, in the vice president’s sprawling offices, Gabriel Jiménez was sitting blearily at an enormous glass conference table, pounding away at a laptop. Powerful air-conditioners chilled the air to a crisp. Lanky, with big black glasses set between a scruffy beard and a receding hairline, Mr. Jiménez had spent months designing and coding every detail of the Petro. Now, alongside his lead programmer, he was racing to make it operational, despite the fact that basic decisions had still not been made.

Just after the vice president signed off the air, his chief of staff burst into the office, furious. Mr. Jiménez couldn’t understand — something about typos on a website, an embarrassment to the nation. The chief brought in two guards, armed with military rifles, and told Mr. Jiménez and his programmer that they were forbidden to leave. If they made any attempt to communicate with the outside world, they would be on their way to El Helicoide. It was a distinctly Venezuelan symbol of terror: a futuristic mall project, with car ramps between stores, converted into a political prison and center of torture.

Image

The political prison known as El Helicoide. Mr. Jiménez recalls being told at one point: “If you don’t hand over the file, I won’t be responsible for what happens to you.”Credit...Adriana Loureiro Fernandez for The New York Times

Below the table, Mr. Jiménez furtively texted his wife. Although she had recently left him, he asked her to send him a hug and to tell his father that he was in trouble.

Mr. Jiménez was finally released just before sunrise. When he made it to his apartment, he burst into sobs. Before he had time to collect himself, he got a call. The president himself, Nicolás Maduro, requested his presence. Mr. Jiménez walked to the presidential palace, pushing his way through the crowds outside with a sense of exhaustion and dread.

A few months earlier, the idea that Mr. Jiménez would be called before the tyrant who ruled Venezuela would have been unimaginable. Mr. Jiménez was just 27, ran a tiny start-up, and had spent years protesting the dictator. Mr. Maduro had not just mismanaged his country into financial crisis — he had detained, tortured and murdered those who challenged his power.

But whatever Mr. Jiménez felt about the regime, he felt just as strongly about the potential of cryptocurrency. When the Maduro administration approached him about creating a digital coin, Mr. Jiménez saw an opportunity to change his country from within. If a national cryptocurrency was done right, Mr. Jiménez believed, he could give the government what it wanted — a way to fight hyperinflation — while also stealthily introducing technology that would give Venezuelans a measure of freedom from a government that dictated every detail of daily life.

His friends and family warned him that working with the regime could only end badly. The person overseeing the effort, Vice President Tareck El Aissami, had been called a “drug kingpin” by the U.S. government and would soon be named to a federal “Most Wanted” list. Mr. Jiménez acknowledged the danger, but he talked about the Petro as a Trojan horse that would sneak in the kind of reforms that he and the opposition had been dreaming about for years.

The years 2017 and 2018 were full of drama for everyone in the crypto world, as the price of Bitcoin shot up more than a thousand percent before crashing. Billion-dollar fortunes were made and lost. But perhaps no one had as perilous a ride as Mr. Jiménez. His faith in digital currency transported him from obscurity to the center of his country’s dark institutions of power. He found himself negotiating directly with Mr. Maduro and his top deputies, who often praised his ingenuity — before escalating threats to Mr. Jiménez’s life drove him into exile.

“The actual goal of the project was to change the economic model of the oppressive regime,” he told The Times recently. “This was my mission and my gamble, in a bet that ended costing everything I had in my life: my friends, my partners, my reputation, my love, my company and my country.”

Image

President Maduro in Caracas in 2017. Children have starved under his despotic rule.Credit...Office of the Venezuelan President

Mr. Jiménez has been identified as the author of the Petro before, but he has never told his story. This account is based on hundreds of pages of confidential emails, text messages and government documents, as well as interviews with more than a dozen people who were involved with the project. Many spoke on the condition of anonymity because they still live in Venezuela, where openly criticizing the government can quickly lead to prison or death.

A country in need of desperate ideas

Mr. Jiménez was eight years old, living in the small city of El Tigre, when the military strongman Hugo Chávez came to power in 1998. A Marxist, Mr. Chávez used Venezuela’s vast oil reserves to pay for social services for the poor, but he also made the country increasingly authoritarian, built around his own cult of personality.

Mr. Jiménez was part of an educated class that was naturally drawn to the opposition. After college in Caracas, Mr. Jiménez spent a few years in the United States — studying, getting married and doing what he could to oppose Mr. Chávez and his successor, Mr. Maduro. He also interned for a Republican congresswoman from Miami who regularly criticized the Venezuelan regime. When reformers won parliamentary elections in 2015, Mr. Jiménez felt compelled to return to his country to take part in the political opening.

Mr. Jiménez and his wife landed in Caracas in early 2016 and found a nation on the brink. Oil prices had plunged, sending Mr. Maduro into a money-printing frenzy. As bolívars became worthless, medicine disappeared, refugees drowned and children starved.

Mr. Jiménez was fairly insulated. He had founded a start-up, The Social Us, that connected Venezuelan programmers and designers with American companies looking for cheap labor. Like many wealthier Venezuelans, Mr. Jiménez kept almost all his money in dollars, but this made transactions a headache. He had to illegally swap currency every few days, and a taxi ride would require a stack of bolívars so thick that most drivers accepted only wire transfers.

The situation rekindled Mr. Jiménez’s long-running interest in cryptocurrencies. He began paying his employees in a digital coin; even with the crazy volatility of the crypto markets, it was more stable than a Venezuelan bank account, and it wasn’t subject to the Maduro regime’s diktats. The staff at The Social Us began touting cryptocurrency as a way for ordinary Venezuelans — growing numbers of whom were buying Bitcoin on the street — to deal with practical problems. One project they designed was a payment terminal that bypassed government limits on spending.

Initially, the Maduro regime saw Bitcoin as a threat. The technology, after all, used a decentralized network to create and move money, and no authority was in charge. But then some members of the government noticed that this cut both ways. Cryptocurrency could also be a way for Venezuela to escape sanctions levied by the United States and international organizations.

In September 2017, an official loyal to Mr. Maduro floated the idea of a digital currency backed by Venezuela’s oil reserves. This was unorthodox: One of the tenets of Bitcoin is that its value does not derive from a natural resource or government fiat, only the laws of mathematics. But the distinction faded in the face of Venezuela’s desperation. The official, Carlos Vargas, read about Mr. Jiménez’s crypto work in a local publication and asked for a meeting.

Soon the hulking form of Mr. Vargas arrived at the office of The Social Us. As he consumed an entire bag of potato chips, Mr. Vargas flattered the young digital workers, saying they were among the only people in Venezuela capable of creating what he had proposed. The idea was exactly what Mr. Jiménez had hoped to hear. The goal was to create a new Venezuelan currency that would move freely over an open network, like Bitcoin. The government would be unable to control — or bungle — it. Mr. Vargas wanted to call it the Petro Global Coin, but Mr. Jiménez suggested something simpler: the Petro.

The Social Us put together a short pitch deck for the Petro project. But Venezuela is filled with people proposing crazy schemes, and Mr. Jiménez didn’t put too much stock in it. Then, in early December, when Mr. Jiménez was at a conference in Colombia, he got an urgent text. Mr. Maduro had just announced a national cryptocurrency called the Petro. Mr. Jiménez threw open his laptop and found a video of the president, in his usual workman’s shirt, telling a whooping crowd, “This is something momentous.”

Mr. Jiménez dashed off a message to Mr. Vargas: “Did they just steal our project?”

Mr. Vargas replied, “This is the project. They just approved it. Come back right away.”

Whacking the president’s air-conditioner

Mr. Jiménez landed in Caracas late at night, and soon found himself on the phone with some government officials and Mr. El Aissami. The vice president had a reputation as the second-most brutal man in Venezuela. But as he began questioning Mr. Jiménez, it seemed that some strange power reversal had happened.

The vice president was friendly and curious, and suggested that this was Mr. Jiménez’s project — they were just there to learn from him. Mr. El Aissami wanted to know how many Petros there would be, and whether new ones could be mined like Bitcoin. Mr. Jiménez thought that the officials didn’t have a particularly clear idea of how cryptocurrencies worked.

After the call, Mr. Jiménez emailed his employees to be at the office for an early meeting. When everyone had gathered, he stood on a desk and said they should drop all other projects and focus on the Petro. People were free to leave, he said, but if they did this right, it was a once-in-a-lifetime chance to change Venezuela. “We will liberate people from government controls,” he said.

One of Mr. Jiménez’s employees quit on the spot, saying he could not tolerate working for a dictator. Beyond their office, the idea of a state-backed cryptocurrency — nearly an oxymoron — had already become the subject of derision among longtime advocates of a technology designed to avoid state power. As the group dispersed, one of Mr. Jiménez’s closest friends, the creative director Daniel Certain, pulled him down for a conversation on the bright beanbags that were strewn around the office.

“Don’t do this — it’s a bad idea,” Mr. Certain told him. “You are going to make us work for them, and they are going to take the project out of your hands when they find you are not useful anymore.”

As Mr. Certain recalled, Mr. Jiménez laughed with characteristic hubris and said, “Nobody else in Venezuela would even know how to do this.”

Other friends also tried to dissuade Mr. Jiménez. But in all his dealings with the government, he was given the royal treatment. When he said that it would be symbolically important to present the Petro’s white paper — the foundational document on which every cryptocurrency is based — at the central bank, a minister said he would make it happen. When he pushed to get it all done in less than a month, so that no one could second-guess the project, the government agreed.

Mr. Jiménez opted to base the Petro on Ethereum, Bitcoin’s leading competitor, which would allow it to trade in the kind of free, publicly visible market that was otherwise forbidden in Venezuela. No one on the government side seemed to be worried about this — or even aware of it.

As promised, Mr. Jiménez presented his plans for the Petro in late December, at a daylong conference at the central bank that included a handful of American crypto experts. When Mr. Vargas — the newly appointed Superintendent of Venezuelan Cryptoassets — got onstage, he seemed to have imbibed Mr. Jiménez’s heretical views. “We talk about the need to transform our system and move to a new economic system,” Mr. Vargas said.

The real conversation, though, happened after the conference adjourned. Mr. Vargas told Mr. Jiménez and the Americans that the president himself wanted to meet.

It was nighttime, and a van took them through heavily armed roadblocks to the military base where the president kept his personal home, known as La Roca. It had a plainness that none of them expected. An aging Chevy Camaro sat in the courtyard, next to a kid’s trampoline.

Mr. Maduro was dressed casually, sitting on a couch with his wife, next to other top officials. He shook hands with everyone and made conversation in broken English, praising one American, Nick Spanos, for his appearance in a recent Bitcoin documentary that the dictator said he and his wife had just watched on Netflix.

The air-conditioner above the door was buzzing. The president asked the vice president if he would fix it. In his Adidas track suit, he stood on the couch and whacked the unit a few times. For Mr. Jiménez, there was a certain comfort in seeing the lack of luxury, given the privation in the rest of Venezuela.

Mr. Maduro told the group with a laugh that his announcement of the Petro had inspired cryptocurrency investors everywhere, and helped push Bitcoin to an all-time high of $20,000. It was unclear if he was joking, and everyone just chuckled.

When the president gave Mr. Jiménez the floor, he went over the basics of the Petro, including an initial issuance of $200 million. Then the finance minister spoke up, and for the first time, Mr. Jiménez’s plans were challenged. The minister took out a manila folder with a map of the Orinoco Belt and said he wanted the Petro to be backed on an ongoing basis by certain oil reserves there, which were worth orders of magnitude more — many billions of dollars.

Mr. Jiménez pushed back: It was one thing to tie the Petro’s initial price to oil, but if it couldn’t trade freely after that — at whatever price investors felt it was worth — then it wouldn’t be a revolutionary product. A Petro whose price always reflected oil reserves would essentially be a bond, and recent sanctions made it illegal for Americans to buy those.

The president didn’t seem to follow the debate all that closely. As the group dispersed, Mr. Spanos did not have a good feeling about Mr. Jiménez’s future. “I thought he would become the scapegoat,” he said later. “I didn’t think I’d see this kid again.”

Before leaving Caracas, Mr. Spanos remembers telling Mr. Jiménez: “I wish I had a magic carpet to get you out of here.”

Image

In Caracas, cars drive below a billboard advertising the Petro.Credit...Adriana Loureiro Fernandez for The New York Times

‘You cannot contradict the word of the president’

Mr. Maduro ratcheted up his public campaign for the Petro. He didn’t have many other tricks up his sleeve to combat hyperinflation, which in just four months had destroyed 90 percent of the value of the bolívar. Members of the opposition were openly calling for a coup.

As Mr. Jiménez watched Mr. Maduro’s televised talks, he was astonished by how much of what he had said at La Roca had gotten through to the president. Mr. Maduro mentioned Ethereum, white papers and transparency.

But the speeches also made it clear to Mr. Jiménez that he was no longer in control of the Petro. Mr. Maduro announced that the currency would, in fact, be tied to a specific block of the Orinoco Belt — exactly what Mr. Jiménez had argued against. He complained to Mr. Vargas, but was shot down: “You cannot contradict the word of the president.” Mr. Vargas told Mr. Jiménez to rewrite the Petro’s white paper to reflect Mr. Maduro’s decision — and to do it quickly. He and the vice president were about to travel to Turkey and Qatar to begin selling the Petro to investors.

Things deteriorated rapidly. The president’s excitement turned the Petro into a project that everyone wanted to get in on, and in mid-January 2018 a series of meetings at the ministry of finance turned contentious. The department’s top economic adviser wanted the Petro to have a stable value, controlled by the government, with an option to trade it in for actual oil. Mr. Jiménez managed to push back, winning an agreement that oil could be used to create a minimum value the state would promise to honor, but that the price would also be allowed to fluctuate on open markets. He also made sure the Petro would exist on an open network of computers, tied to Ether, that would fundamentally limit the government’s power to interfere.

Eventually, Mr. Jiménez became convinced that he’d lose control of the project to the finance ministry. When he tried to resist sharing a digital copy of the white paper, he said, the minister told him by phone: “You have to understand that this is now a project of the state. If you don’t hand over the file, I won’t be responsible for what happens to you.”

Some of the staff at The Social Us worried that Mr. Jiménez’s bullheaded desire to make the Petro happen put them all in danger. During another confrontation, Mr. Vargas had showed Mr. Jiménez blue folders containing intelligence dossiers compiled on the employees; after yet another dispute, triggered in part by the fact that the start-up had not been paid anything, the vice president sent word to Mr. Jiménez that he now considered him a traitor.

It would have been reasonable at that point to assume that he was headed to prison, and that his role in the Petro was over. And yet Mr. Jiménez was pulled back into the program in a shambolic series of events. The government told his team that they would need to compete to have a role in the Petro’s launch — against a Russian group of murky origin. Mr. Jiménez’s employees could find no evidence that they had any significant cryptocurrency experience; Time magazine later advanced a theory that they represented a Kremlin effort to control the Petro.

In any event, the Russians showed little interest in doing any work. Mr. Jiménez and his company were left to handle almost everything as the Feb. 20, 2018, Petro launch date approached. That is how Mr. Jiménez found himself feverishly coding all night under armed guard, and then summoned to the presidential palace early the next day.

Image

Miraflores, Venezuela’s presidential palace.Credit...Adriana Loureiro Fernandez for The New York Times

‘I didn’t know who my enemies were’

At the palace, Miraflores, Mr. Jiménez was shown into the biggest ceremonial room, where the entire cabinet was waiting with Mr. Maduro. The president greeted him warmly, directed him to sit in the chair next to him and asked him how things had gone since their meeting at La Roca. Mr. Jiménez was aware of everyone else in the room, and the cameras capturing it all, so he didn’t make reference to the events of the previous night, or any of the other funny business — he just tried to emphasize that his team had a version of the Petro ready to go.

“I didn’t know who my enemies were in there,” he said later, recalling the event. “I was the guy with no power.”

After some chitchat, the president led everyone into a hall that had been converted to a Petro-themed television studio. With a crowd looking on, an M.C. called to the stage the Russians, and then Mr. Jiménez. He was presented with a pen and a contract. It was an agreement he had been refusing to sign for weeks which limited him to a role as a sales agent for the Petro — a censure for his small acts of rebellion against the regime. On live television, Mr. Jiménez saw no way out. He scribbled his signature and gave a forced grin as photographers moved in.

Mr. Jiménez took a seat and wondered what he had just done. The president said that Venezuela had already collected $725 million from investors. He thanked Mr. Jiménez by name, as well as The Social Us. “It’s a company founded and run by young geniuses from Venezuela,” the president said. “You stay crazy.”

The Petro never really got off the ground. On March 19, President Trump signed an executive order barring Americans from using it. The same day, an Associated Press article about Mr. Jiménez noted that he had helped create the Petro for Mr. Maduro only a few years after interning for an anti-Maduro member of the House of Representatives. The congresswoman, Ileana Ros-Lehtinen, immediately wrote a letter asking the Treasury Department to investigate “whether Venezuelan national Gabriel Jiménez meets the criteria to be sanctioned under the appropriate authorities.”

In Caracas, Mr. Jiménez was barraged by criticism from the political left and right. The Social Us found it impossible to get new business. In July, a lawyer delivered a 68-page document to the National Constituent Assembly, asking that Mr. Jiménez be investigated for “treason against the homeland.”

Mr. Jiménez retreated into his apartment, and then, when he could no longer pay the rent, his mother’s apartment. Friends say that they rarely saw him. Ultimately, his ex-wife convinced him to leave Venezuela before the authorities finally decided to arrest him.

In April 2019, he sold his 2007 Toyota Autana and bought a ticket to the United States. When he arrived, he moved in with his father; in a completely separate chain of events, the elder Mr. Jiménez was waiting to begin serving a three-year sentence for his role in a money-laundering scheme at a Caribbean bank.

Image

Gabriel Jiménez, shown here in Chicago, now lives in Oakland, awaiting approval of his asylum claim.Credit...Evan Jenkins for The New York Times

Mr. Jiménez spent his days putting together an application for asylum. “I possess particularly features, as the creator of The Petro, that make me subject to persecution because the government wants to keep me quiet,” he wrote.

When his father reported to prison, Mr. Jiménez was left alone in a house owned by a friend. He slept in a child’s room, with Legos and dinosaurs at the foot of his bed. Without asylee status, he couldn’t work, so he sat in his apartment, playing games on his phone with the blinds down to avoid using electricity for air conditioning.

“I’m not kidding when I say I am under a big depression,” he said one day last fall, during one of several long interviews.

Improbably, several countries had begun following Venezuela’s lead and talking about launching their own government-sponsored digital currencies. China took the lead, and the European Central Bank said it was moving in the same direction. Venezuela relaunched the Petro a number of times, eventually coming out with a token given to pensioners that had none of the open properties from Mr. Jiménez’s original design.

In October, Mr. Jiménez heard that he got his American work papers. He wept tears of joy. Then he got started on a new project; it involves using cryptocurrencies to help Venezuelans avoid the bolívar.

Mr. Jiménez still had essentially no money, but a crypto start-up in the San Francisco Bay Area allowed him to work out of its offices, eat from the fridge and stay on a couch in the chief executive’s apartment. Recently, we met at a restaurant nearby. He pulled out a black notebook, in which he was writing letters of apology to the friends he had lost.

“I always thought that I could find a solution, to be able to compensate for my mistakes,” Mr. Jiménez had written to one of his best friends. “I know that some apologies are not enough. I know I even deserve some pain, but believe me that life has taken care of giving them to me.”