The nail separates from nail-bed due to crushing. Bleeding in the space causes purple discoloration.
The problem disappears after the fresh nail grows. It is natural.
The clotted blood in nail-bed get degenerated, and bacterial decomposition can create the fowl smell. Bacteria can grow in the place and toxins produced by them can create severe problems.
Also there is a chance of infection in the soft tissue
of finger. It will create swelling, pain, redness
in finger (absent in your case).
It would be better to get your child examined by a doctor. Accumulation of pus (if any) should be drained. Antibiotic ointment (Mupirocin
, fusidic acid
etc) can be applied locally.