It is a probably conjecture that David may have been led to write this Psalm while still a youth at Saul's court, when there discerning the arts and deceits of courtiers.
We may illustrate it by referring to the case of Joseph and his many foes.
Here is the Righteous One, or "the Perfect" (v4), set before us - a name applicable to Christ in its fullest significance but applied also to his members, as being "Perfect" in purpose and in prospects, impartially aiming at the whole will of their God in heart and life.
But the world hates such, as his brothers hated Joseph; the world lays snares, and levels arrows of malignity at them.
"The arches have shot at them" - at our Joseph and his seed.
He says, v5, "They will tell about hiding snares," and they think no eye is on them.
"They search deep into iniquity" (to find out the most deadly device)
"We ahve got it ready! Here is a well-matured plan! (this is their shout over their deep-laid plot)
"And close is each one,
And deep of heart." (v6)
But there is another that is an Archer: "God has shot at them."
God has his bow, and his time is coming (v7). "All their hard speeches," are to be brought into judgement at the Lord's coming (Jude 15); and if they wounded others sorely, sorely shall they in turn be wounded. Theirs shall be a doom like Korah's (v8), when all Israel fled at the cry (Num 16:34).
"He has cast them down, tehir tongues come on themselves." (v8)
All earth shall then discern the righteous ways of God. That is the day of his Redeemed so often spoken of, so long expected - the day when the Righteous shall "enter into the joy of their Lord" and utter aloud their rejoicings and their glorying in Him.
"The Righteous One shall be glad in the Lord,
And flee for refuge to none but him;
And all the upright in heart shall boast themselves." (v6)
May we not, then describe this song of Zion as one in which we find Our Joseph and his seed foreseeing the doom of the archers that have shot at them.