Skip to main content

Filler

In Garden's Orderbook system, a "Filler" or "counterparty" plays a crucial role in facilitating efficient swaps. Fillers are market participants who provide liquidity by executing orders immediately after matching them according to specific strategies. The Orderbook oversees the matching process by creating an auction for filling the orders, ensuring continuous trading activity and maintaining market efficiency. Unlike makers, who provide passive liquidity, Fillers are always online and enable near-instant trading by executing the necessary actions to upgrade the order status to the next state. Understanding the function and impact of Fillers is essential for grasping the dynamics of order execution and liquidity within our system.

This doc provides a comprehensive guide to Fillers, including their roles, responsibilities, and the process of becoming a Filler. This guide also covers the market-making auction mechanism, which allows Fillers to compete for the right to fill an order. By participating in the auction, Fillers can enhance their reputation and increase their chances of being selected to fill orders. Garden's Orderbook system is designed to ensure that Fillers play a vital role in maintaining market efficiency and liquidity, contributing to the overall success of the ecosystem.

Who can become a Filler?

One can become a Filler by staking 210,000 SEED tokens in the Garden staking system. The staking system is a governance system that allows users to stake SEED tokens to participate in the staking of the Garden ecosystem. The staking system also allows users to earn rewards for staking their tokens by electing a Filler. All the voters of a Filler will receive a portion of the trading fees generated by the Filler proportionate to the number of votes they have cast for the Filler.

More about staking and governance can be found in the staking blog post.

How to run a Filler?

A Filler is a market-making bot that plays a crucial role in the Garden ecosystem. It is designed to fill orders in the Orderbook and facilitate trading by providing liquidity to the system. This automated trading bot executes trades based on predefined strategies and parameters. Integrated with the Orderbook AMM, it interacts with the Orderbook to fill orders and initiate trades. The Filler is designed to be fast, efficient, and reliable, ensuring that orders are filled quickly and accurately.

Anyone with a Filler role in the Garden staking system can maintain this bot. As a Filler, the bot ensures that the Orderbook is always ready to fill orders quickly and facilitate successful trading.

Fillers can add liquidity of any proportions to the wallet generated by the bot, which is used to fill orders. The liquidity will be directly used by the bot to fill orders and initiate trades, ensuring non-custodial liquidity provision. The liquidity can be added or removed at any time by the Filler. The bot also provides a GUI to manage and monitor the liquidity.

The Filler bot can be deployed on a local or a remote machine using the latest Docker image. The Docker image contains all the necessary dependencies and configurations to run the bot smoothly. To deploy the bot, refer to the Setup Guide.

How to design strategies?

Strategies are the rules and parameters that define how the Filler bot fills orders. These strategies are strictly enforced by the bot before filling an order. They are designed to ensure that the bot fills orders quickly to maximize the chances of a successful trade, thus also ensuring that the liquidity is used efficiently to produce better APY via fees. Strategies can be customized based on market conditions, trading volume, and other factors that may affect the trading process.

The Filler bot allows Fillers to define and configure strategies based on their preferences and requirements. The strategy used by the bot is abstracted for the auction mechanism, which follows its own rules to select the best Filler to fill the order. This ensures that makers get the best price for their orders and provides an impartial opportunity for all Fillers to utilize their liquidity.

To design profitable strategies, Fillers must consider how the market-making auction works and how the Orderbook selects the best Filler to fill the order.

Market Making Auctions

The Garden ecosystem houses a auction mechanism which is a process that allows Fillers to compete for their right to fill an order. The auction is initiated when an order is placed in the Orderbook. Fillers submit their bids to fill the order, and the Orderbook selects the best bid based on the price and other criteria. The selected Filler then fills the order and initiates the trade.

