FORTUNE — “Of course I’m wearing my own socks,” Rick Levine tells me on a patchy call from a Motel 6. He’s holed up to ride out a snowstorm, and he’s wearing the wool socks he designed.
Over the past six months, I’ve talked to the Rick and his brother, Neil, a handful of times in a handful of cities. This particular day, Neil is at his home in San Francisco. Rick is in North Carolina, visiting a dye house specializing in small lots. Together, the Levines run XOAB, a small company that makes some of the most comfortable, durable, beautiful unisex socks around.
Rick is a programmer by trade, but has a deep marketing background. Along with tech pioneers including David Weinberger and Doc Searls, Rick is one of the co-authors of ‘90s Internet marketing bible The Cluetrain Manifesto. Neil, on the other hand, majored in textile design in college and worked in New York’s garment district before moving to California. After working together on and off their entire adult lives, the Levines decided their mutual passion for beautiful men’s socks should be their next project.
Neil wasted no time in creating designs and prototypes. Rick headed to Europe to practice hacking the software in Italian sock-knitting machines. It took several years of being gainfully unemployed, as Rick likes to joke, to assemble the company’s foundational elements. It also worked. In 2012, the duo officially founded XOAB (pronounced “ZO-ab”; shorthand for “love and beyond”). In late 2013, their successful Kickstarter campaign raised three times their initial goal. Backers received socks starting at $25 a pair.
It’s a lot to pay for socks, even for a pair with wild patterns. But the most interesting aspect of XOAB’s footwear is a bar code, stitched into every heel. It’s a Trojan horse of sorts. The technology can be used to track them, place a custom order for more of them, even guarantee authenticity.
A tracking system for raw materials isn’t a terribly new idea. Even Rick’s previous company, Sun Cups, had to track exactly what went into each lot. “You have a bad batch of ingredients, you have to be able to recall everything,” he explains. But clothing is different. “That tracking hasn’t been applied to apparel yet.”
At least not the way XOAB socks have the technology literally woven in. The clothing company Icebreaker offers a similar tracking feature through its Baacode, which allows you to scan and learn about the source of your sock wool through the company’s website. But almost all merino wool used in Icebreakers socks and outwear layers comes from the same handful of Kiwi suppliers, the Levines say. Moreover, the bar code isn’t attached to the actual sock, which would be pretty much impossible. (Instead, it’s on the single-use packaging where it is soon discarded and forgotten.)
The barcode also allows XOAB to track individual socks during production. Historically, socks are made in batches of tens of thousands. Every sock goes into the same washing machines. At the end of the production cycle, two of the thousands of identical socks are picked at random, pressed, and packaged. “If I wanted to do a knitting or pattern variation at one end and then change the design or size slightly, we can find the two socks at the other end of the process and put them back together as a pair,” Neil says. “Other than maybe a monogram, most people can’t imagine custom socks yet,” Rick adds — but is also quick to point out exceptions already in existence, like athletes and people with various medical conditions that require compression stockings.
For limited-edition designs, the bar code also allows for the preservation of provenance. Competitors who love the XOAB designs can always rip off their favorite, send it to a factory overseas, and make their own. But the bar code gives both XOAB and its customers a way to tell the difference. “We know exactly what we produce, and we can track if someone buys pair 57 out of 100 made on a particular day, that it is a real XOAB sock,” Rick says.
To get the barcode on the sock was a technical challenge. “Socks are low-res,” Rick says. “We had to design something that wouldn’t chew up the entire space and that would fit on a knitting machine. We also wrote an error correction code. If the knitting machine decides to drop a row of dots, it’s okay.” Plus, the bar code is designed to survive multiple trips to the washer and dryer.
Rick concedes that bar coding a sock might be a silly idea. “The notion I want a custom pair of socks? To help me stay in touch with the manufacturer and other people? There are glimmers of where this might be useful,” he says. But he’s willing to risk failure to try it. “It’s interesting, but no one’s done it on the consumer scale,” he says. “Until you have enough people using it, it’s the empty party problem: There’s nobody there, and it’s boring.”
Not that the Levines can’t fall back on the product’s primary purpose. “We’re making socks we want to wear,” Rick says with a laugh. “Not just socks with barcodes.”