Skip to main content

Writing a fee calculator

Under construction

This page is being written. The interface is deployed and permissionless; its reference is not published yet. For anything urgent in the meantime, the contact is [email protected].

A fee calculator answers what a swap costs, before the trade executes. Anyone can deploy one and any creator can point a coin at it, within the safety constraints the pool contract enforces.

Will be covered here:

  • the interface to implement, and what the pool passes to it;
  • registration and the configuration payload a creator supplies at creation;
  • how several calculators compose, and what the running fee means for yours;
  • bounds your return value is clamped to, and what happens when your block reverts;
  • gas expectations, and how a block gets reviewed for listing in the app.