The Intent Hooks feature enables new functionalities to be built as “hooks” while still being presented to the solver as a normal swap.
For example, the standard intent today is a simple swap. The next type of hook we’re developing is leverage. Traditionally, leverage involves manually or contractually looping a process — for example:
With intent hooks, we abstract that process. The leverage hook executes this looping internally while presenting it to the solver as a standard swap.
So, when a user says “I want to leverage 0.5 BTC three times,” the UI calls the solver with what looks like a single swap intent. Behind the scenes, the hook builds a sequence of swaps (buy → swap → buy → swap) and delivers the final intent back to the user.
The solver itself doesn’t know it’s processing leverage — it only sees swap calls.
The custom hook handles the complexity.
The first step is building the underlying infrastructure for intent hooks. Once this foundation is in place, we’ll start developing specific hooks like leverage and others that extend intent functionality.