God Uses it for Good!
Twenty pieces of silver was the price the brothers of Joseph sold him into slavery. Just like Jesus, Joseph was faultless and was punished. Joseph like Jesus told his brothers of "things to come". Jesus was put into a small hole hung overnight while bound without food nor drink and Joseph was too. Joseph was stripped of his tunic just as Jesus was of his clothes. Joseph is a foreshadowing of Jesus. If not for Joseph, the Israelites would have all starved in the famine just as Jesus saved us all from eternal death by taking our place.
It's also interesting to note that Joseph hears the same name at Jesus' father and that he also dreams of things to come.
Joseph was also" dead" as a slave, a nobody, persecuted by Pharoah's wife, seemingly forgotten and yet he" rose again" when he interpreted dreams and became a ruler of Egypt (second in command).
The lesson for me here is when trouble and persecution arise, there is a great purpose for the work of holiness God is doing in our lives. It could also be for lhe greater good of others. No hardship is without purpose even when it doesn't seem to have a purpose - even when it's illogical and confusing. God wants us to bear hardship and suffering with expectant faith.