When a player is amnestied he is put on waivers and other teams have to bid on them. For Brendan Haywood the winning bid was $2 million. Whoever bids the highest gets him, at whatever price that happens to be. The bid cannot exceed the previous contract ($16 million per in this case).
Does the previous contract length transfer over to the team that acquires him?