The transponder should use altitude indications from the associated ADC controlling each side's altimeter. The reason is that altimeters can vary between each other by 100' or more, and the transponder, if it's not using that side's altimeter, will always be indicating on radar a slightly incorrect altitude.