* Standard design patterns ensure that protocol contracts only accept or hold capital that is actively tracked via localized state accounting variables.
* The inclusion of an unmonitored native `receive()` function allows incoming ether transfers without validating, tracking, or updating internal ledgers. Consequently, arbitrary transaction margins or direct transfers are trapped inside the contract with no corresponding recovery functions.
## Risk
### Likelihood
- End users manually send native network assets directly to the contract address layout instead of passing calls through explicit function definitions.
- Interacting wallets specify input amounts exceeding the mandatory 1 ETH minimum baseline threshold parameter.
### Impact
- Transacted value is permanently frozen within the runtime environment because no internal functional loops read from or leverage `address(this).balance`.
- Core financial parameters like platform fee totals and matching pools fail to recognize the trapped balance.
---
## Proof of Concept
The test validation demonstrates how native transfers can lock capital. Sending native assets directly through the unmonitored callback loop increases the contract's overall token profile balance without allocating an identifiable recovery claim to the originating wallet address.
```solidity
function test_DirectReceiveTrapsEth() public {
vm.deal(alice, 1 ether);
vm.prank(alice);
(bool success, ) = address(likeRegistry).call{value: 1 ether}("");
assertTrue(success);
assertEq(address(likeRegistry).balance, 1 ether);
assertEq(likeRegistry.userBalances(alice), 0);
}
```
---
## Recommended Mitigation
Restrict payment parameters to exact limits and eliminate open callback definitions that accept loose assets.
```diff
- receive() external payable {}
+ require(msg.value == 1 ether, "Must send exactly 1 ETH");
```
Root cause in the codebase with @> marks to highlight the relevant section