Put exchange_fee and referral_fee, as ratios, include in the pool fee.
Apply this info:
pub struct InternalFeesRatio {
/// Portion (bps) of the fee going to exchange in total fee.
pub exchange_fee: u32,
/// Portion (bps) of the fee going to referral in total fee.
pub referral_fee: u32,
}
when initial contract, and it can be changed by owner of this contract, normally a DAO, using interface:
In this way, when create pool, the fee param would be the total fee in bps. Exchange_fee and Referral_fee are charge from that total fee according to the bps value assigned in InternalFeesRatio.
Cause storage changed, a migration is needed.
provide a new view function to get contract meta info in one shot:
Put exchange_fee and referral_fee, as ratios, include in the pool fee.
Apply this info:
when initial contract, and it can be changed by owner of this contract, normally a DAO, using interface:
In this way, when create pool, the fee param would be the total fee in bps. Exchange_fee and Referral_fee are charge from that total fee according to the bps value assigned in InternalFeesRatio.