From what I understand, Time-based One Time Passwords used a seed and a mathematical algorithm to generate unique passwords. As the seed is known by the user (or the device used by the user), and the authentication server. However, this means that if the database is leaked, the seed will be known by the attacker.
As with a database leak, an attacker can know both the password and the OTP, does Time-based One Time Password improves security in case of database leak? Or is the goal of OTP only to prevent an attacker to authenticate when he knows the password by another way (another database leak, social engineering...)?