Orderbook acts as the auctioneer and selects the best Filler based on the following criteria:

  • Price: The Filler with the best price is selected to fill the order. The price is the ratio of the tokens in the maker request to the tokens in the Filler offer. The Orderbook selects the Filler with the best price to ensure that the maker gets the best price for their order. In
  • Number of votes in the staking system: The Filler with the most votes in the staking system is prioritized. Votes are cast by users who stake SEED tokens to participate in the staking system to elect a Filler and tap into the trading fees generated by the Filler. Votes can translate to reputation and influence the selection process. User in staking system can transfer their votes to other Filler on will.
  • Reputation Score: The Filler's reputation score is calculated based on their past performance and success rate in completing filled trades. This score is public and allows new user in the staking system to evaluate the Filler's performance and reliability.

More about market making can be found in the market making blog post.

Example Strategies

These are some of the strategies that were experimented by Fillers in the Garden ecosystem:

  1. Minimum price strategy: This strategy involves setting a minimum price at which the Filler bot should match an order provided enough liquidity exists. This strategy can be enabled in Filler by setting the minimum price parameter in the configuration file.

  2. Arbitrage Strategy: This strategy involves identifying fiat price differences between different exchanges and taking advantage of these differences to make a profit. The Filler can use this strategy to fill orders at a lower price and sell them at a higher price, generating an arbitrage profit in the process. This can enabled in Filler bot by using adapter built for centralized and decentralized exchanges to fetch the prices and fill the orders.

  3. Liquidity Impact Strategy: This strategy involves analyzing the current liquidity in the Orderbook and adjusting the price by increasing it if the liquidity in the requested direction is low. This strategy will also help in reducing the slippage and ensuring that the order is filled quickly. This can be enabled in Filler bot by using the Orderbook API to fetch the liquidity and adjusting the price based on the liquidity. It is also a good strategy to increase the reputation score in the auction system.

  4. Volume Impact Strategy: This strategy involves analyzing the current trading volume and adjusting the price by decreasing it if the trading volume is high. This strategy will ensure better chances of filling the order and generating more fees though volume. This strategy can be combined any other strategy.

  5. Reputation Impact Strategy: This strategy involves analyzing the reputation score of the Filler and adjusting the price only to target the reputation score. This strategy will help in increasing the chances of being selected in the auction system for more orders in the future.

  6. AMM Strategy: When avoiding impermanent loss is a concern, Fillers can use AMM strategy on their own reserves to fill the orders. Fillers can choose from the widely researched AMM strategies like constant product, constant sum, constant mean, etc. to fill the orders. This strategy can be enabled in the Filler by using the AMM adapter to fill the orders.

  7. Custom Strategy: This strategy involves designing a custom strategy based on the market conditions, trading volume, and other factors that may affect the trading process. Fillers can customize the strategy based on their preferences and requirements to maximize the chances of a successful trade. More strategies wil be added here as they are experimented by Fillers.

Fees and APY

Fees in the swaps are generated by the Filler by increasing the price of the order. Price is the ratio in tokens in maker request to Filler offer. The difference between the price set by the Filler and the current market price is the fee. Fee is collected in destination token.Garden also allows the makers to pay in SEED tokens to reduce the fee or nullify fee thus providing trading utility to the SEED token.

The fee is collected by the Filler and is used to pay the gas fees and other expenses. A part of it is also used to pay the voters of the Filler in the staking system.

The APY of the Filler is calculated based on the fees generated by the Filler and the liquidity provided by the Filler. The APY is calculated as the ratio of the fees generated by the Filler to the liquidity provided by the Filler. The APY of stakers is calculated based on the fees generated by the Filler and the number of votes cast by the stakers for the Filler.

Current Fillers

MetricValue
Address0x9dd9c2d208b07bf9a4ef9ca311f36d7185749635
Reputation score100
Fee generated$1.`5M
Fee distributed$500k
Ethereum WBTC reservesLoading...
Arbitrum WBTC reservesLoading...
Bitcoin reservesLoading...
StrategyMinimum price strategy with fee set at 30 bips of initial amount