DA0-DA0 / dao-contracts

CosmWasm smart contracts for Interchain DAOs.
https://docs.daodao.zone
BSD 3-Clause "New" or "Revised" License
208 stars 142 forks source link

Investigate possibility of implementing a maximum number of hook receivers #603

Open 0xekez opened 1 year ago

0xekez commented 1 year ago

we currently don't limit the number of hooks that are allowed per action as hook receivers may use arbitrary amounts of gas and thus any limit is easily defeated by a sufficiently gas-hungry hook receiver.

at the moment, most DAOs will have at most one receiver for each hook. there is currently no two contract's that i know of that would benefit from receiving the same hooks at the same time. that said, there may be eventually.

this issue is to memorialize that, when that day comes where two contracts would do well by receiving the same hook, we should write careful integration tests to ensure that the hook will not run out of gas. using that data, we should then apply default safe, and governance controlled hook count limits.

0xekez commented 1 year ago

thank you Oak Security for the great discussion around this.