Do chest traps happen before loot is distributed?
The trap effect resolves before the contents of the chest are distributed. From the FAQ (page 4)


  Q: When a chest contains curses, can the overlord use the threat generated by the curses to play a trap on that chest? Does the trap go off before or after the rest of the chest 
  contents are distributed?
  
  A: Curses are always the first thing distributed from a chest, and threat from curses may be used to play a trap card in response to opening the chest. The rest of the chest 
  contents are only distributed after the trap card (if any) resolves. In the case of a Mimic or similar card, this could be several turns later!