How does "anyone can top-up a canister" actually work?

From the docs: Topping Up a Canister

“Anyone can top up any canister on ICP; you just need the canister’s principal.”

How exactly does this work? Does it always go through the Cycles Minter Canisters (CMC)?

More precisely: If a canister has no method to accept cycles, will monitoring CMC blocks reliably show when it gets topped up?

if I understand correctly, your main question is if there is a reliable way to identify ALL cycle top ups to specific canisters, right?

is your goal to monitor cycles top ups to a specific canister (or multiple)?

1 Like

Exactly!

I’m interested to by both scenario.

no, because any canister can use the mgmt canister’s deposit_cycles method to top up any other canister without a trail of that top-up.

1 Like

So @mraszyk explained how

Anyone can top up any canister on ICP; you just need the canister’s principal.

is realized. You seem to also be interested in somehow tracking all top ups to a canister, which is currently not possible. Do you have some use case in mind that would require this insight?

I can think of a few use cases:

  • Accurate accounting. If I’m trying to measure cycles burn and someone can randomly send my canister cycles without me being aware of it then my measurements break
  • Auditability
  • Preventing user error. If someone deposits cycles to the cycles ledger using deposit_cycles instead of the dedicated endpoint I would like to be able to credit their account with the cycles
1 Like

The use-case I have in mind is to enable multiple canisters to plug into a common cycle pool (kinf of a cycle dao Completed: ICDevs.org - Bounty #17 - A DAO for Cycles - $10,000 - ht: cycle_dao ) and share a token to access the common resources. This serves as foundation for other public services but the broader vision only works if they are no other ways for the involved canisters to access cycles, otherwise they would be in a position to take advantage of the system.

Plus all of what @Severin mentioned

Another use case I can imagine is for tax purposes. If someone gives you something of value with no expectation of repayment, it is considered a gift where the receiver is taxed in many jurisdictions. I am not a tax lawyer but I can imagine that you need to pay gift tax for any cycles you receive as a gift for any canister you control.