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.
-
Email validation and normalisation were inconsistent across the registration and resend endpoints.
Seen in 1 report
-
Email validation is applied only on the initial registration form and not on the contact info update page.
Seen in 1 report
-
Email verification was checked only when a page loaded, not on each action, so an open session kept access after the email changed.
-
Email-domain and region restrictions are enforced only by client-side JavaScript events with no matching server-side validation.
Seen in 1 report
-
Emergency mode is granted for all positions without checking that the party is not in emergency mode when opening new positions.
Seen in 1 report
-
Emergency withdraw functions did not update reward accounting variables to redistribute forfeited rewards.
-
Emergency withdrawal omits the gauge checkpoint present in the normal deposit and withdraw functions.
Seen in 1 report
-
Empty error data from a deprecated oracle is misinterpreted as out-of-gas.
Seen in 1 report
-
Enabling a bitmap currency failed to clear the previous active currency entry, so the same asset was counted twice in free collateral.
Seen in 1 report
-
Enforcement trusted client-controlled MAC values from two unsynchronised sources and assumed they would match.
Seen in 1 report
-
Entitlement was decided from a user-controlled project relationship instead of an authoritative subscription record.
Seen in 1 report
-
Entitlement was enforced only by client-side routing while the backend onboarding procedure did not check it.
Seen in 1 report
-
Entrance fees go into a general pool split proportionally across all lenders instead of being credited to the originating lender.
Seen in 1 report
-
The entry snapshot omits the locked negative-VPI clawback reserve that is a funded receivable of the pool.
-
Financial bounds and planner funding are evaluated at execution against live account state rather than being fixed at commit.
-
Execution funds the new rebate reserve from the account's free settlement, which the owner still controls until execution, while commit admission only reserves margin and bounty.
-
Execution-time skew and solvency checks use live pool depth with no reservation for committed but unexecuted orders, and the depth-dependent rejection codes are terminal with a full margin refund.
-
Accrued fees are valued using an equivalent liquidity figure calculated from a manipulable spot price.
-
ERC20 approve is called with a new amount instead of adding to the existing allowance.
Seen in 1 report
-
ERC20 transfer is called without checking its return value, so false-returning tokens cause silent failures.
Seen in 1 report
-
ERC20 transferFrom is used without checking its return value instead of a safe transfer variant.
Seen in 1 report
-
Medium
-
-
The return value of a low-level ERC20 transfer call is ignored.
Seen in 1 report
-
Escrow configuration parameters are accepted without validation, allowing a zero duration and a percentage that rounds to zero.
Seen in 1 report
-
The escrow record is not cleared when an order is cancelled or filled.
Seen in 1 report
-
LP shares are estimated from an average of token ratios that is sensitive to reserve fluctuations.
-
ETH was treated as a zero address but an ERC20 balanceOf call was still made on that address.
Seen in 1 report
-
Fee collection assumes both currencies are ERC20 and calls balanceOf on the zero address.
-
The event scan lacks a source-equals-destination guard on the hold release arm.
-
Every hash was processed without stopping on errors and the last result overwrote earlier ones.
-
Every locked name with the cannot-set-resolver fuse was classified as keep-v1 without checking whether the preserved resolver was a custom contract.
Seen in 1 report
-
EVM state changes were not committed before Cosmos SDK code ran, so the EVM state later overwrote the Cosmos state.
-
Multiple state database instances are created during execution and the original is restored after a precompile call, losing intermediate storage changes.
Seen in 1 report
-
Excess funds were sent to the repayment recipient instead of the caller.
Seen in 1 report
-
The executor reward is computed as total payment minus a fee that depends on a live token price.
Seen in 1 report
-
Exempting whitelisted makers from liquidation combined with a margin check on close meant a trader could not exit a profitable position when the maker was underwater.
Seen in 1 report
-
Exercise required every listed token to have a positive amount and be a contract, but order creation did not enforce these conditions.
Seen in 1 report
-
Existing sessions are not invalidated or re-checked server-side on deactivation, relying on delayed session expiry.
Seen in 1 report
-
Exit returns LP tokens to the wrapper without restaking them, so later unstake calls revert.
-
The exit routine resets the pending stake counter to zero before a queued delegation starts, so withdrawal underflows.
Seen in 1 report
-
Exit transfers all LP tokens back without separating donated tokens from user deposits.
Seen in 1 report
-
exitPosition subtracts the pool's current average magnitude rather than the exiting user's stored weight.
Seen in 1 report
-
Expired orders were not filtered out when determining best bid and ask.
-
Expiry relies on block timestamp without accounting for sequencer downtime.
Seen in 1 report
-
Expiry was rounded down to the nearest day instead of up.
Seen in 1 report
-
External contract addresses passed to lend functions are not validated or whitelisted, so a malicious contract can return arbitrary values.
Seen in 1 report
-
Failed Kerberos authentication is treated as a reason to try the next method rather than a fatal error.
Seen in 1 report
-
Failed withdrawals are not stored for retry, so a failed transfer results in permanent loss.
Seen in 1 report
-
The failed-attempt counter is stored client-side in a cookie instead of server-side per account or IP.
Seen in 1 report
-
Fee accounting reduced the total collateral snapshot without updating the total stakes snapshot, so new CDPs got a higher stake than old ones.
Seen in 1 report
-
Fee amounts were not converted from wei to the base denomination before use in transaction validation and building.
Seen in 1 report