# Bootstrap Pool

### Transaction Group

0\. Pay - pay fees from Pooler to Pool

* fees to cover Tx 1,2,3,4
* Signed by Pooler

```
{
  "txn": {
    "type": "pay",
    "rcv": "{POOL_ADDRESS}",
    "snd": "{POOLER_ADDRESS",
    "amt": 960000,
    "fee": 1000,
    "note": "",
    ...
  },
  "sig": "{POOLER_SIG}",
}
```

1. App Call - OptIn call to Validator App with args \['bootstrap', asset1ID, asset2ID]

* signed by Pool LogicSig

```
{
  "txn": {
    "type": "appl",
    "snd": "{POOL_ADDRESS}",
    "apid": {VALIDATOR_APP_ID},
    "apan": 1, // OnComplete: OptIn
    "apaa": ['Ym9vdHN0cmFw', '{ASSET1_ID}', '{ASSET2_ID}'], // ['bootstrap', asset1ID, asset2ID]
    "apas": [{ASSET1_ID}, {ASSET2_ID}], // or just [{ASSET1_ID}] if asset 2 is Algo
    "fee": 1000,
    ...
  },
  "lsig": "{POOL_LOGICSIG}",
}
```

2\. AssetConfig - create asset for liquidity token

* signed by Pool LogicSig

```
{
  "txn": {
    "type": "acfg"
    "snd": "{POOL_ADDRESS}",
    "fee": 1000,
    "apar": {
      "an": "Tinyman Pool USDC-ALGO",
      "un": "TM1POOL"
      "au": "https://tinyman.org",
      "t": 18446744073709551615, // 0xFFFFFFFFFFFFFFFF
      "dc": 6,
    },
    ...
  },
  "lsig": "{POOL_LOGICSIG}",
}
```

3\. Asset OptIn - Pool opt in to Asset 1

* signed by Pool LogicSig

```
{
  "txn": {
    "type": "axfer",
    "arcv": "{POOL_ADDRESS}",
    "snd": "{POOL_ADDRESS}",
    "fee": 1000,
    "xaid": {ASSET_1_ID},
    ...
  },
  "lsig": "{POOL_LOGICSIG}",
}
```

4\. (Optional) Asset OptIn - Pool opt in to Asset 2

* Only if Asset 2 is not Algo
* signed by Pool LogicSig

```
{
  "txn": {
    "type": "axfer",
    "snd": "{POOL_ADDRESS}",
    "arcv": "{POOL_ADDRESS}",
    "fee": 1000,
    "xaid": {ASSET_2_ID},
    ...
  },
  "lsig": "{POOL_LOGICSIG}",
}
```

### Validator App State Changes

#### **Global State**

None

#### **Pool Account Local State**

* `a1: {int}` // ASSET1\_ID
* `a2: {int}` // ASSET2\_ID


---

# 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://docs.tinyman.org/v1-integration/transactions/bootstrap-pool.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.
