\

After a 4-0 week as Dallas’ starting point guard, Yogi Ferrell and the Mavericks have agreed to a two-year contract that he’ll sign Tuesday when his first 10-day contract expires, league sources told The Vertical.

The Mavericks and Ferrell will bypass a second 10-day contract after working toward the two-year deal, sources said.

Ferrell, 23, has held his own in matchups against Tony Parker, Kyrie Irving and Damian Lillard during the past week, culminating with a 32-point performance in a win against Portland on Friday night. He is averaging 17.8 points, five assists and three rebounds while shooting 52 percent from 3-point range in 37.5 minutes per game for Dallas.

Yogi Ferrell has played four games with the Mavs. (AP) More

Ferrell was placed into a starting role because of injuries to Deron Williams and J.J. Barea.

Ferrell, a 6-foot guard out of Indiana University, has become a success story this season. He wasn’t selected in last June’s NBA draft, but landed with Brooklyn for the Summer League and was waived during the Nets’ training camp. He was re-signed when the Nets dealt with injuries in November and played 10 games, but was waived again in December.

Ferrell had been biding time for his next NBA opportunity in the NBA Development League and even considered signing overseas until the Mavericks requested him to fly to Dallas on Jan. 27 for a 10-day contract.

Ferrell had a standout four-year career at Indiana, where he is the school’s all-time assists leader.

More NBA coverage from The Vertical: