When I donate or receive troops, are the troops affected by my laboratory upgrades for them, my donor/recipient's upgrades for them, or neither?
By default, the level of donated troops will be the current level of troops of the donor.
This means if someone has level 3 Pekka, and donates one to you, you will get a level 3 Pekka.
The special scenario is when your clan level is 5 or higher (clan levels have been introduced quite recently now). For instance,
- if your clan level is between 5 and 9, the level of the donated troop will be upped by 1. This means the same Pekka I mentioned above will be received at level 4.
- if your clan level is 10, the level of the donated troop will be upped by 2. This means the same Pekka I mentioned above will be received at level 5.
I haven't seen any clans at those levels yet, or know anyone in such a clan, but I don't think that the level of the donated troop can go beyond its maximum level. For example, donating a Pekka of level 5 in a level 5 clan will not upgrade the donated Pekka to level 6. This is only speculation until I get confirmation of it.