> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hydro.markets/llms.txt
> Use this file to discover all available pages before exploring further.

# Bid process

> How a project submits a bid to the Hydro contract on the Cosmos Hub, adds and queries tribute, gets refunds, and how the tribute floor works.

The commands on this page use `gaiad`, the Cosmos Hub's command-line tool. Set these two variables to Hydro's production contracts on the Cosmos Hub (`cosmoshub-4`):

```bash Contract addresses theme={null}
HYDRO_CONTRACT_ADDR=cosmos1tj45y3729uu07pv8hq50pfx9u790rh6e0qssucs3yusxaag32t8svhlxgw
TRIBUTE_CONTRACT_ADDR=cosmos15pnu29h8gqpsfwhv2l8t2uv3n4fc6cv5k00tq0uk6c78h5ysql4sja3f3d
```

Replace `[HUB_NODE_RPC]` with the RPC endpoint of a Cosmos Hub node.

## Bid submission

At the start of the auction round, projects submit their bid to the Hydro smart contract and post their tribute token. Projects can bid with any token. It does not have to be the project's own token: a project could pay tribute in USDC, for example. After the auction round ends, the tribute is automatically distributed to all voters who supported the project's bid.

During the auction round, projects can increase their tribute to attract more support. Once increased, it can't be decreased. This rule stops a project from offering a high tribute to win votes, then reducing it before the round ends.

Before you submit a proposal, choose the tranche ID you want to take part in. Query the Hydro smart contract for information about tranches:

```bash Query the tranches theme={null}
gaiad q wasm contract-state smart $HYDRO_CONTRACT_ADDR '{"tranches": {}}' --node [HUB_NODE_RPC]
```

Submit a bid in the current auction round:

```bash Submit a bid theme={null}
EXECUTE='{"create_proposal":{"deployment_duration":[deployment_duration],"description":"[description]","minimum_atom_liquidity_request":"[minimum request]","title":"[title]","tranche_id":[tranche_id]}}'

gaiad tx wasm execute $HYDRO_CONTRACT_ADDR "$EXECUTE" \
--chain-id cosmoshub-4 \
--gas auto \
--gas-adjustment [GAS_ADJUSTMENT] \
--gas-prices [GAS_PRICES] \
--node [HUB_NODE_RPC] \
--from [WALLET_NAME] \
--home [GAIAD_HOME_DIR] \
--keyring-backend [KEYRING_BACKEND]
```

## Submission check

To check that your proposal was submitted, query the Hydro smart contract for all proposals of the round and tranche. First, get the current round:

```bash Query the current round theme={null}
gaiad q wasm contract-state smart $HYDRO_CONTRACT_ADDR '{"current_round": {}}' --node [HUB_NODE_RPC]
```

Then, use the round and tranche IDs to query the proposals:

```bash Query the proposals theme={null}
QUERY='{"round_proposals":{"round_id": [ROUND_ID],"tranche_id":[TRANCHE_ID],"start_from":0,"limit":100}}'

gaiad q wasm contract-state smart $HYDRO_CONTRACT_ADDR "$QUERY" --node [HUB_NODE_RPC]
```

## Tribute additions

Projects can attract votes by adding tributes to the bid they submitted to the Hydro smart contract. You can add several tributes to the same bid. A tribute is any amount of any token the project is willing to pay to the proposal's voters. These tokens are locked in the Tribute smart contract until the current round ends.

If a bid is among the top N by voting power, voters can claim the whole tribute. Each user's share of the tribute is their voting power divided by the total voting power for that proposal. If a bid is not among the top N, the tribute is refunded.

To add a tribute to a proposal, send this transaction to the Tribute smart contract:

