Resolution Process

Information about the resolution process of current round Markets.

The resolution process is permissionless, meaning anyone can trigger market resolution when the conditions are met. This decentralized approach ensures markets are resolved promptly and reliably.

How Resolution Works

Anyone can trigger resolution when the timestamp is valid through two methods:

1. UI Resolution

  • Navigate to the platform interface

  • Click the "Resolve Markets" button

  • The system will resolve all eligible markets

2. Automated Bot Resolution

  • Set up a bot that monitors market status

  • Check if the market's resolution conditions are valid

  • Automatically trigger resolution when conditions are met

Resolver Incentives

To incentivize quick and reliable market resolution, resolvers receive:

40% of the round's trading fees

This reward structure ensures:

  • Markets are resolved promptly

  • Multiple parties are incentivized to maintain resolution availability

  • The system remains decentralized and robust

Setting Up a Resolution Bot

Below is example Python code for checking and resolving active rounds:

from web3 import Web3

# Contract ABI
CONTRACT_ABI = [
    {
        "inputs": [],
        "name": "checkResolutionStatus",
        "outputs": [
            {"internalType": "bool", "name": "isResolvable", "type": "bool"},
            {"internalType": "uint256", "name": "timeRemaining", "type": "uint256"},
            {"internalType": "uint256", "name": "totalResolverFees", "type": "uint256"}
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "resolveMarkets",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    }
]

# Network configuration
RPC_URL = 'https://rpc.hyperliquid-testnet.xyz/evm'
CONTRACT_ADDRESS = "0x52d54450b2850579048A6EF1409991146037abAE"

# Initialize Web3
w3 = Web3(Web3.HTTPProvider(RPC_URL))

# Initialize contract
contract = w3.eth.contract(
    address=Web3.to_checksum_address(CONTRACT_ADDRESS),
    abi=CONTRACT_ABI
)

# Load account from private key
account = w3.eth.account.from_key("PRIVATE_KEY_HERE")

# Main resolution loop
while True:
    try:
        # Check resolution status
        is_resolvable, time_remaining, total_fees = contract.functions.checkResolutionStatus().call()
        
        if is_resolvable:
            # Build transaction
            nonce = w3.eth.get_transaction_count(account.address)
            
            # Estimate gas
            try:
                gas_estimate = contract.functions.resolveMarkets().estimate_gas({
                    'from': account.address
                })
                gas_limit = int(gas_estimate * 1.2)  # Add 20% buffer
            except Exception as e:
                print(f"⚠️ Gas estimation failed, using default: {e}")
                gas_limit = 500000
            
            # Get gas price
            gas_price = w3.eth.gas_price
            
            # Build and sign transaction
            tx = contract.functions.resolveMarkets().build_transaction({
                'from': account.address,
                'nonce': nonce,
                'gas': gas_limit,
                'gasPrice': gas_price,
            })
            
            signed_tx = account.sign_transaction(tx)
            
            # Send transaction
            tx_hash = w3.eth.send_raw_transaction(signed_tx.rawTransaction)
            
            # Wait for receipt
            receipt = w3.eth.wait_for_transaction_receipt(tx_hash, timeout=120)
            
            print(f"✅ Markets resolved! TX: {tx_hash.hex()}")
            print(f"💰 Fees earned: {total_fees}")
        else:
            print(f"⏳ Not resolvable yet. Time remaining: {time_remaining}s")
            
    except Exception as e:
        print(f"❌ Error: {e}")
    # Block time
    time.sleep(1) 

Key Functions

checkResolutionStatus()

Returns:

  • isResolvable: Boolean indicating if markets can be resolved

  • timeRemaining: Seconds until resolution becomes available

  • totalResolverFees: Total fees the resolver will earn

resolveMarkets()

  • Triggers resolution for all eligible markets

  • Transfers 40% of trading fees to the resolver

  • Completes the current round and initializes the next one

Best Practices

  • Monitor regularly: Check resolution status frequently to maximize earnings

  • Gas optimization: Use appropriate gas limits to ensure transactions succeed

  • Error handling: Implement robust error handling for network issues

  • Security: Never expose private keys in code or repositories


The permissionless resolution system ensures markets are always resolved promptly while rewarding community participants for maintaining the protocol.

Last updated