hats-finance / illuminex-0x0bb4aa1f58719707405c231fcdf0b405714799cf

0 stars 1 forks source link

Interfaces Not Inherited but Used in Contract #48

Open hats-bug-reporter[bot] opened 4 months ago

hats-bug-reporter[bot] commented 4 months ago

Github username: -- Twitter username: -- Submission hash (on-chain): 0x3643fd842478dbbabaa148b903ae6918db6795c2b75638619929076375339708 Severity: low

Description: Description\ In the BitcoinProver contract, the interfaces IBitcoinTransactionsVerifier andIBitcoinDepositProcessingCallback` are imported and used, but they are never inherited. This can lead to potential issues if the contract is expected to implement certain functions from these interfaces.

Attack Scenario\ Describe how the vulnerability can be exploited.

Attachments

  1. Proof of Concept (PoC) File

  2. Define the Interfaces: IBitcoinTransactionsVerifier interface declares methods related to transaction verification. IBitcoinDepositProcessingCallback interface declares methods related to processing deposit callbacks.

  3. Implement the BitcoinProver Contract: The contract imports the interfaces and uses their methods. However, it does not inherit from these interfaces, which means it does not explicitly declare that it implements the methods defined in the interfaces.

  4. Issue: By not inheriting the interfaces, the contract might miss implementing required methods, leading to potential runtime errors or unexpected behavior. Inheriting the interfaces ensures that all required methods are implemented and the contract adheres to the expected interface.

  5. Revised Code File (Optional)

    inherite the interfaces before directly using them

rotcivegaf commented 4 months ago

Informational