It's possible, although I don't know if anyone has a grader that implements this.
See http://webwork.maa.org/wiki/WeightedGrader for a description that weights different answers within a single problem. That would show you how to change the grade.
See also this thread for related discussion: http://webwork.maa.org/moodle/mod/forum/discuss.php?d=2696
Someone else may already have written a grader that reduces credit after a certain number of attempts. The hard part would be figuring out the best way for the instructor to configure it. If someone comes up with one they like they should submit either to the library or to the PG repository and we'll make it part of the standard repo.
If you want to use a similar mechanism to reduced credit (full credit for parts of a problem completed before the limit, reduced credit for parts completed after) then look at the avg and std graders which implement this. In your case you have a limit based on the number of attempts instead of a limit based on the due date.