When you cite an article it does not mean that your work stands on the cited article in its entirety but rather it might be a particular result, an interpretation or an interesting question someone else has come up with before you.
Let look at it like this:
- you (Y) cite a finding (f1) by a person/group in some paper (P1),
- who in turn cites another finding (f2) some other person/group in some paper (P2).
- later turns out that something in P2 does not add up and the paper gets retracted.
The interesting question is whether or not the mistake or error etc in P2 is related to your work. If:
- scientific grounds for f2 is still valid despite the error that causes the retraction, or
- your f1 is independent of f2
then you are essentially safe, since the reasons for retraction does not reflect on your work/findings. In other words, you have not built your work on erroneous foundation.
That beings said, I can only assume that citing a retracted paper isn't particularly nice, and if you can avoid it (if someone else has also mentioned that same finding without going through the retracted paper) then it's probably better.
Hope this wasn't all too convoluted.. I had to rewrite it a couple of times already :)