I enjoyed reading the vessyl site because it explained nothing at all about how it works, so I immediately applied my engineering gut sense to trying to figure out how I'd make one if I wanted to. Small scale calorimetry heating and cooling with a peltier device a couple degrees at a time? That works for metals and phase transitions but probably not enough to tell diet sodas apart. Some kind of high res ultrasound to analyze waves and thus viscosity and thus density/composition? Personally I'd go all EE on it and shove a modest AC signal thru a big capacitor and get the dielectric constant of the "stuff" in the cup. A really accurate capacitive sensor to tell exact volume with a really accurate force sensor on the base to read weight/mass and a decent thermistor to calibrate for temp and you've got density at a specific temp. Once the raw data is in there, I'm guessing its all just lookups and best fits and the like.