still somehow getting relatively underpaid.
This is pretty decent value for the Kings. That contract comes in at 6% of the salary cap. Since in free agency you should expect to pay about 3% of the salary cap for 1 WS, that would suggest that if Trey comes in at ~2 WS per season, he meets value. The last two seasons Trey has averaged 3.1 WS per season, so we can hope to get value out of that deal.
I know we're not in the Barnes thread, but the same logic applies to HB. His contract is right around 12.25% of the salary cap, so you're hoping for about 4 WS, and over the past four seasons with the Kings Barnes has averaged about 5.4 WS. Both guys look like good value.
(And yes, WS aren't everything, but they're at least something you can put an all-around value to and maybe it approximates real all-around value.)