all void warranty if used for mining. but if you dont tell them it was used for mining, how will they know

With old GPUs its impossible to tell because you can always flash back to stock bios. However maybe newer GPUs got some type of bios lock or bios counter similar to what some Android phones had to prevent rooting. No idea if its implemented yet however.
Usually there is nvram storage for things like OC history, max temps and power usage, etc. all retrievable by .manufacturer in warranty claim