The local fee collector collects the fees for usage of the pool and vault network on a specific blockchain. Part of the collected fees goes back to the depositors of the White Whale pools and/or the single asset flash loan vaults. The remainder is sent to the interchain collector as protocol revenue. The protocol revenue is then distributed to WHALE stakers in the form of token buybacks.
The code for the fee collector contract can be found here.
The following are the messages that can be executed on the fee collector:
Instantiate
Instantiates the fee collector.
{}
Migrate
Migrates the fee collector.
{}
ExecuteMsg
Collect fees
Collects the fees accrued by the pools or vaults. It can be triggered in different ways:
Fees can be collected for specific contracts, specifying the address and contract type (pool or vault)
Fees can be collected for pools, specifying the pool factory address and factory type (pool)
Fees can be collected for vaults, specifying the vault factory address and factory type (vault)
Enum specifiying to collect fees for either Contracts or Factory
contracts
Vec<Contract>
Contracts to collect fees from
Forward fees
Forward fees to the fee distributor. This is called when creating a new epoch on the fee distributor. this will collect and aggregate the fees, to send them back to the fee distributor.
Note: can only be called by the owner of the contract or the fee distributor.
Queries the fees collected by individual contracts, whether they are pools or vaults. Additionally, it can query the fees collected by a given pool or vault factory's children.
Enum specifying to query fees for either Contracts or Factory
contracts
Vec<Contract>
Contracts to query fees from
all_time
Option<bool>
If true, it will return the fees collected since the inception of the pool/vault. On the other hand, if false, only the fees that has been accrued by the pool/vault but not collected by the fee collector will be returned
Enum specifying to query fees for either Contracts or Factory
factory
Factory
Factory data to query fees from
all_time
Option<bool>
If true, it will return the fees collected since the inception of the pool/vault. On the other hand, if false, only the fees that has been accrued by the pool/vault but not collected by the fee collector will be returned
Enum specifying to query fees for either Contracts or Factory
factory
Factory
Factory data to query fees from
all_time
Option<bool>
If true, it will return the fees collected since the inception of the pool/vault. On the other hand, if false, only the fees that has been accrued by the pool/vault but not collected by the fee collector will be returned