Fee Distributor
Introduction
Flaunch implements a waterfall approach to fee distribution, with each subsequent recipient being able to take a percentage of the remainder passed down to them from the previous recipient.
The hierarchy of our fee waterfall is as follows:
Swap Fee
Referrer Fee
Protocol Fee
Creator Fee
This will be bypassed if ownership of the Memecoin ERC721 has been burned
BidWall Deposit
This will become the Memecoin Treasury if the creator disables the BidWall
Fees are only distributed in ETH via the Fee Distributor, as all memecoin fees will be sent directly into the Internal Swap Pool to be converted into ETH. There is only one exception to this statement:
Referrer fees will be distributed to the referrer either directly or via an escrow contract, as tracking of allocation through the Internal Swap Pool would result in unjustifiable gas spend and logic complexity.
ETH fees distributed to creators are allocated to an escrow interface on the PositionManager that allows the recipient to withdraw fees collected from across all of their pools in a single transaction.
Public Calls
balances
Maps the amount of ETH that an address has available to claim.
withdrawFees
Allows fees to be withdrawn from escrowed fee positions. Fees are claimed from the msg.sender
and sent to the _recipient
.
feeCalculator
The Fee Calculator used to calculate swap fees after the Fair Launch period.
fairLaunchFeeCalculator
The Fee Calculator used to calculate swap fees during the Fair Launch period.
flayGovernance
The address of the $FLAY token's governance. This value is immutable.
getPoolFeeDistribution
Gets the distribution for a pool by checking to see if a pool has it's own FeeDistribution. If it does then this is used, but if it isn't then it will fallback on the global FeeDistribution.
getFeeCalculator
Gets the Fee Calculator contract that should be used based on which are set, and if the pool is currently in FairLaunch or not.
It is possible for a different calculator to be used for both Fair Launch and post-Fair Launch trading.
Fee Calculators are set by the contract owner to allow for calculations to determine the swap fee. These can simply return a static amount (e.g. 1%) or can implement more advanced logic such a trading volume and volatility.
Fee Percentage Assignment
Top level fee percentages can be set globally and per-pool via an Ownable call:
The creator fee is determined by the amount set during token flaunching, and the only way this value can be modified is if the creator burns their ERC721 token, effectively renouncing ownership and passing all fees on to the BidWall or Memecoin Treasury (depending on token configuration).
Example
Note: These percentages are not representitive of true protocol values
Assuming that we have a swap of 1000 $MEME -> 1 ETH, in which ETH is the unspecified token and $MEME is the specified token.
Swap Fee
1%
0.01 ETH
Referrer Fee
5%
0.0005 ETH
Protocol Fee
0%
0 ETH
Creator Fee
20%
0.0019 ETH
BidWall Deposit
100%
0.0079 ETH
We can modify this example to reinforce that the sum of the takes do not need to add up to 100%.
Swap Fee
2%
0.02 ETH
Referrer Fee
10%
0.002 ETH
Protocol Fee
25%
0.0045 ETH
Creator Fee
80%
0.0108 ETH
BidWall Deposit
100%
0.0027 ETH
Last updated