Tinyman Docs
Search…
Mint
Mint Pool assets in exchange for transferring assets to the Pool account.

Transaction Group

0. Pay - pay fees in Algo from Pooler to Pool
  • fees to cover Tx 1,4
  • Signed by Pooler
1
{
2
"txn": {
3
"type": "pay",
4
"rcv": "{POOL_ADDRESS}",
5
"snd": "{POOLER_ADDRESS",
6
"amt": 2000,
7
"fee": 1000,
8
...
9
},
10
"sig": "{POOLER_SIG}",
11
}
Copied!
  1. 1.
    App Call - NoOp call to Validator App with args ['mint'], with Pooler account
    • Signed by Pool LogicSig
1
{
2
"txn": {
3
"type": "appl",
4
"snd": "{POOL_ADDRESS}",
5
"apid": {VALIDATOR_APP_ID},
6
"apan": 0, // OnComplete: NoOp
7
"apaa": ['bWludA=='], // ['mint']
8
"apat": [{POOLER_ADDRESS}],
9
"fee": 1000,
10
...
11
},
12
"lsig": "{POOL_LOGICSIG}",
13
}
Copied!
2. AssetTransfer - Transfer of asset 1 from Pooler to Pool
  • Signed by Pooler
1
{
2
"txn": {
3
"type": "axfer",
4
"arcv": "{POOL_ADDRESS}",
5
"snd": "{POOLER_ADDRESS}",
6
"xaid": {ASSET_1_ID},
7
"aamt": {ASSET_1_AMOUNT},
8
"fee": 1000,
9
...
10
},
11
"sig": "{POOLER_SIG}",
12
}
Copied!
3. (a) AssetTransfer - Transfer of asset 2 from Pooler to Pool
  • If asset 2 is an ASA
  • Signed by Pooler
1
{
2
"txn": {
3
"type": "axfer",
4
"arcv": "{POOL_ADDRESS}",
5
"snd": "{POOLER_ADDRESS}",
6
"xaid": {ASSET_2_ID},
7
"aamt": {ASSET_2_AMOUNT},
8
"fee": 1000,
9
...
10
},
11
"sig": "{POOLER_SIG}",
12
}
Copied!
3. (b) Pay - Transfer of Algo from Pooler to Pool
  • If asset 2 is Algo
  • Signed by Pooler
1
{
2
"txn": {
3
"type": "pay",
4
"rcv": "{POOL_ADDRESS}",
5
"snd": "{POOLER_ADDRESS}",
6
"amt": {ASSET_2_AMOUNT},
7
"fee": 1000,
8
...
9
},
10
"sig": "{POOLER_SIG}",
11
}
Copied!
4. AssetTransfer - Transfer of liquidity token asset from Pool to Pooler
  • Signed by Pool LogicSig
  • Amount is minimum expected amount of liquidity token allowing for slippage
1
{
2
"txn": {
3
"type": "axfer",
4
"arcv": "{POOLER_ADDRESS}",
5
"snd": "{POOL_ADDRESS}",
6
"xaid": {LIQUIDITY_ASSET_ID},
7
"aamt": {LIQUIDITY_ASSET_AMOUNT},
8
"fee": 1000,
9
...
10
},
11
"lsig": "{POOL_LOGICSIG}",
12
}
Copied!

Validator App State Changes

Global State
None
Pool Account Local State
  • o{LIQUIDITY_ASSET_ID}: {int} // total outstanding unredeemed liquidity asset amount
Pooler Account Local State
  • {POOL_ADDRESS}e{LIQUIDITY_ASSET_ID}: {int} // excess liquidity asset amount available for redemption
Last modified 10mo ago