The process of collecting fees, swapping them into the required ratio, and adding liquidity to a position requires separate contract interactions and is cumbersome to do manually. From a gas cost perspective, it is best to have some form of automation that bundles all the required actions into one transaction. For high fee APR positions, the optimal number of compounds can be several times a day.
Gas price fluctuates and the Compoundor protocol will incentivize auto-compounding of positions when gas prices are low.
Uncollected fees do not grow at a constant rate, so compounding manually at the optimal moments would require constant monitoring of the fee growths.
Peace of mind.
Two percent of the compounded fees. This amount is modifiable by the contract deployer (Revert), but can only be decreased and never increased.
- totalRewardX64: Total reward paid to the protocol, including the compounder reward. This value starts at 2% (of the compounded fees) and can only be reduced, never increased.
- compounderRewardX64: Reward paid to compounder. Must always be less than totalRewardX64.
- maxTWAPTickDifference: max amount of ticks the current tick may differ from the 60s Oracle TWAP tick to allow swaps. A sanity check to provide price manipulation protection.
- TWAPSeconds: How many seconds should be used to calculate TWAP.
When you activate auto-compounding for a position you transfer it to the Compoundor contract. You are able to withdraw your position at any time, but you are subject to the following risks while your position is owned by the contract.
- There is smart-contract risk in the Compoundor protocol. We are running an Immunefi Bug Bounty for the Compoundor Protocol contract with total rewards of up to $100,000. Depending on demand, we may hire a formal audit.
- Compounding fees will often require swapping some amount of the uncollected fees so that they are at ratio that maximizes the amount of new liquidity added for each position. The PNL for these swaps will depend on what happens with the asset pair prices, they can be negative, and the extra fees accrued from auto-compounding might not make up for that loss.
The way the Compoundor contract is implemented, there is an incentive for auto-compounding positions which have accumulated enough fees to pay for the gas cost. Anyone can trigger the auto-compounding function.
Additionally Revert is maintaining its own auto-compounding bot to ensure that positions are auto-compounding as frequently as possible.
There are no plans for any token.
A position in the auto-compounder contract is withdrawable by the owner at any time and can do so by interacting directly with the smart contract. Please follow the next steps to manually withdraw your position from the auto-compounder contract, in case our front-end is unavailable.
- tokenId: Is the NFT id of the position.
- You can find it in Revert's UI.
- Alternatively, use the "accountTokens" function from the "Read Contract" tab, in the block scanner (step 1).
- Insert the position owner address in the first input field and start looking for your positions by entering the number 0 in the second field and clicking on "Query".
- (In case of having more than one position keep increasing the number until finding all the required IDs.)
- to(address): Is the destination address where your position is going to be transferred.
Be extra careful when filling out the "address" field. Once the position leaves the Auto-compounder contract is not on Revert's control anymore.
- withdrawBalances: Enter the word "true".
- data: Complete the field with "0x".
4. Click on "Write" and sign the transaction on your wallet.
By the end of this process, the position will be transferred outside the contract.
Compounding occurs when the unclaimed fees are more than 100x the gas cost of compounding, which varies by network and gas price. The compoundor whitepaper explains the way it works:
We can estimate the costs of compounding fees using the auto-compounder on Mainnet (25 Gwei), Polygon (50 Gwei), Optimism (0.25 Gwei), BNB Chain (5 Gwei), and Arbitrum (0.2 Gwei). Therefore, assuming an ETH price of $1000, a MATIC price of $0.5 and a BNB price of $300, we can estimate the gas costs for compounding a position using the Compoundor contract on the same chains as shown below.
For Optimism and Arbitrum, we used estimated Gwei amounts to avoid doing the L2 gas price calculation. For instance, given the above estimations, an Optimism position should have accrued at least a total of $12 worth of fees ($0.12*100) to compound automatically.