The documentation states that role providers can be externally owned accounts (EOAs), but the code only allows the initial deployer to be an EOA provider. Any other EOA added via addRoleProvider will cause a revert because the contract attempts to call isPullProvider on it, which an EOA cannot implement.
The onQueueWithdrawal function in AccessControlHooks does not verify that the caller is a hooked market, allowing anyone to call it with arbitrary hookData. This could let an attacker front-run a lender's withdrawal transaction by submitting the same credential, causing the honest transaction to revert and potentially leading to a temporary denial of service for markets using short-lived credentials.
Withdrawal batches pay all users in the batch at the same rate, so when a market closes with an outstanding expiry batch, new withdrawers join the old batch and are dragged down to its lower rate. This incentivises users to keep funds in the contract until the expiry timestamp to get a higher rate, rather than withdrawing immediately.
The FixedTermLoanHooks contract allows the borrower to change the annual interest rate (APR) even during a fixed term period when lenders cannot withdraw. This lets the borrower reduce the APR to zero, effectively denying lenders the interest they expected.
A role provider could bypass the intended restriction that prevents it from lowering a credential's expiry set by another provider. By first extending the expiry slightly and then reducing it, the provider could shorten a user's role duration, potentially affecting a lender.
A market using a fixed-term hook lets the borrower close the market early, but the hook's fixed-term end time is not reset, so lenders cannot withdraw their funds until the original term expires. An attacker (the borrower) could lock all lender assets indefinitely by closing the market before the term ends.
The report shows that some functions update the market state before pulling funds from the borrower, while repay functions pull funds first. This inconsistency causes borrowers to pay extra fees when using the state-first functions.
The FixedTermLoanHook contract checks block.timestamp instead of the provided expiry when validating withdrawal requests, causing users to wait an extra withdrawalBatchDuration beyond the term end. This delays withdrawals but does not allow early withdrawal or loss of funds.
Blocked accounts' scaled balances are moved to an escrow contract that still earns interest, contrary to the whitepaper's claim that interest does not accrue in escrow. An attacker could not directly exploit this, but it means sanctioned lenders continue to accrue interest while blocked.
When a withdrawal batch expires, the market updates the interest scale factor only up to the expiry timestamp rather than the current block timestamp, so lenders in that batch are paid interest only up to expiry. If the batch is then paid out, those lenders lose the interest accrued between expiry and the actual payment time.
The _blockAccount function called createEscrow with the borrower and account arguments swapped, so the escrow recorded the wrong parties. A borrower could then release the escrow and withdraw the sanctioned lender's funds.
A lender whose account is sanctioned can transfer their MarketTokens to other accounts and then call a function to grant those accounts the WithdrawOnly role, allowing them to withdraw funds despite the sanction. This lets them escape the blacklisting.
The codehash check used to detect existing contract code is insufficient because an address with a non-zero balance but no code returns keccak256("") instead of bytes32(0). An attacker can send 1 wei to a computed CREATE2 address, causing deployment functions to revert or skip escrow deployment, potentially locking borrowers out or making funds unrecoverable.
The market contracts restricted setMaxTotalSupply and closeMarket to the controller, but the controller exposed no borrower-facing function to call them. As a result the borrower could not raise or lower a market's supply cap or shut down an unused market, and kept paying interest on idle capacity.
The borrower could change a market's annual interest rate outside the bounds set by the protocol because the controller function lacked validation. This allowed the borrower to set an interest rate below the minimum, violating protocol constraints.
The contract calls ERC20 transfer() without checking its return value, so a failed transfer may go unnoticed. Also, some tokens like USDT do not return a boolean, causing calls to revert when cast to IERC20.
When the withdrawal batch duration is zero, lenders can queue and execute withdrawals in the same block, allowing them to withdraw more than the batch's paid assets. This breaks the invariant that lenders cannot withdraw more than their pro-rata share.
The collectFees() function calls _writeState() before transferring assets to the fee recipient, so totalAssets() is higher than it should be when checking delinquency. This could cause the market to be incorrectly marked as not delinquent, allowing the borrower to avoid paying the delinquency fee for a period.
The create2WithStoredInitCode function does not check whether the CREATE2 opcode returned address(0) when contract deployment fails, so deployMarket does not revert. As a result, users pay the origination fee for a failed deployment and the market address is registered, preventing future deployment with the same parameters.
When a borrower closes a delinquent market, the contract only charges the debt based on the current scale factor, ignoring remaining penalty fees that would accrue as the delinquency timer counts down. This lets the borrower avoid paying half of the penalty, and the last lender to withdraw bears the shortfall.
When a market is removed from the WildcatArchController, the createEscrow function still checks only isRegisteredMarket, so calls from removed markets revert. This prevents nukeFromOrbit and executeWithdrawal from working for sanctioned lenders, letting them keep interacting with the market.
A borrower can repeatedly call setAnnualInterestBips() to reduce the interest rate by a tiny amount, which resets the market's reserve ratio to 90% for two weeks. By repeating this every two weeks, the borrower can keep the reserve ratio at 90% indefinitely, even if the market was deployed with a higher ratio, reducing the assets available for lenders to withdraw.
The borrower repays the pending withdrawal debt, but the market does not process the repayment until the withdrawal batch expires, so interest and fees continue to accrue on the repaid amount. The borrower therefore pays extra interest and fees until the cycle ends.
The withdrawal batch payment calculation rounds up the asset amount, which can make totalDebts() exceed the market's asset balance and incorrectly mark the market as delinquent. This can cause the borrower to pay a higher interest rate or make a closed market delinquent.
Markets store a lender's deposit as a fixed scaled balance, so when a rebasing token changes every holder's balance the lender's recorded claim does not follow it. Lenders could therefore lose funds, with the extra balance only reachable by the borrower.
TW
The Wildcat Protocol
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.