gas limit DoS via unbounded operations
Only one attack will lead to two types of vulnerabilities in `UserManager.sol` and `UToken.sol`\\nOn `UserManager.sol` ==> `updateTrust()` Case one: malicious users (members) can keep `vouching` Alice with `trustAmount == 0` until his `vouchers` array achieves the max limit (2**256-1) So when a normal member tries to give `vouching` to Alice with `trustAmount != 0` he will find because the `vouchers` array completely full.\\nCase two (which is more realistic ): malicious users (members) can keep `vouching` Alice with `trustAmount == 0` until his `vouchers` array achieves late's say 20% of max limit (2**256-1) The problem is when Alice invoke `borrow()` or `repayBorrow()` on `UToken.sol`\\n```\\n   IUserManager(userManager).updateLocked(msg.sender, uint96(amount + fee), true);\\n  …\\n  IUserManager(userManager).updateLocked(borrower, uint96(repayAmount - interest), false);\\n```\\n\\nIt will call `updateLocked()` on `UserManager.sol`\\n```\\n   function updateLocked(\\n        address borrower,\\n        uint96 amount,\\n        bool lock\\n    ) external onlyMarket {\\n        uint96 remaining = amount;\\n\\n        for (uint256 i = 0; i < vouchers[borrower].length; i++) {\\n \\n```\\n\\nThe for loop could go through `vouchers[]` which could be long enough to lead to a "gas limit DoS via unbounded operations" And the same thing with `registerMember()`, any user could lose all their fund in this transaction\\n```\\n       function registerMember(address newMember) public virtual whenNotPaused {\\n        if (stakers[newMember].isMember) revert NoExistingMember();\\n\\n        uint256 count = 0;\\n        uint256 vouchersLength = vouchers[newMember].length;\\n\\n        // Loop through all the vouchers to count how many active vouches there\\n        // are that are greater than 0. Vouch is the min of stake and trust\\n        for (uint256 i = 0; i < vouchersLength; i++) {\\n```\\n
Add check for `trustAmount == 0`
1- The user couldn't get any more `vouching` 2- The user will be not able to `borrow()` or `repayBorrow()` 3- No one can in invokeregisterMember() successfully for a specific user
```\\n   IUserManager(userManager).updateLocked(msg.sender, uint96(amount + fee), true);\\n  …\\n  IUserManager(userManager).updateLocked(borrower, uint96(repayAmount - interest), false);\\n```\\n