The video excerpts below demonstrate an example scenario of interactions of four accounts a
, b
, c
, and d
with the autocompounder for a liquidity farming pool.
The interactions are made with the provided interaction script and take place on
Algorand Testnet.
Before the start of interactions with the autocompounder, a liquidity farming pool is first created on Cometa for farming of ALGO-USDC pair of Tinyman V2 AMM liquidity pool (deployed App ID 157582406). The farming rewards are paid in test USDC. The accounts also deposit funds to the AMM liquidity pool and acquire the corresponding token that can be staked in the created staking pool.
When running the interaction script, REST endpoints for
Algorand protocol daemon first need to be entered.
Connections via Sandbox to the Algorand Testnet are established.
Then, account a
creates the autocompounder, sets its parameters and sets up the contract
(deployed App ID 157582655).
Afterwards, account a
switches to normal user interaction mode, opts into the contract, and deposits staking tokens
as well as funds for one compounding.
Thereafter, account b
connects to the autocompounder and does the same.
Account b
withdraws part of its deposited stake.
No compounding takes place because the pool hasn't gone live yet.
When the pool is already live, account c
opts into the autocompounder and stakes its tokens.
Since the pool is now live, the stake is first compounded.
This action results in a rescheduling of the autocompounder's schedule.
Account c
stakes additional tokens.
Again, the stake first needs to be compounded.
This action again results in a rescheduling of the autocompounder's schedule.
Account b
withdraws some tokens.
Before that can be done, it needs to "locally claim" the interest from the previous compounding actions.
Afterwards, the stake is withdrawn, which again requires additional compounding since the pool is live.
Account d
connects to the platform.
It triggers the compounding according to the schedule without having to be opted-into the contract or paying any
compounding fees.
Afterwards, it issues an instant additional compounding of the stake.
Note: Despite only three users depositing funds for future compoundings, there can be more than three compounding triggers because the required deposit funds assume a maximum size for the created box. In reality, the boxes are smaller in the majority of cases, thus more funds are available for compounding.
The pool ends.
Account b
connects to the platform and withdraws all its stake and opts out of the contract.
Account c
and a
do the same.
Account a
deletes the boxes that were created.
This is possible despite the claiming period not yet being finished because there are no more accounts opted into the
contract.
Afterwards, it deletes the contract, receiving the remaining funds from it.