Mike Ehrmann/Getty Images (NEW YORK) -- According to sources, the Dallas Mavericks have agreed to a deal with free agent guard Monta Ellis.

The deal is reportedly for three years, but the price could range depending on where the Mavericks end up in terms of salary-cap space. Sources say that the team will be in the $25 million range but could rise as high as $30 million.

Ellis opted-out of the final year of his contract with the Milwaukee Bucks that was worth $11 million.

In addition to Ellis, the Mavericks also signed guard Jose Calderon in an attempt to overhaul their backcourt.

The 27-year-old Ellis has career averages of 19.4 points and 6.0 assists in eight seasons with the Bucks and Golden State Warriors.