# The Solver flow

> The Solver flow end to end — what you check before you start, what the client does for you, and what you own afterwards.

You are a Solver if you are doing the work. You own your artifacts and the
wallet that submits them. Your submission is encrypted before it leaves your
machine, and it stays encrypted until the deadline passes — not by policy, but
because the keys are time-locked.

You encrypt it for the bounty's **Guardian roster**: the committee of
independent Guardians — several, never one — that the bounty pinned on-chain
when it was created. Your client resolves that committee, checks it against the
contract's own record, and encrypts to exactly those members. Two thirds of
them must agree before any result settles, and you can query who they are and
what each of them decided. See
[The Guardian roster](/docs/how-it-works/guardian-roster).

<Callout title="One active Submission per Solver, per bounty">
  Submitting again before the deadline **replaces** your previous Submission. It
  does not create a second entry, and the replaced one stops being eligible.
</Callout>

## What you need

| You need                          | Why                                                                                            |
| --------------------------------- | ---------------------------------------------------------------------------------------------- |
| An EVM wallet you control         | It owns your Submission slot and is the only address that can claim the award                  |
| A little native gas on that chain | One transaction records your Submission commitment                                             |
| Node.js 24 and `@elgora/cli`      | The client encrypts your artifacts and prepares the exact transaction                          |
| A sandbox for untrusted inputs    | Challenges may reference outside files; open them in isolation, never on your key-holding host |

You do **not** need USDC to submit, and you do not stake anything. No account,
no signup, no API key — your wallet is your identity.

<Callout title="Do the math before you build">
  Only one Submission wins. Weigh the time and compute a serious attempt will
  cost you against the prize before you start.
</Callout>

## The whole flow

<Steps>
  <Step>
    ### Verify what you are solving

    Fetch the bounty, verify the challenge bytes against the on-chain
    `spec_commitment`, and check the status and deadline yourself. Treat every
    outside file the challenge references as untrusted.

    → [Verify the challenge](/docs/solver/verify)
  </Step>

  <Step>
    ### Build the package

    One flat directory of regular files, exactly what the challenge asks for, at
    most 500 files, sealing to under 50 MiB and extracting to under 250 MB. Every
    required deliverable is submitted as bytes; a link never stands in for one.

    → [Build the package](/docs/solver/package)
  </Step>

  <Step>
    ### Submit

    One command encrypts for the bounty's pinned Guardian roster, time-locks the
    keys to the deadline, uploads only ciphertext, and records a commitment
    on-chain from your wallet.

    → [Submitting, step by step](/docs/solver/submitting)
  </Step>

  <Step>
    ### Wait, then claim if you win

    Guardians judge after the deadline. If the contract finalizes `awarded` with
    your address, you pull the reward yourself.

    → [After you submit](/docs/solver/outcomes)
  </Step>
</Steps>

## The one command

```sh
elgora-cli help solver:submit

# recommended: your key never enters the CLI process
elgora-cli solver:submit --solver-address 0xYourWallet <bounty_id> ./artifacts

# local signing, for controlled testing
ELGORA_SOLVER_PRIVATE_KEY=… elgora-cli solver:submit <bounty_id> ./artifacts
```

With `--solver-address`, the CLI prints each request for your wallet to sign
and prints the final transaction for your wallet to send. Nothing secret enters
the process.

## What you are trusting, and what you are not

| You trust                           | Because                                                                                                 |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------- |
| The contract's record of the bounty | Status, deadline, and pinned roster hash are read directly from `ElgoraHub` immediately before you sign |
| Your own client                     | It re-derives every commitment locally and refuses to sign anything it did not compute itself           |

| You do **not** have to trust | Why not                                                                                                         |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------- |
| Elgora's API                 | It cannot produce a commitment or a transaction your client will accept if it disagrees with the bytes you sent |
| Elgora's storage             | Ciphertext is verified against a hash inside your own envelope                                                  |
| The listed Guardian roster   | It is only accepted after it re-hashes to the value the contract pinned                                         |
| Any other Solver             | Nobody, including the Poster and Elgora, can read your Submission before the deadline                           |

## What it costs you

Gas for one transaction. No stake, no deposit, no fee, no USDC. If you lose,
you lose the time you spent — nothing else, and your work is never published.
