Open 0xbok opened 2 years ago
I'm wondering if we should increase the gas stipend? or if there is some way we can allow a user to increase some minimum amount.
how about taking it as a function argument? any new attack vectors here?
yeah, if there's a protocol built with the token ejector and and 0
is passed as the arg then none of their business logic will be executed, so there needs to be a minimum guaranteed amount of gas fro execution.
Allowing user to increase minimum gas amount through an argument will not work in cases where the nft seller is not benefitting from ejector code execution. They'll always prefer the minimum gas amount.
Thinking out loud: what if we let the clone owner send eth to DittoMachine to be used as gas when ejector is called. So there is a mapping(cloneId => value)
and anyone can bump up the value. I can't decide if this is a good or a bad idea.
https://github.com/ditto-lab/ditto/blob/2dd8b7f20a0f223160466a8d2953551a796c5306/src/DittoMachine.sol#L592