Friendship is a major theme in Holes, and the friendship between Stanley and Zero is perhaps the most powerful in the story. Both boys are equally unpopular; Stanley is overweight, unlucky, and often teased by his classmates before he arrives at the camp. Zero experiences similar treatment from the boys at the camp and does not know how to read or write; he spends most of his time quietly walking around with a scowl. When Stanley arrives, he and Zero become close friends. Zero opens up to Stanley about his illiteracy, and Stanley never laughs at him or mocks him.
The destiny in Stanley and Zero's friendship comes from the root of their ancestries. Stanley's great-great-grandfather was cursed by Madame Zeroni, an ancestor of Zero (whose real name is Hector Zeroni) after he broke a promise to her. Fate would eventually bring Stanley and Zero to the mountain that looks like a fist and thumb, where Stanley carries Zero because he is too sick to hike. There, Stanley sings the same lullaby that his great-great-grandfather was supposed to have sung to Madame Zeroni after carrying her to the top of a mountain in Latvia.
After this event, Stanley's lawyer arrives at the camp and Stanley's innocence is finally demonstrated. He is allowed to leave, and so is Zero, since the warden had destroyed his files. Stanley has completed the task his great-great-grandfather had promised to Zero's ancestor, Madame Zeroni, breaking the curse upon the Yelnats family.