sherlock-audit / 2023-01-derby-judging

4 stars 1 forks source link

Avci - incidentally sent eths/tokens will lock in the contract because it cannot handle it #394

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

Avci

medium

incidentally sent eths/tokens will lock in the contract because it cannot handle it

Summary

incidentally sent eths/tokens will lock in the contract because it cannot handle it

Vulnerability Detail

the contract doesn't have logic for handling funds than were accidentally sent to the contract address.

Impact

thus it will cause funds stuck in the contract forever. and fund loss

Code Snippet

https://github.com/sherlock-audit/2023-01-derby/blob/main/derby-yield-optimiser/contracts/Game.sol#L1-L686

// there is no function implemented for receiving funds and rescuing funds

Tool used

Manual Review

Recommendation