Executor Powered

The ones doing the job

Stabilize protocol operates using a decentralized network of executors to interact with the strategy contracts when arbitrage opportunities present themselves. These Executors are pivotal within the ecosystem of Stabilize, since they ensure a decentralized and redundant execution of trades.

Can anyone be an Executor?

Anyone can "execute" the smart contract function executeSwapTokens to make the transaction happen. If the trade is not profitable it will not occur, the strategies can't loose due to Executors doing something wrong. Executors get a percentage of the profit from each trade including a gas stipend.

How to set up an Executor bot

The easiest way to start is to develop an off-chain bot that monitors the Stabilize strategies continuously. This bot would query the expectedProfit function which returns wei units of base currency profit (when set to inWETHProfitForExecutor set to true). If the profit is greater than the gas costs, the bot would then create a transaction to executeSwapTokens with its own address as the parameter to receive its percent of profit. The bot may also set a minimum seconds since the last trade to limit its gas cost in case someone else beats it to the trade.

Ideally, the executor will make continuous profit, trading depositors funds at the right times and depositors will make the best compound interest possible as their funds are traded at the most profitable times. It is important to note that the contract itself doesn’t allow for trading at a loss.

Take a look at our strategies for both Arbitrum One and Binance Smart Chain: Strategies

Last updated