ForeverMoney SN98 Docs


OVERVIEW

What is ForeverMoney

Getting Started

Alphanomics


FOR LPs

Why Deposit

Vault Types

Risks and Protections


FOR MINERS

Miner Guide & Requirements

Registration Guide

Strategy Implementation

Scoring Deep Dive


ARCHITECTURE

System Design

API Reference

Your strategy is a function that maps state to positions.


The Handler

Implement rebalance_query_handler to respond to validator queries. You receive the current state and return your desired positions.

async def rebalance_query_handler(self, synapse: RebalanceQuery) -> RebalanceQuery:
    # 1. Decide if you want this job
    synapse.accepted = True

    # 2. Analyze current state
    price = synapse.current_price
    positions = synapse.current_positions
    inventory = synapse.inventory_remaining

    # 3. Return desired positions
    synapse.desired_positions = your_strategy(price, positions, inventory)

    # 4. Add metadata
    synapse.miner_metadata = MinerMetadata(
        version="1.0.0",
        model_info="my-strategy-v1"
    )
    return synapse

What You Receive

Each RebalanceQuery includes:


What You Return

Return current_positions as desired_positions to keep positions unchanged (no rebalance).


Strategy Tips

<aside> 🎯 Capital preservation beats aggressive fee chasing. The scoring system rewards stability.

</aside>