Closed chasebrownn closed 7 months ago
Acknowledged. I understand this isnt the most efficient method for one-sided LP-injection, but this will suffice until we can come back around post-launch to handle it more effectively. The RoyaltyHandler is meant to be a plug-and-play component to the RWAToken so this contract can easily be upgraded in the near future.
RHR-01M: Inefficient LP Provision Portions
Description:
The
RoyaltyHandler::_handleRoyalties
function will inefficiently calculate the portion of funds to swap so as to provide liquidity by dividing the input amount by2
.Impact:
The liquidity provision mechanism within
RoyaltyHandler::_handleRoyalties
is presently inefficient and will not be able to provide liquidity reliably for an imbalanced pair.Example:
Recommendation:
We advise an efficient LP provision formula to be utilized, such as Alpha Homora's V2 optimal one-sided liquidity provision mechanism, ensuring that the liquidity ultimately provided takes advantage of as many funds as possible.