threefoldtech / tfchain

Threefold Chain.
Apache License 2.0
15 stars 11 forks source link

feature: fixed fee for active contracts with no consumption #292

Open muhamadazmy opened 2 years ago

muhamadazmy commented 2 years ago

In certain situations, people can create contracts that is not actually tight with any active deployments. Or a deployment that doesn't generate any consumption (like a network deployment).

Those people can just move on without cleaning up their un-used (0 consumption) contract and the chain (and the node) will think it has an active contract forever (this will always show up as active on the grid forever)

A good solution for this, an active contract with no consumption can be billed on it's billing cycle a fixed small fee (think 0.05 tft) so eventually either the user will have to make sure he has NO active (unused) contracts. or will eventually run out of funds and his contract will be decomissioned automatically.

This will also making creating network workloads not free of charge.

archit3kt commented 2 years ago

I think this is a very good idea to keep a clean architecture on zos nodes. I hope you will create clear reports to know which contracts are actually linked to our twin and on which node they run

DylanVerstraete commented 2 years ago

@LeeSmet how much should we charge for a contract without any reported resources (network contracts) ?

LeeSmet commented 2 years ago

hmm, that's tricky. On the one hand it needs to be sufficient to entice people to clean up their unused networks, while on the other hand it shouldn't be too much as we don't want to punish people for having (used) networks. We can't know on the chain if a network is in use or not. Also a bigger problem is that we need to bill individual network resources rather than the network as a whole. While one could argue this makes sense as cost scales with network size, I think the idea is just that an unused network should cost a marginal amount of money.

Personally, I'd say 1 USD / month for a 5 node network seems fair? that equates to 0.2USD/month for a single network resource. Can be tweaked later ofc