zeitgeist icon indicating copy to clipboard operation
zeitgeist copied to clipboard

New Asset System - Enable fee payment for CampaignAssets

Open sea212 opened this issue 11 months ago • 1 comments

What does it do?

  • TBD

What important points should reviewers know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues?

References

sea212 avatar Mar 19 '24 10:03 sea212

This pull request is now in conflicts. Could you fix it @sea212? 🙏

mergify[bot] avatar Mar 19 '24 10:03 mergify[bot]

Why don't you let the admin of the campaign asset define what the fee factor should look like?

For the sake of simplicity (not having to maintain extra metadata), I decided to go with the current approach.

But the price of the underlying campaign asset is not known. So why this notion of having a relation to ZTG? Are the fees burned in ZTG or in campaign asset?

The fees are burned in campaign asset, but on the basis on the native fee, i.e. how much ZTG would have been paid. Essentially we need some way to determine how much campaign assets are burned, and I thought the given relationship is simple and effective because it scales with the total supply (users could have millions of campaign tokens, but pay thousands of fees per TX).

I think with the current implementation of get_fee_factor_campaign_asset the fee factor can infinitely grow larger. campaign_asset_supply can be very large since you ensure ztg_supply / campaign_asset_supply < 100, which means if campaign_asset_supply grows to u128::MAX you would basically get u128::MAX / ztg_supply for the maximum fee factor, or am I wrong?

You correctly defined the max value. Admin access to campaign assets should be given only to trusted accounts and limited by a specific amount of time. Council and TC might have to resolve during abusal.

sea212 avatar Mar 28 '24 21:03 sea212