<aside> 💡 This document is a draft for discussion as part of this Balancer forum discussion. The final form will be added to docs.xave.co
</aside>
<aside> 💡 TLDR: here is a sample tx that dispersed protocol fees 50:50 to Xave and Balancer fee collector addresses https://polygonscan.com/tx/0x5cc8e0358a20f694efb3577d21dca31bb4c7a7daddf0222dc82a763846ac22df
</aside>
This page describes the implementation and live transaction demo of FXPool fee splits between LPs, Balancer and Xave as discussed in the Balancer forum.
https://notion2charts.com/embed/cached/72ee4634-152f-4809-a951-7f1793c80fd8
Breakdown
FXPool.totalUnclaimedFeesInNumeraire
(numeraire means USD in our code)FXPool.totalUnclaimedFeesInNumeraire
(in the form of minted LP tokens or BPT-XSGD-USDC
) is paid to the protocol fee distributor contract (EthProtocolFeesDistributor
/ PolygonProtocolFeesDistributor
) → See sample LP depositdisperseFees(address token)
. token
param is the contract address of the LP token paid as protocol fees. Upon calling, half the unclaimed fees in the protocol fees distributor will be sent to Xave fee collector multisig and half will be sent to
Xave fee collector
See sample tx showing disperseFees
call. In this tx, it sent a total unclaimed 116 BPT-XSGD-USDC
each as fees to both the Xave and Balancer fee collector