zeitgeist
zeitgeist copied to clipboard
New Asset System - Enable fee payment for CampaignAssets
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
This pull request is now in conflicts. Could you fix it @sea212? 🙏
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 ensureztg_supply / campaign_asset_supply < 100
, which means ifcampaign_asset_supply
grows tou128::MAX
you would basically getu128::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.