```bash Add a tribute theme={null}
EXECUTE='{"add_tribute":{"proposal_id":[PROPOSAL_ID],"round_id":[ROUND_ID],"tranche_id": [TRANCHE_ID]}}'

gaiad tx wasm execute $TRIBUTE_CONTRACT_ADDR "$EXECUTE" \
--amount [TRIBUTE_AMOUNT] \
--chain-id cosmoshub-4 \
--gas auto \
--gas-adjustment [GAS_ADJUSTMENT] \
--gas-prices [GAS_PRICES] \
--node [HUB_NODE_RPC] \
--from [WALLET_NAME] \
--home [GAIAD_HOME_DIR] \
--keyring-backend [KEYRING_BACKEND]
```

## Tribute queries

To query all tributes of a proposal, send this query to the Tribute smart contract:

```bash Query the tributes of a proposal theme={null}
QUERY='{"proposal_tributes":{"round_id":[ROUND_ID],"proposal_id":[PROPOSAL_ID],"start_from":0,"limit":100}}'

gaiad q wasm contract-state smart $TRIBUTE_CONTRACT_ADDR "$QUERY" --node [HUB_NODE_RPC]
```

## Tribute refunds

If a proposal is not among the top N by voting power in a round, the tribute is refunded to the account that added it. To get the refund, send this transaction to the Tribute smart contract:

```bash Refund a tribute theme={null}
EXECUTE='{"refund_tribute":{"round_id":[ROUND_ID],"tranche_id":[TRANCHE_ID],"proposal_id":[PROPOSAL_ID], "tribute_id": [TRIBUTE_ID]}}'

gaiad tx wasm execute $TRIBUTE_CONTRACT_ADDR "$EXECUTE" \
--chain-id cosmoshub-4 \
--gas auto \
--gas-adjustment [GAS_ADJUSTMENT] \
--gas-prices [GAS_PRICES] \
--node [HUB_NODE_RPC] \
--from [WALLET_NAME] \
--home [GAIAD_HOME_DIR] \
--keyring-backend [KEYRING_BACKEND]
```

Once the transaction succeeds, the whole tribute is refunded to the sender's account.

## Tribute floor

The tribute floor balances fair rewards for users with fair access to liquidity for projects. The tribute floor and the tribute a bidder submits set a maximum allocation:

`Max allocation` = `current_tribute_amount` / `tribute_floor_rate`

The table below shows how the tribute floor rate changes the maximum liquidity a bid can receive.

| Tribute amount | Tribute floor | Max allocation |
| -: | -: | -: |
| 100 ATOM | 0.01% | 100,000 ATOM |
| 100 ATOM | 1% | 10,000 ATOM |

As bidders increase their tribute, or as the ATOM price moves, the maximum allocation updates during the round. It is enforced at the end of the round, before the deployment.

A healthy tribute floor rate keeps contributions for liquidity fair and APRs healthy for users.

## Bids without live tokens

Some projects don't have a live token to bid with. The simplest option is then to add a tribute in another token, such as ATOM or USDC. No technical work is needed: the project submits the tribute in the token it wants to pay with.

Some bidders without a live token want to use points as tribute instead. This is acceptable if points-based bids are transparent and fair, so Hydro voters can judge their value with confidence. The requirements are:

**APR calculation.** The project must give the Hydro team a simple way to work out the APR of the points. Fair auctions need token-based and point-based bids to be comparable, so the bid must include:

* The percentage (a range) of the total token supply allocated to points.
* The percentage of all points used for bidding on Hydro.
* The expected market cap of the project.
* A short justification for this market cap (see the example below).

Predicting the market cap of a crypto project is very hard, so projects should just use their last private valuation or a simple comparison.

For example, take the liquid staking protocol Drop. Drop's latest private valuation isn't public, but the Drop protocol is similar to the Stride protocol. If the STRD market cap is \$20M, and Drop's assets are about 40% of Stride's, the DROP market cap may be closer to \$10M than to \$1M or \$100M.

**Timely distribution.** Points must be distributed promptly after each round, once the Hydro team provides the list of wallets that voted for the point-based bid. Voters can claim token tributes as soon as the round's deployments are done, so it is unfair to voters if points arrive much later. Late point distributions are not allowed, because they undermine trust in Hydro's auctions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.