Steemhunt/mint.club-v2-contract

A large lockUp length may result in reverts and extended transaction processing delays.

Closed this issue · 2 comments

inside the locker.locker and sol::getLockUpIdsByReceiver.Sol::getLockUpIdsByToken, a large lockUp length may result in reverts and extended transaction processing delays.

consequence-
the use of an array in the locker to store user information.sol::createLockUp could lead to an overly complex for loop that uses more computing power than is available. As a result, transactions could experience reversals and delays. The larger the lockupLength, the more serious this problem is.

view
prove of script

Recommendation-
It is recommended to investigate less dependant on for loop iterations and more gas-efficient alternatives for storing user lockup data. This can lessen the chance of reverts and minimize any transaction delays.

0x7F60eCB087eF0b852C19d5248b57e472F7066B5C

Duplicates with: