For the last two months, Gray gets paid about $11.6mill, $6.7mill of which is covered by the Cardinals. But St. Louis paid that money to the Red Sox, who do not have to include it with Gray. Couple that with his buyout, and Gray could be owed up to $21.7 million for two months of pitching, especially since his mutual option (for $30mill) is extremely likely to not get exercised.
If Gray were eligible for a QO, it would just make sense to keep, but Minnesota have him one after 2023. So in order to get anything decent in return, Boston probably has to include at least $6.7 to $12mill. Obviously this starts with the Cardinals money, which is a no brainer to include…