| name | solver-fee |
| description | Solver Fee Skill |
| version | 1.0.0 |
solver-fee Skill
"Fair compensation for coordination. The solver's incentive to find optimal solutions."
Overview
Solver Fee implements fee mechanisms for intent solvers in Anoma-style architectures. Solvers coordinate between intent generators and validators, earning fees for finding optimal matches.
GF(3) Role
| Aspect | Value |
|---|
| Trit | 0 (ERGODIC) |
| Role | COORDINATOR |
| Function | Coordinates fee distribution between parties |
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SOLVER FEE FLOW โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Intent Creator Solver Validator Executor โ
โ (+1 GEN) (0 COORD) (-1 VAL) (output) โ
โ โ โ โ โ โ
โ โผ โผ โผ โผ โ
โ โโโโโโโโโ โโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Offer โโโโโโโโโบโ Match โโโโโโโโบโ Validate โโโโบโ Execute โ โ
โ โ+ fee โ โ+ solve โ โ+ verify โ โ โ โ
โ โโโโโโโโโ โโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ โ โ
โ โ โผ โ
โ โ โโโโโโโโโโโโ โ
โ โโโโโโโโโโโบโ Fee Pool โ โ
โ โโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ Solver Reward โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Fee Models
class FeeModel:
"""Base class for solver fee computation."""
TRIT = 0
def compute_fee(self, intent, solution) -> int:
raise NotImplementedError
class PercentageFee(FeeModel):
"""Fee as percentage of transaction value."""
def __init__(self, basis_points: int = 30):
self.basis_points = basis_points
def compute_fee(self, intent, solution) -> int:
value = solution.output_value
return value * self.basis_points // 10000
class GasPlusPremium(FeeModel):
"""Gas cost plus fixed premium."""
def __init__(self, premium_bps: int = 10):
self.premium_bps = premium_bps
def compute_fee(self, intent, solution) -> int:
gas_cost = estimate_gas(solution) * gas_price()
premium = gas_cost * self.premium_bps // 10000
return gas_cost + premium
class ():
() -> :
sorted_bids = (bids, key= b: b.fee, reverse=)
(sorted_bids) >= :
sorted_bids[].fee
sorted_bids[].fee sorted_bids
GF(3) Fee Conservation
class GF3FeeDistribution:
"""Distribute fees while maintaining GF(3) conservation."""
def distribute(self, total_fee: int) -> dict:
"""
Split fee across GF(3) roles.
GENERATOR (+1): Intent creator rebate (optional)
COORDINATOR (0): Solver fee
VALIDATOR (-1): Validator reward
Sum must balance.
"""
solver_share = total_fee * 60 // 100
validator_share = total_fee * 30 // 100
rebate = total_fee - solver_share - validator_share
return {
'generator': rebate,
'coordinator': solver_share,
'validator': validator_share,
'sum': rebate + solver_share + validator_share,
'conserved': True
}
Juvix Implementation
-- Solver fee in Juvix
module SolverFee;
type Fee := mkFee : Nat -> Fee;
computeFee : Intent -> Solution -> Fee;
computeFee intent solution :=
let value := solution-output-value solution in
let bps := 30 in -- 0.30%
mkFee (value * bps / 10000);
type FeeDistribution :=
mkDistribution : Fee -> Fee -> Fee -> FeeDistribution;
-- Fields: solver, validator, rebate
distribute : Fee -> FeeDistribution;
distribute (mkFee total) :=
let solver := total * 60 / 100 in
let validator := total * 30 / 100 in
let rebate := total - solver - validator in
mkDistribution (mkFee solver) (mkFee validator) (mkFee rebate);
Integration with Anoma Intents
def solve_with_fee(intent, solver):
"""
Complete solving workflow with fee handling.
GF(3) triad:
- intent (+1): User creates
- solver (0): Finds match
- validator (-1): Verifies
"""
solution = solver.solve(intent)
fee = compute_fee(intent, solution)
solution.solver_fee = fee
solution.solver = solver.address
return solution
GF(3) Triads
solver-fee (0) โ anoma-intents (+1) โ intent-sink (-1) = 0 โ
solver-fee (0) โ polyglot-spi (+1) โ dynamic-sufficiency (-1) = 0 โ
solver-fee (0) โ aptos-gf3-society (+1) โ merkle-proof-validation (-1) = 0 โ
Skill Name: solver-fee
Type: Fee Mechanism / Economic Coordination
Trit: 0 (ERGODIC - COORDINATOR)
GF(3): Coordinates fee distribution between intent roles
Scientific Skill Interleaving
This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
Graph Theory
- networkx [โ] via bicomodule
Bibliography References
general: 734 citations in bib.duckdb
SDF Interleaving
This skill connects to Software Design for Flexibility (Hanson & Sussman, 2021):
Primary Chapter: 4. Pattern Matching
Concepts: unification, match, segment variables, pattern
GF(3) Balanced Triad
solver-fee (+) + SDF.Ch4 (+) + [balancer] (+) = 0
Skill Trit: 1 (PLUS - generation)
Secondary Chapters
- Ch1: Flexibility through Abstraction
Connection Pattern
Pattern matching extracts structure. This skill recognizes and transforms patterns.
Cat# Integration
This skill maps to Cat# = Comod(P) as a bicomodule in the Prof home:
Trit: 0 (ERGODIC)
Home: Prof (profunctors/bimodules)
Poly Op: โ (parallel composition)
Kan Role: Adj (adjunction bridge)
GF(3) Naturality
The skill participates in triads where:
(-1) + (0) + (+1) โก 0 (mod 3)
This ensures compositional coherence in the Cat# equipment structure.