The team would inherit the guaranteed portions of the contract for the remaining years other than bonuses. So if the next year's base salary is guaranteed, the team trading for him would inherit that. If there are roster bonuses, the team trading for him would inherit that. Those things are included in the dead money for the current team if it cuts him, but not if it trades him.
Miami's dead cap if it cut him today would be $34 million. If the Dolphins traded him, Miami would be on the hook for his signing and restructure bonus money (already paid to the player), which adds up to around $15 million. They may also have to pay his $50,000 workout bonus because I believe that is based on offseason workouts.