Each team was allotted with a bonus pool, and allowed to sign whoever they wanted with that money. The highest bonus pool was 5 million, which went to the Astros. So if they only signed Moncada, they would have been penalized for 30 million - the 5 million allotment, and hit with a tax of 25 million.
In retrospect, it tells us exactly what kind of super stud prospect Moncada is, if he is worth that much. The max bonus was 5 million, and he cost 31.5 million to sign. The second highest bonus was 8.27 million. I sure hope he is the real deal.