Trading fee is a small percentage of the trade paid by traders to pool LPs, set by the pool creator or dynamically optimized by StarfishDAO. Additionally, StarfishDAO can vote to introduce a Protocol Trading Fee, which is a percentage of the Trading Fee. For instance, if a pool had a 1% fee, and governance introduced a 10% protocol fee - the total swap fee to the trader would remain at 1%, but now 0.9% would accrue to the pool's LPs, and 0.1% would accrue to the protocol fee collector contract.
All protocol fees are set to 50% at launch. After StarfishDAO is set up, SEAN holders can vote on protocol fees update.
Starfish Pools are extremely customizable, and each pool can have a different fee. It is up to the pool creator to decide how high the fees should be, ranging from 0.0001% to 10%. When using the Smart Order Router, the fees will always be taken into account when finding the best price.
All protocol fees are kept in the ProtocolFeesCollector contract. It is up to Starfish’s governance to decide whether and how these fees are used.
The Protocol Fees Collector contract is deployed at Astar:
When there is a trade in a pool, the pool collects a trade fee. The trade fee is denominated in the input token.
Example: Let's say Alice is swapping 100 USDC to SEAN in the USDC-SEAN pool with a delegated fee of 3%, the pool will keep 3 USDC (3% of USDC) and give her back an amount of SEAN worth 97 USDC.
As the pool collects fees, your Starfish Pool Tokens (SPT) automatically collect fees because they represent your proportional share of the pool.
Let's say Alice, Bob, Charlie, and Daren all provide liquidity in the same pool starting out worth $100. After some time, it has earned many trade fees and is now worth $200. The pool itself grows while their proportional shares stay the same. They can experience the rise of value by exiting (withdrawing liquidity) to get back the underlying tokens.