# Project Flow (Pay)

The **Project Flow** describes how a treasury operator posts a bounty, accepts a researcher, and pays the bounty privately.

## Flow Overview

> Sign in → Post bounty → Accept application → Pay → Send ticket off-chain

{% stepper %}
{% step %}

### Sign In With Wallet

Visit `/bounties` and click **Sign in with wallet**.

* One Solana wallet message signature (ED25519)
* JWT issued (valid 1 hour)
* No email, password, or KYC

The signed challenge is sent to the Railway-hosted auth-server, which returns a JWT scoped to your wallet.
{% endstep %}

{% step %}

### Post a Bounty

Click **New bounty** and fill the form:

* **Title** — short description of the vulnerability scope
* **Description** — full eligibility criteria and acceptance rules
* **Reward Amount** — in SOL or supported SPL token
* **Deadline** — application cutoff date
* **Contact handle** — Telegram or Discord for researcher communication

<figure><img src="/files/k6FH6zZPk4f2fPfuv89W" alt="" width="563"><figcaption></figcaption></figure>

Submit the form. The bounty appears immediately on the public board.
{% endstep %}

{% step %}

### Review Applications

When researchers apply, you see them in your dashboard.

For each application, you can see:

* The researcher's wallet address (their bounty board identity)
* Their submitted contact handle
* Application timestamp

Pick the researcher you want to work with and click **Accept**.
{% endstep %}

{% step %}

### Pay the Bounty

Acceptance auto-redirects to `/pay?bountyId=...` with the form pre-filled and locked.

<figure><img src="/files/Wn3VMxZAJ7dEmmYJgvdl" alt="" width="563"><figcaption></figcaption></figure>

Click **Pay bounty**:

* Cloak SDK generates the Groth16 deposit proof (in-browser)
* Phantom prompts you to sign the deposit transaction
* The transaction confirms on Solana
* Tirai shows a success card with the **claim ticket** and **viewing key**

<figure><img src="/files/DHiepaKyOrYWBbkKc8PI" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Send the Ticket Off-Chain

The success card offers three delivery formats:

* **Copy-paste blob** — paste into any messaging app
* **QR code** — scan from researcher's phone
* **Pre-formatted Telegram message** — opens Telegram with the message ready

Send the ticket to the researcher via the contact handle they provided.
{% endstep %}
{% endstepper %}

## After Payment

* The deposit appears on-chain as **Treasury → Cloak Pool**
* The researcher claims at their convenience using the ticket
* You retain the **viewing key** for future audits
* The bounty status updates automatically once the researcher claims


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://moai-3.gitbook.io/tirai-frontier/how-tirai-works/project-flow-pay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
