This section is a detailed walk-through of the hook’s internal math, calculation flow, and key design decisions. It’s the heart of the hook. This is where all the magic happens.
The contract is built so that all calculations live in separate modules. We hope this breakdown of the math, the alternatives considered, the modular library structure, and the MIT license make it easy to either contribute to the project or freely adapt it to any needs.
The Median, Snapshot, and Curve pages cover the solutions we chose.
The Alternatives pages cover the other approaches we considered but rejected, and why.
Pages in this section
Frugal2U Median
Specifies the Frugal2U median approach used in the Hook.
Median: Comparison with Other Options
Compares the selected median approach against alternative methods.
Penalty Curve
Defines the penalty-curve model and its role in Hook calculations.
Penalty Curve: Comparison
Compares the selected penalty curve against alternative curve designs.
Last modified on August 9, 2026