Ever since he could remember, Ibrahim Boakye had a knack for understanding how things worked. There were things he could just do that no other kids– let alone adults– could understand. By the time he was five-years-old everyone had stopped questioning it, and neighbors were calling on him to fix their broken toasters, irons, or anything that was the least bit mechanical.

By his early teens, he was getting things out of the dump and fixing them for fun. Soon after that, he was teaching himself to code. He’s made an outsized living no one in his family could have anticipated by outsmarting other people on computers ever since. It’s never been about money or even in those early days about doing good deeds around the neighborhood. He gets an intoxicating rush from solving the hardest technical problem he can find and from knowing that he’s the best.

As I sat in a hotel lobby in Lagos listening to his story, I couldn’t help being reminded of Max Levchin of PayPal and Slide fame. Levchin grew up in Soviet Russia and had the same knack, that same innate ability to understand how machines worked. He learned to code on whatever he could find– calculators, pen and paper, old Soviet microcomputers. When his family moved to America, he rebuilt things he found in dumpsters too. Watching the nightly news on a old black-and-white TV helped teach him English.

For Levchin, it was also about the thrill. He once got in trouble with the FBI for cracking video game codes for a Chicago crime boss. He didn’t really think about the fact that he was doing something illegal, he just loved the challenge. And like Boakye, he’s made an outsized living no one in his family could have anticipated by outsmarting other people on computers ever since. His rush also comes from solving the hardest technical problem he can find, and from knowing that he is the best.

But there’s a big difference between the two. Levchin immigrated to the US at 16, went to University of Illinois and was inspired by the example of Marc Andreessen. He moved to Silicon Valley at the best possible time for an aggressive, insanely-competitive coder to move to Silicon Valley. A company as complex and lasting as PayPal was hardly all luck and timing, but Levchin took advantage of being in the right place at the right time and meeting the right people, most notably PayPal co-founder Peter Thiel.

By contrast, Boakye grew up in a poor section of Lagos. In a way, his timing was also serendipitous: The Internet’s emergence in Nigeria breathed new life into an old national scam: The 419 letter. And a new generation was making hay out of the naiveté of millions of new Internet users. For Nigeria’s massive unemployed population– some fifty million people today– this was every bit the gold rush that Silicon Valley was in the 1990s. And the “entrepreneurs” concocting these schemes late night after the doors were locked in Nigeria’s Internet cafes needed a brilliant coder who was more motivated the bigger the challenge. Boakye was one of the best in the country.

Like Levchin, he took advantage of being in the right place at the right time and having the right skills. Only most would say he met the wrong kind of people. At his peak he was making as much as $50,000 per day as a freelancer hacking into bank systems, stealing social security numbers and credit cards, and exposing the Web’s deepest vulnerabilities for Nigeria’s “Yahoo boys,” called that because they were known for using Yahoo email addresses.

Boakye has since left the life of crime, he says. We met my last day in Lagos; one of nearly a dozen interviews I did with current and reformed Yahoo boys in Nigeria. I won’t detail how I got the meetings, because of the elaborate personal assurances of safety. I’ve taken pains to disguise any details about the man whose name is obviously not really Ibrahim Boakye. Appropriately, I got that name off the most recent 419 email I found in my spam folder. Some of the juiciest parts of the accounts I won’t detail here, lest it put the people who personally vouched for me at risk.

Finding Yahoo boys to talk to me was near-impossible; a big change from a few years ago. The 419 scammers used to be the rockstars of Nigeria’s underground world. “Girls wanted to date us because we were smart,” one told me. “We could get money out of white men using only our brains and a computer.” There was also the justification that this was some how a revenge for colonialism; when white men took Africa’s natural resources without consent. And– as is the case with every black market– there was the lure of all that cash. Skills were flaunted in cafes, whole organizations were built out, and even rap songs were written glorifying 419.

It’s much harder to make money today. That’s mostly because Internet companies have made it harder, through restricting mass emails and educating people not to purchase any goods from Nigeria. Most ecommerce sites block Nigerian ISPs. And consumers have gotten smarter, too, the Yahoo boys say. The Nigerian government has also made greater efforts to crack down, under International pressure and pressure from the country’s legitimate tech entrepreneurs who are furious at the Yahoo boys for globally sullying the country’s reputation. The people still doing it have been driven underground, forced to keep a low profile. They don’t talk about what they do even with friends. They can’t trust anyone. One current scammer told me he couldn’t invite friends over because of the noticeable stench in his bedroom from all the stacks of money stashed under his bed.

For most of the day, I sat transfixed listening to their stories. Of course it was impossible to know whether they were telling the truth about everything. But so many of the individual stories corresponded to one another, and the complex systems of scamming were too elaborate to have been made up on the spot. Each boy would start telling his stories shyly, but once he got going he couldn’t help but boast about his methods. Sometimes the hardest thing about committing the perfect crime can be keeping your genius to yourself.

Boakye’s sheer hacker genius was the most astounding. It’s not just technical ability– he tries to figure out how the person who set up the security system he’s trying to break thinks, and outsmart him at his own game. If he can’t crack the software, he studies the hardware and learns its vulnerabilities.

The way he described the chess match with this unknown nemesis reminded me of another entrepreneur in the Valley: Dennis Fong. Fong spent his teens as a professional gamer, better known by the name “Thresh.” He rarely lost thanks to an uncanny ability to anticipate opponents’ moves. Opponents called it “Thresh ESP,” and it earned him six-figure computing endorsement deals. The way Boakye explained how he breaks into multi-national banks was identical to Thresh’s approach. I wouldn’t be surprised if he’s hacked into at least one of my accounts by now just out of curiosity. I asked him not to do anything malicious, and he promised he wouldn’t. But we were both pretty convinced he could.

