The AuctionCalculator class computes taker amounts and auction rate bumps from a limit order struct. This is useful for understanding how the Dutch auction mechanism determines pricing over time.
Key Methods
- AuctionCalculator.fromLimitOrderV3Struct(order) — Creates a calculator instance from a
LimitOrderV3Struct - calcRateBump(blockTimestamp) — Returns the auction rate bump at a given timestamp (in basis points)
- calcAuctionTakingAmount(takingAmount, rateBump) — Returns the adjusted taker amount after applying the rate bump
LimitOrderV3Struct Fields
| Name | Type | Description |
|---|---|---|
| salt | string | Unique value to differentiate orders with identical parameters |
| makerAsset | string | Token address the maker is selling |
| takerAsset | string | Token address the maker is buying |
| maker | string | Address of the order creator |
| receiver | string | Address to receive taker asset (zero address = maker address) |
| allowedSender | string | Restricts who can fill (zero address = anyone) |
| makingAmount | string | Amount of maker asset |
| takingAmount | string | Amount of taker asset |
| offsets | string | Byte offsets for interaction parsing |
| interactions | string | Encoded Fusion-specific data (auction points, resolvers, timing, flags) |