The 26-year-old Wolf will earn $2.25 million in 2003, $4.25 million in 2004, $6.5 million in 2005 and $9 million in 2006. The deal, which also has performance clauses for the lefthander, includes a $500,000 signing bonus.
Wolf was 11-9 with a 3.20 ERA in 2002.
"After their first offer, I knew making this deal would be a no-brainer," Wolf said. "They showed a commitment to me and because of that, I wanted to commit to them.
"The past couple of years, the team has been going the right way. We've needed just a few pieces and when we signed (David) Bell and (Jim) Thome, they were big pieces. There's a lot of excitement with this team."
Selected in the second round of the 1997 draft, Wolf has a career mark of 38-38 with a 4.07 ERA, eight complete games and four shutouts in 113 games.
"Our plan has been to develop and retain our own players and this fits our plan," Phillies General Manager Ed Wade said. "Randy is one of the top pitchers in our league and we believe he can only get better."