This building can be commissioned by Robin the Carpenter at a cost of:
10000 Gold + 500 Stone + 10 Refined Quartz + 1 Iridium Bar
It is recommended to build your Slime Hutch near a water source. Once built, you may hatch up to 20 slime eggs in the incubator within, which are gotten from killing slimes in the dungeon, and sometimes as rewards. Inside the hutch you can use your watering can to fill 4 water troughs, which will allow the slimes to produce slime balls. The slimes will attack you, though, so be careful! The slime trough can be made safer by acquiring the Slime Charmer Ring, which eliminates damage taken from slimes.
After you have your Slime Hutch for a while, one night while you are asleep a witch will come and fly over your Slime Hutch on a broom, laughing the whole time. When you awake and run to the slime hutch you will see that she has changed your slime into a different color.