Tinyman Docs
Search…
Redeem
Claim back 'change' due to slippage in Mint/Burn/Swap process.

Transaction Group

0. Pay - pay fees in Algo from PoolerSwapper to Pool
  • fees to cover Tx 1,2
  • Signed by Pooler
1
{
2
"txn": {
3
"type": "pay",
4
"rcv": "{POOL_ADDRESS}",
5
"snd": "{POOLER/SWAPPER_ADDRESS",
6
"amt": 3000,
7
"fee": 1000,
8
...
9
},
10
"sig": "{POOLER/SWAPPER_SIG}",
11
}
Copied!
  1. 1.
    App Call - NoOp call to Validator App with args ['redeem'], with Pooler/Swapper 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": ['cmVkZWVt'] // ['redeem']
8
"apat": [{POOLER/SWAPPER_ADDRESS}],
9
"fee": 1000,
10
...
11
},
12
"lsig": "{POOL_LOGICSIG}",
13
}
Copied!
2. (a) AssetTransfer - Transfer of asset from Pool to Pooler/Swapper
  • If asset is an ASA
  • Signed by Pool LogicSig
1
{
2
"txn": {
3
"type": "axfer",
4
"arcv": "{POOLER/SWAPPER_ADDRESS}",
5
"snd": "{POOL_ADDRESS}",
6
"xaid": {ASSET_ID},
7
"aamt": {ASSET_AMOUNT},
8
"fee": 1000,
9
...
10
},
11
"lsig": "{POOL_LOGICSIG}",
12
}
Copied!
2. (b) Pay - Transfer of Algo from Pool to Pooler/Swapper
  • If asset is Algo
  • Signed by Pool LogicSig
1
{
2
"txn": {
3
"type": "pay",
4
"rcv": "{POOLER/SWAPPER_ADDRESS}",
5
"snd": "{POOL_ADDRESS"},
6
"amt": {ASSET_AMOUNT},
7
"fee": 1000,
8
...
9
},
10
"lsig": "{POOL_LOGICSIG}",
11
}
Copied!

Validator App State Changes

Global State
None
Pool Account Local State
  • o{LIQUIDITY_ASSET_ID}: {int} // total outstanding unredeemed liquidity asset amount
  • o{ASSET1_ID}: {int} // total outstanding unredeemed asset 1 amount
  • o{ASSET2_ID}: {int} // total outstanding unredeemed asset 2 amount
Pooler/Swapper Account Local State
  • {POOL_ADDRESS}e{LIQUIDITY_ASSET_ID}: {int} // excess liquidity asset amount available for redemption
  • {POOL_ADDRESS}e{ASSET1_ID}: {int} // excess asset 1 amount available for redemption
  • {POOL_ADDRESS}e{ASSET2_ID}: {int} // excess asset 2 amount available for redemption