In-depth lesson · Business logic
Root causes
Every point the Business logic reports back under this heading, best-backed first, each with the reports it is seen in.
-
The interest rate is recalculated on every borrow or repay, so frequent updates compound the effective rate more often than intended.
Seen in 1 report
-
The interest rate is stored at the pool level and can be updated by the lender at any time, while the borrower cannot specify a maximum acceptable rate.
Seen in 1 report
-
The interest rate model allows zero interest even at high utilisation, removing the incentive to repay.
Seen in 1 report
-
The interest realisation function unconditionally called the vault's borrow even when realised interest was zero, and that call was blocked while paused.
Seen in 1 report
-
The interest update check uses stale total asset and borrow values, so the calculated rate change often falls below the threshold and interest is skipped.
-
The interface declares a function name that does not match the actual vesting contract's function.
Seen in 1 report
-
The interface does not mark buyPunk as payable and the call attaches no value, so the target's value check fails.
Seen in 1 report
-
The interface tracks the active voice separately from the identity used to submit the action, so they can diverge after certain interactions.
Seen in 1 report
-
The internal batch swap call omits forwarding the received ETH value, so ETH sent to the payable entry function is never passed on.
Seen in 1 report
-
The internal check uses less-than-or-equal instead of less-than when comparing the individual collateral ratio against the total collateral ratio.
Seen in 1 report
-
The internal locked-ETH counter is incremented by the requested amount rather than the actual stETH balance change, ignoring Lido's one or two wei rounding corner case.
Seen in 1 report
-
The internal message handler for initial account data does not verify the sender or the data before validators use it.
Seen in 1 report
-
The internal rate helper always reads the stored exchange rate and never checks the use-current parameter.
Seen in 1 report
-
The internal transfer function lacks the pause modifier that allocate and depositAndAllocate have.
-
The internal withdraw path skipped the reserve deposit-allowed check that the deposit path enforced.
-
The intersection check only verifies each taker ID appears somewhere in the maker list, without rejecting duplicates within one collection.
-
The intersection check runs on the full sell and buy lists instead of only the constructed items.
Seen in 1 report
-
The interval start time was set to the current timestamp instead of advanced by whole intervals, discarding the remainder.
Seen in 1 report
-
The intervals setter updates two tuning parameters but omits the dependent tune-below-capacity value.
Seen in 1 report
-
The invariant and upper-bound design lets liquidity providers withdraw at will when the safe upper bound shifts, so timing rather than fairness decides who exits first.
Seen in 1 report
-
The invariant calculation summed raw token amounts without scaling by decimals, unlike the swap path.
-
The invariant compares a rent-inclusive lamport balance against a rent-exclusive reserve figure without subtracting the rent-exemption amount.
Seen in 1 report
-
The invariant function multiplies after division, causing rounding errors that make the invariant check inaccurate.
Seen in 1 report
-
The investedAssets calculation does not deduct the performance fee that would be charged upon withdrawal.
-
The invitation flow did not preserve the pending state across login, so signing in completed the join automatically.
Seen in 1 report
-
The invitation flow did not verify the sender's email address and did not enforce the intended length limit on the name field.
Seen in 1 report
-
The invitation flow reserves an email for the organisation without consent and the app enforces single-organisation membership with no way to leave.
Seen in 1 report
-
The invitation handler did not verify that the referenced project ID existed before storing the request.
-
The invitation identifier was returned in the resend response and the signup endpoint accepted it without checking that the person completing signup was the invited user.
Seen in 1 report
-
The invitation limit is enforced only in the default UI and not in the underlying endpoint.
Seen in 1 report
-
The invitation link is built from a client-supplied host header instead of a fixed trusted hostname.
-
The invitation link was not invalidated after its first use, so it stayed valid indefinitely.
Seen in 1 report
-
The invitation process reserved the email address immediately without checking consent or existing legitimate signups.
Seen in 1 report
-
The invitation token is not bound to the invited email address.
Seen in 1 report
-
The invitation token was base64-encoded user data with no integrity protection.
Seen in 1 report
-
The invitation token was not validated as a genuine token, so a user ID could be used instead.
Seen in 1 report
-
The invitation was not marked as used or deleted after acceptance, so the token stayed valid.
-
The invitation workflow for an existing account left the account in a state where the forgot-password restriction was not applied.
Seen in 1 report
-
The invite endpoint lacked rate limiting and CAPTCHA, allowing automated repeated requests.
Seen in 1 report
-
The invite feature creates a user record for the invited email without requiring the invite to be accepted, and the signup flow treats that record as an existing account.
-
The invite flow attached the invitee before acceptance without checking the plan was paid, and the seat limit trusted a client-supplied seat count.
Seen in 1 report
-
The invite flow compared email addresses case-sensitively instead of normalising them before checking for duplicates.
Seen in 1 report
-
The invite flow creates a user record for any unregistered email without checking whether that email belongs to an existing service account, and the predictable email format lets an outsider target it.
-
The is_liquidation parameter was hardcoded to 1 in all calls to transfer_internal, including regular transfers, instead of being set based on the transfer type.
Seen in 1 report
-
The isIncrease flag was passed to the liquidatable check instead of false.
-
The issuance handler called a rewards calculation that performs storage reads without first charging the storage-read gas.
-
The issue creator is taken from the Reply-To header rather than the From header.
Seen in 1 report
-
The issue function did not clear the staked-at timestamp when minting an irrevocable token, unlike the revocable path.
-
The issue function has no minimum output parameter.
Seen in 1 report
-
The issue function lacks access control and accepts an arbitrary recipient.
Seen in 1 report