Write Functions

We use a single function called execute() to efficiently bundle all actions such as Swap, Liquidity, Vote, Bribe, and Reward claim into one transaction, which is easy to learn.

However, for those unfamiliar with it, we have added additional functions that allow interaction through the widely used solidly router interface. Through these functions, you can specify Token A/B and Volatile, Stable pairs to perform swaps/add liquidity using familiar functions.

For more complex actions or to save on gas fees by linking multiple actions in one transaction, you can use the execute() function, which is also utilized in our frontend. Detailed instructions on its use are provided at the end.

For all the functions below, the only address you need to interact on Blade is 'VAULT (=Router)' address.

Last updated