As a person, I found these meeting more terrifying than my run in with Bones and his machete men in Alaba. As a business reporter, I couldn’t stop the broad smile from spreading across my face as we spoke, even breaking out in laughter once or twice. It’s the same Cheshire cat grin I get when I meet any amazing entrepreneur, anywhere in the world. You know them after five minutes of conversation. And several of these guys just had it. Born into a different circumstance, they could be on the cover of any magazine, ringing the opening bell at the Nasdaq.

This is the darkside of what we know in Silicon Valley: That great entrepreneurs can come from anywhere in the world. Sometimes some of the best technical minds fall into a life of crime. And just like corporate giants can’t keep a hot startup from disrupting them; law enforcement can’t keep people like Boakye from accessing your information.

There weren’t just stunning personality comparisons between someone like Boakye and Fong or Levchin, there were stunning industry comparisons. Like entrepreneurs in the Valley, the industry has evolved to the point where few of them need to be hard-core techies. Today, the Nigerians focus on user experience– put a less euphemistic way, their job is to find the mark and rope him or her in. Any hardcore hacking work is outsourced to Vietnam, India or elsewhere– particularly now that Boakye has retired from crime. One Yahoo boy told me he met his Vietnamese partner online when he tried to scam him. The man wrote back, “I’m not going to fall for this, but I know what you are doing and I can help you.” The world is flat for criminals too.

Don’t let the clunky syntax on these emails fool you. The Yahoo boys I met are masters of human manipulation. The latest scam revolves around online dating. Yahoo boys find a lonely man– sometimes a single man who wants a mail-order bride; sometimes a married one with kids who wants an escape on the side. They key with 419 scams is always finding someone who wants a easy shortcut in money or love. An elaborate relationship over IM begins. One boy I met excelled at these. He says he just closes his eyes and pretends it’s a woman on the other end he’s seducing. He uses carefully constructed porn clips for video chats; other scammers hire actresses to portray the fictional girls.

This Yahoo boy carries on five to seven relationships at once, playing the dutiful girlfriend to each– down to helping them pick out their clothes for work everyday. When one suitor lost a job, he used the Web to help find him an interview and pumped up his confidence to apply. He gave him several months to get back on his feet before asking for more cash. One time, he even sent the mark cash, to show how much he — or “she”– cared. “I take care of them,” he says. “They are the people who feed me.”

He helps build them up; he listens to their problems. He makes them feel loved. He calls each an innocuous pet name, lest he accidentally type the wrong message into the wrong chat window. He asks for a little bit of money here and there, until men are sending him steady amounts from each paycheck. He says it takes exactly one month for a man to fall in love with him, and once he has a man’s heart, no woman can take it.

This isn’t a short con, this is a long term game of constant maintenance. He creates fictional Web pages to back up the fictional girl’s story, so if the man Google’s her, he finds seemingly legitimate confirmation. When he goes to church, he tells them “she’s” going to church. When he makes dinner he tells them “she’s” making dinner. He’s less a 419 scammer, and more a long-distance emotional prostitute, providing a service men appear to be happy to pay for. Like any great entrepreneur, this Yahoo boy knows his customer. “if you get their heart, you have control,” he says. “You white people have very flexible hearts. We’ve seen it. That’s why there can be no true love in Nigeria. Your closest friends rip you off here.” He continued, “I wish I could stop. I’m not into the black man power like some people. I don’t want to make someone sell their house; I don’t want to take everything. I just can’t find a job. If I had a junior brother I wouldn’t teach him. You get addicted to it.”

Just like you have people in the Valley looking to flip products and those in it for the long haul; in the 419 world you have kids who try it out for easy money, and those who commit to it. To be successful today you have to work as many hours as a Valley Internet entrepreneur and have just as long term of a focus. There’s just as much creative problem solving involved; this is something you can’t really teach. A lot of these Yahoo boys told me they’ve tried to take on apprentices, but few of them last. It’s not the glamorous, quick-money world it used to be. Today being a scammer takes smarts and stamina.

Nigeria is undoubtably one of the juiciest markets in the emerging world, and by many accounts the juiciest in all of Africa. And legitimate tech entrepreneurs will be understandably upset about Western reporters fixating on the 419 world. But if they want to stay in Nigeria, they’ll have to get used to it. These kids, the circumstances that created them, and the lasting impact of the damage they’ve done to people aren’t issues the country can shrug off no matter how much it would like to. “We use our brains to get what we want. For us it’s the only way to live and survive,” one boy said. “As long as technology keeps advancing, there is no way to stop us.”

It’s Nigeria’s central issue that it will have to face, own up to, and tackle if the country is going to play a greater role in the global economy. Ignoring it is like ignoring China’s lack of political freedom; India’s deep poverty and infrastructure problems; or the civil war going on in Brazil’s favelas between drug lords and the frequently corrupt policemen cracking down on them. The reason Westerners tend to fixate on these issues isn’t because we’re opting for easy stereotypes. It’s because they are each huge problems without easy solutions. Problems that have to be faced. And you face them by talking to the real people behind them, not by sweeping them under a rug, assuming they’re all two-dimensional villains or dismissing them as a made up stereotype.

One of the active scammers I spoke with is supporting his whole family, including several siblings he is putting through university, so they have a chance at a better life. But one of them has been out of school for years, and still can’t find a job. It’s not a ringing endorsement to go legit. This guy doesn’t feel great about what he does, but he says he has no other option. He goes to church several times a week, where he wrestles with it. He tells himself he is on God’s path, and he has faith it ends with him leaving this life behind.

He’s describing the hope of anyone who is touched by the genius and the opportunity in Nigeria, as I was during my trip. That this stunning raw talent can find a way to stop relying on bilking Westerners out of cash and start using their wily genius to create local jobs.