Multicall operations
Now you've mastered execute function! Well, almost.
There's one more thing.
It's the heart of velocore, operation chaining, which will make your work more efficient!
Let's compound interest at VC-ETH pool. You should chain these 3 operations.
Harvest LP reward (VC emission)
swap VC to VC-ETH LP
Stake
It's important to note that there is no separate process to swap the halving of VC for ETH. LPs always accept imbalanced deposits, so after receiving VC, they return the exact amount of LPs.
If you want to create an ETH-USDC LP after claiming VC, you can additionally swap all VC -> USDC and then create an ETH-USDC LP with that USDC.
By skipping the intermediate step, you can save a lot of gas and reduce the probability of revert.
In the process of chaining the OP, it is possible to use ALL the balance of the intermediate steps or the EXACT amount, but there is no such command as using HALF, so it is good to consider this when creating LPs.
Related tokens: VC, VC-ETH LP (We don't need to handle ETH in the intermediate step!)
Op type used :
SWAP(00) - buy LP
GAUGE(01) - Claim LP reward, stake
Interacting with : VC-ETH pool(=gauge for volatile pair)
So I should define 2 Tokens and 3 operations.
Last updated