King

Become the king of the contract by preventing others from taking the throne.

Vulnerable Code
Analyze the Solidity code below to find the vulnerability.
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract King { address king; uint public prize; address public owner; constructor() payable { owner = msg.sender; king = msg.sender; prize = msg.value; } receive() external payable { require(msg.value >= prize || msg.sender == owner); payable(king).transfer(msg.value); king = msg.sender; prize = msg.value; } function _king() public view returns (address) { return king; } }
Submit Explanation
Explain the vulnerability and how to exploit it.
Hints (3)
Just a little peak
Hint 1
Hint 2
Hint 3
Explanation
Discomfort = Learning