The ancestral curse under which Stanley Yelnats and his family live is broken when Stanley carried Zero down from the Big Thumb. This of course reverses the failure of his great-great-grandfather Elya Yelnats in not carryin Madame Zeroni, Zero's ancestor, up the mountain as thanks for the counsel he received from her. The resolution of this conflict is therefore shown through good luck coming back to Stanley's family, which is indicated in Chapter 50, where the story comes to an end. Even though Stanley's mother is adamant that there never was a curse, readers might think otherwise:
The reader might find it interesting, however, that Stanley's father invented his cure for foot odour the day after the great-great-grandson of Elya Yelnats carried the great-great-great-grandson of Madame Zeroni up the mountain.
The end of the conflict between Stanley and his family and the curse that they have been living under for generations is therefore indicated through not only the sudden wealth that the treasure brings the Yelnats family but also the invention of his father that likewise brings them wealth. Having cancelled out the bad action that brought the curse down on the Yelnats family in the first place, Stanley breaks the curse and brings wealth and happiness back to his family.
In Louis Sachar's novel Holes, Stanley Yelnats' family explains its consistent bad luck by the curse placed on his "no-good-dirty-rotten-pig-stealing-great-great-grandfather" by Madam Zeroni for not fulfilling his promise to carry her up the mountain. Stanley therefore feels that it is no surprise that he was in the wrong place in the wrong time and ended up being blamed and punished for a crime he did not commit. However, Stanley's interment in Camp Green Lake eventually turns the family's fortune, as Stanley befriends Hector (Zero), Madam Zeroni's great-great-great-grandson, and saves his (and his own) life by carrying him up that same mountain. During their adventure, Stanley and Hector also discover the bottles of "sploosh," a kind of peach preserves with unique properties, and the treasure buried by Kate Barlow that was also stolen from Yelnats family.
In an interesting twist of the plot, Stanley resolves another curse as well. The Green Lake region has not seen any rain since Sam, a young black man, was killed merely because he was caught kissing a white woman—the village's beloved schoolteacher Miss Katherine Barlow. When Stanley finds Kate's buried treasure, he insists on sharing it with Hector, a poor black boy who has no parents. Finally, the rain falls again in Green Lake, enabling the region to prosper.