seer-pm / demo

5 stars 9 forks source link

Can the wrapped1155s be fully approved at all times to the router #43

Closed greenlucid closed 1 month ago

greenlucid commented 1 month ago

Then, the user will only need to do 1 approve for ERC20 token to split to the router, and that's it.

Otherwise, the user will need to do 1 extra tx for every market they want to redeem shares off, one approve per outcome they want to redeem, and that might get lame.

Might there be a way to automatically have all wrapped1155s be approved to the MainnetRouter/GnosisRouter, right?

greenlucid commented 1 month ago

You can skip this https://github.com/seer-pm/demo/pull/42 completely if you make every constructed wrapped1155 automattically approve max (e.g., make it an standard erc20 but:

allowance => if (msg.sender == 0xROUTER) return uint256.max else return allowance[msg.sender] )

xyzseer commented 1 month ago

we would need to add a governor to allow changing the Router address too (we are governance-free now!)

my idea about it was to wait until something like EIP-7702 is available to avoid the multi approvals (I think the next hardfork is close?)

greenlucid commented 1 month ago

Sorry I think I'm not in the loop, why is being able to change the Router address needed? Just get it right the first time, so no governance at all, right?

xyzseer commented 1 month ago

sure, if we can get it right the first time everything will be a lot easier 😁

greenlucid commented 1 month ago

closing as it won't matter for launch