claimGovFees() function is looping through all bondNFT assets and does at least 5 * assets.length amount of external calls. This all consumes a lot of gas so, the function will revert.
Proof of Concept
This function will always revert depending on the amount of assets the bondNFT has and can cause additional issues within the protocol.
Tools Used
Manual Review
Recommended Mitigation Steps
Consider limiting the amount of assets the loop can run through or break up the external calls into separate loops and functions.
Lines of code
https://github.com/code-423n4/2022-12-tigris/blob/main/contracts/Lock.sol#L113
Vulnerability details
Impact
claimGovFees()
function is looping through allbondNFT
assets and does at least5 * assets.length
amount of external calls. This all consumes a lot of gas so, the function will revert.Proof of Concept
This function will always revert depending on the amount of assets the
bondNFT
has and can cause additional issues within the protocol.Tools Used
Manual Review
Recommended Mitigation Steps
Consider limiting the amount of assets the loop can run through or break up the external calls into separate loops and functions.