I feel like Law knows a lot more about Kaido than what he has shown so far. Even though Doflamingo was his end all be all, he has always been calculative to the point of only accepting a plan which has relatively high chances of succeeding.
All of his time inconspicuously wandering around PH when Caesar gave him a free pass in exchange for his heart could have been used for peeking at Vegapunk's drafts on lineage factor and dragons.
This could also be the reason why Oda has shown Law having a distinct demeanor throughout this arc where it feels like he knows more than what he lets off.