0f / 0F-ARK-2108

0 stars 0 forks source link

0F-ARK-002: Increase protocol observability with events #3

Open lgalabru opened 3 years ago

lgalabru commented 3 years ago

Context

Clarity events are probably under-documented, and yet they constitute a powerful mechanism for increasing observability of onchain protocols, while being cheap in terms of transaction cost.

Observability is a crucial requirement for engaging protocol participants. Events can be leveraged for building an ecosystem on top of the Arkadiko protocol. Some concrete examples:

Arkadiko is involving a lot of contracts, so emitting topic based events could be an approach scaling nicely with the current / future complexity.

(print { topic: "governance", object: "proposal", action: "created", params: .... })
(print { topic: "vaults", object: "vault", action: "created", params: .... })
(print { topic: "tokens", object: "DIKO", action: "minted", params: .... })

etc

Recommendation

Emit CRUD events for the different objects being manipulated in the different contracts (proposals, vaults, tokens, swaps, etc).

philiphacks commented 3 years ago

This is a great suggestion.

@nieldeckx this is about the print statements I mentioned last week.. we should add a lot more of these, will be great for all sorts of things.

philiphacks commented 3 years ago

@lgalabru fixed in https://github.com/arkadiko-dao/arkadiko/pull/208