hats-finance / SafeStaking-by-HOPR-0x607386df18b663cf5ee9b879fbc1f32466ad5a85

HOPR is an open incentivized mixnet which enables privacy-preserving point-to-point data exchange. HOPR is similar to Tor but actually private, decentralized and economically sustainable.
https://hoprnet.org
GNU General Public License v3.0
0 stars 1 forks source link

Complex operations in function may lead to gas running out #56

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

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

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

Description: Description\

The clone function has various complex operations that may lead to running out of gas possibility.

Attack Scenario\

The clone function carried out various gas extensive operations like deploying proxy address and carrying out computation for hash generation that may cause gas running out.

Attachments https://github.com/hoprnet/hoprnet/blob/master/packages/ethereum/contracts/src/node-stake/NodeStakeFactory.sol#L83

Recommendation

The recommendation is made in context of dividing complex operations like hash generation, proxy deploy into different function that may prevent from risk of gas shortage.

QYuQianchen commented 11 months ago

Well-known generic comment. Please provide more substance.