Claim Rewards
When a data submission wins a target, the reward splits 50/50 between the data submitter and the winning model. Rewards become claimable after a challenge window of 2 epochs, during which validators audit the submission. If the submission passes audit, the reward is claimable. If it’s fraudulent, the submitter’s bond is forfeited.
Anyone can claim rewards for any target — you don’t have to claim your own. The claimer receives a 0.5% finder’s fee from the reward pool as an incentive. In practice, this means bots will claim settled targets automatically, and your rewards will flow to your wallet without you doing anything. The script below is useful for claiming immediately or if you want to collect finder’s fees yourself.
For more on reward mechanics, see Economics.
Source:
settle_targets.py
Claim your rewards
Section titled “Claim your rewards”uv run claimThis runs settle_targets.py, which finds all claimable targets and claims rewards for each:
async def run(): secret_key = os.environ.get("SOMA_SECRET_KEY") if not secret_key: print("Error: SOMA_SECRET_KEY not set in environment or .env file") return
kp = Keypair.from_secret_key(secret_key) sender = kp.address() print(f"Sender: {sender}")
client = await SomaClient(chain="testnet")
balance = await client.get_balance(sender) print(f"Balance: {balance:.2f} SOMA")
targets = await client.get_targets(status="claimable", submitter=sender) print(f"Found {len(targets)} claimable target(s)")
if not targets: print("Nothing to settle.") return
settled = 0 for target in targets: print(f"\nSettling target {target.id} (reward_pool={target.reward_pool})") try: await client.claim_rewards(signer=kp, target_id=target.id) print(f" Settled {target.id}") settled += 1 except Exception as e: print(f" Failed to settle {target.id}: {e}")
balance = await client.get_balance(sender) print(f"\nSettled {settled}/{len(targets)} target(s)") print(f"Balance after settling: {balance:.2f} SOMA")The script is registered as a CLI entry point in pyproject.toml, so uv run claim works directly from the quickstart repo.
How rewards work
Section titled “How rewards work”When a target is filled, the reward splits:
- 50% to the data submitter who found data within the distance threshold
- 50% to the winning model whose weights produced the lowest loss on that data
Both parties must claim their share explicitly. Rewards are locked for a 2-epoch challenge window after submission. During this window, a random validator audits the result.
Model developer rewards (commission) are claimed the same way. Claimed commission is added to your model’s stake pool, automatically increasing your routing priority and chance of being assigned to future targets. You can unstake at any time.
Merge coins after claiming
Section titled “Merge coins after claiming”Each claim creates a separate coin (SOMA object) in your wallet. After claiming many targets, you may have hundreds of small coins. This can cause InsufficientBond or gas payment errors on future transactions, because the network requires a single coin large enough to cover the bond or gas — it won’t automatically combine them.
Merge your coins periodically to consolidate them into one:
soma merge-coinsOr via the SDK:
await client.merge_coins(signer=kp)Check claimable rewards
Section titled “Check claimable rewards”soma target list --claimableThe CLI shows claimable targets and their reward pools.