Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 5.04 KB

README.md

File metadata and controls

77 lines (55 loc) · 5.04 KB

Video Demo

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.

Video of liquidity farming pool creation on Cometa and acquiring staking token by depositing funds to Tinyman V2 AMM

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).

Video of user (a) creating and setting up the autocompounder contract

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.

Video of users (a) and (b) opt-ing into the contract and staking

Account b withdraws part of its deposited stake. No compounding takes place because the pool hasn't gone live yet.

Video of user (b) withdrawing funds while 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.

Video of user (c) opt-ing into the contract and staking

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.

Video of user (c) staking additional tokens

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.

Video of user (b) withdrawing some tokens while 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.

Video of user (d) triggeting a scheduled compounding and additional instant compounding

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.

Video of users (a), (b) and (c) withdrawing funds after the pool ends

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.

Video of user (a) deleting the boxes and contract after the pool ends