> ## Documentation Index
> Fetch the complete documentation index at: https://pulse-hook.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Curve Alternatives

The hook uses a `frac^1.5` penalty curve. We talked about it here.

But there are plenty of curves. Always have been. Here any developer will find options to implement in Pulse Hook if for example the hook that punishes aggressive bidders more harshly is needed.

## 1. Linear (`frac^1`)

<Frame>
  <img alt="Frame 47" title="Frame 47" lightAlt="Frame 47" darkAlt="Frame 47" src="https://mintcdn.com/pulse-hook/aCc5bHEvzSklvwEK/images/Frame-51.png?fit=max&auto=format&n=aCc5bHEvzSklvwEK&q=85&s=7e22554026ee66a71eb260037f3d3092" className="dark:hidden" width="1100" height="700" data-path="images/Frame-51.png" />

  <img alt="Frame 47" title="Frame 47" lightAlt="Frame 47" darkAlt="Frame 47" src="https://mintcdn.com/pulse-hook/aCc5bHEvzSklvwEK/images/Frame-47.png?fit=max&auto=format&n=aCc5bHEvzSklvwEK&q=85&s=87c5232312a581151a8bd31561bc8237" className="hidden dark:block" width="1100" height="700" data-path="images/Frame-47.png" />
</Frame>

```text theme={null}
penalty% = 10 * frac
```

The simplest option: the penalty grows in direct proportion to how far past the threshold the swap is.

**Problem:** it's too aggressive right at the threshold. A swap at 3.5x, only slightly over the 2.7x line and arguably still an eager but honest bidder, already gets hit with a 1.1% penalty. Real MEV / sandwich bidding tends to sit far above the median (5x, 10x+), not just barely above it. A linear curve punishes the "slightly aggressive but honest" trader almost as hard, proportionally, as it punishes genuine outliers, which is the opposite of the goal.

## 2. Quadratic (`frac^2`)

<Frame>
  <img alt="Frame 48" title="Frame 48" lightAlt="Frame 48" darkAlt="Frame 48" src="https://mintcdn.com/pulse-hook/aCc5bHEvzSklvwEK/images/Frame-53.png?fit=max&auto=format&n=aCc5bHEvzSklvwEK&q=85&s=cf7587e85029514e09a562db66280abf" className="dark:hidden" width="1100" height="700" data-path="images/Frame-53.png" />

  <img alt="Frame 48" title="Frame 48" lightAlt="Frame 48" darkAlt="Frame 48" src="https://mintcdn.com/pulse-hook/aCc5bHEvzSklvwEK/images/Frame-48.png?fit=max&auto=format&n=aCc5bHEvzSklvwEK&q=85&s=2d8a8b5a27546d1ff496a6852842ea41" className="hidden dark:block" width="1100" height="700" data-path="images/Frame-48.png" />
</Frame>

```text theme={null}
penalty% = 10 * frac^2
```

The opposite problem: it's too forgiving early, then whips up sharply near the cap. At 4.5x the penalty is only 0.61% (barely a deterrent), but between 8x and 10x it accelerates fast. This creates a narrow "danger zone" right before the cap where the fee jumps a lot for a small change in tip: a swap bidding 8.5x pays 6.31%, but 9.5x already pays 8.68%. That's a steep, hard-to-predict gradient exactly where users are most likely to be bidding competitively.

This was actually the curve chosen while the hook was being brainstormed. It's not bad, but it was considered too cruel in the "danger zone" above.

## 3. Step zones ("big steps")

<Frame>
  <img alt="Frame 46" title="Frame 46" lightAlt="Frame 46" darkAlt="Frame 46" src="https://mintcdn.com/pulse-hook/aCc5bHEvzSklvwEK/images/Frame-50(1).png?fit=max&auto=format&n=aCc5bHEvzSklvwEK&q=85&s=e115d999af106a116835f2de5d0a3693" className="dark:hidden" width="1100" height="700" data-path="images/Frame-50(1).png" />

  <img alt="Frame 46" title="Frame 46" lightAlt="Frame 46" darkAlt="Frame 46" src="https://mintcdn.com/pulse-hook/aCc5bHEvzSklvwEK/images/Frame-46.png?fit=max&auto=format&n=aCc5bHEvzSklvwEK&q=85&s=b824cb2ac95b27c1a95deac24b1fa613" className="hidden dark:block" width="1100" height="700" data-path="images/Frame-46.png" />
</Frame>

```text theme={null}
penalty% = 1%  if 2.7x <= ratio < 4.7x
         = 3%  if 4.7x <= ratio < 6.7x
         = 6%  if 6.7x <= ratio < 8.7x
         = 10% if ratio >= 8.7x
```

Cheapest to compute (just comparisons, no interpolation or `sqrt`) and easy to reason about.

**Problem:** **cliff edges**. A swap at 4.69x pays 1%, but a swap at 4.71x, essentially the same tip, suddenly pays 3%. That's an obvious incentive to game the boundary: bidders cluster their priority fee just under each threshold rather than bidding what they think the swap is worth. Two nearly identical swaps also end up paying very different fees, which feels arbitrary.

## Why `frac^1.5` was chosen

<Frame>
  <img alt="Frame 52" title="Frame 52" lightAlt="Frame 52" darkAlt="Frame 52" src="https://mintcdn.com/pulse-hook/aCc5bHEvzSklvwEK/images/Frame-52.png?fit=max&auto=format&n=aCc5bHEvzSklvwEK&q=85&s=d661c8b9c2103c0092c4eb0122950c95" className="dark:hidden" width="1100" height="700" data-path="images/Frame-52.png" />

  <img alt="Frame 52" title="Frame 52" lightAlt="Frame 52" darkAlt="Frame 52" src="https://mintcdn.com/pulse-hook/aCc5bHEvzSklvwEK/images/Frame-49.png?fit=max&auto=format&n=aCc5bHEvzSklvwEK&q=85&s=1d270692e72eeb937053b5c8678b3f88" className="hidden dark:block" width="1100" height="700" data-path="images/Frame-49.png" />
</Frame>

I wrote down a target reference table:

* \~1-2% penalty around 4-5x (mild deterrent for slightly-aggressive-but-plausibly-honest bidders)
* \~3-5% around 7x (a real cost starts to bite for clearly aggressive bidding)
* exactly 10% at 10x (the hard cap)

`frac^1.5` happens to hit almost exactly these numbers. It sits between linear and quadratic: steeper than a straight line, gentler than a square.

## Key takeaway

* **Linear** punishes honest bidders too hard right at the threshold.
* **Quadratic** is too soft early and too steep near the cap.
* **Step zones** are cheapest to compute but create cliff edges that invite gaming.
* `frac^1.5` is smooth - it matches the target penalty shape.
* You can choose other curve if you have other vision of penalty brutality.
