gildlab / ethgild

Other
2 stars 3 forks source link

require that third party withdrawal/redeem has *both* erc20 approval and erc1155 operator status #194

Closed thedavidmeister closed 11 hours ago

thedavidmeister commented 2 days ago

currently withdrawals/redemption only require the caller to be the owner or approved for the erc20 share token

this is probably fine most of the time, as it is unusual for people to approve EOAs and trusted/trustworthy contracts are unlikely to try to do anything bad

to be more conservative though, we should require that third party withdrawals/redemptions are both approved for the erc20 shares and have operator status for the erc1155 receipts

this way, someone can approve a third party to handle shares without exposing their receipts to be burned

this is important because receipts are not all created equally, burning the correct receipt is very important and so has a higher burden of trust than simply moving shares around

thedavidmeister commented 11 hours ago

fixed by https://github.com/gildlab/ethgild/pull/180