Content pfp
Content
@
0 reply
0 recast
2 reactions

Julie B. pfp
Julie B.
@bbjubjub.eth
Help me I had a stupid idea but I cant explain why it's stupid: could tx.origin be used instead of explicit approvals for authorizing token transfers? Like iff you initiate a transaction your tokens are all unlocked
6 replies
2 recasts
5 reactions

xh3b4sd ↑ pfp
xh3b4sd ↑
@xh3b4sd.eth
I think the explicit approval is to have a signature for the explicit intent of spending your tokens. Only because you are the origin of a tx does not tell the entire story of what should or should not happen with your tokens. I think this is also why only the direct peer is viewed as spender, because smart contracts may become token holders on your behalf when you "deposit" into them, which requires you to allow them to spend your tokens, even though you are the tx.origin.
2 replies
0 recast
1 reaction

Julie B. pfp
Julie B.
@bbjubjub.eth
That's true. OTOH smart contracts also have to handle raw ETH somehow. Essentially you would need to call them to ask for tokens. I didn't think about that. Best answer so far, and I'm half-trolling anyway
0 reply
0 recast
1 reaction

Dylan pfp
Dylan
@elffjs
Is it common sentiment that everyone should be using account abstraction? In that case, tx.origin is not useful and batching the operation you want with an approve call is easier.
1 reply
0 recast
0 reaction