consider a cubic object of mass m = v*ρ_solid and volume v = a^3 that is floating and stationary in a liquid of density ρ_l, such that a volume v_s of the object is submerged. compute the period of the oscillations if we displace the object by a small amount (in the vertical direction) from its equilibrium position.

hint: recall archimedes' principle: the buoyant force is equal to the weight of the volume of liquid displaced.

surface area of cube = a^2

additional volume immersed if pushed down distance z
= -a^2 z
force up due to that motion down = -rho g a^2 z
so
F = m d^2 z /dt^2 = - rho g a^2 z where rho is rho liquid, just using m for now
let z = h sin w t
then d^2 z /dt^2 = - w^2 h sin w t
so
- m w^2 h sin w t = - rho g a^2 h sin w t
w^2 = rho g a^2 /m = (2 pi f)^2 = (2 pi/T)^2
note m = RHOsolid a^3

By the way, the water itself around the object has to be accelerated when you do this in real life leading to what naval architects call "added mass" and a lower frequency than this calculation would yield.