Tinyman Docs
Search…
Redeem Protocol Fees
Transfer collected protocol fees to the CREATOR account.
Note: The CREATOR must opt-in to the liquidity assets separately before receiving them.

Transaction Group:

0. Pay - pay fees in Algo from User to Pool
  • fees to cover Tx 1,2
  • Signed by User
1
{
2
"txn": {
3
"type": "pay",
4
"rcv": "{POOL_ADDRESS}",
5
"snd": "{USER_ADDRESS",
6
"amt": 2000,
7
...
8
},
9
"sig": "{USER_SIG}",
10
}
Copied!
  1. 1.
    App Call - NoOp call to Validator App with args ['fees']
  • 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": ['ZmVlcw=='] // ['fees']
8
...
9
},
10
"lsig": "{POOL_LOGICSIG}",
11
}
Copied!
2. AssetTransfer - Transfer of liquidity asset from Pool to CREATOR account
  • Signed by Pool LogicSig
1
{
2
"txn": {
3
"type": "axfer",
4
"arcv": "{CREATOR_ADDRESS}",
5
"snd": "{POOL_ADDRESS}",
6
"xaid": {LIQUIDITY_ASSET_ID},
7
"aamt": {ASSET_AMOUNT},
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
  • p: {int} // unclaimed protocol fee liquidity asset amount
Creator Local State
None