lsanil wrote:
Is is true to that for a given YubiKey model, they have same attestation cert?
No, that is incorrect. The attestation certificate is unique per batch, not per model. In practice this means that 2 devices of the same model may have the same certificate, but not necessarily so. It's also possible that a batch spans multiple firmware versions, so it's possible for two devices with different versions to have the same certificate.
lsanil wrote:
Is there a way to detect duplicate registration from the same key?
Yes, this is part of the U2F specification. Assuming you're using the latest high level JS api, the call to u2f.register() takes a list of "RegisteredKey" objects, where each entry represents an already registered U2F device. The purpose if this is exactly to avoid the problem you've stated of registering the same device multiple times. Each "RegisteredKey" contains an existing keyHandle used to check if the device is already registered. See the JS API specification for more exact details:
https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-javascript-api-v1.2-ps-20170411.html