Closed brewmaster012 closed 4 months ago
@brewmaster012 would it be possible to provide some more details and assess if it is in scope for https://github.com/zeta-chain/node/issues/2401?
Yeah I'm going to close this one. After evaluation this issue does not add additional check while introducing significant complexity.
Currently, in to withdraw SPL token from the gateway program, the user must provide correct from and to addresses otherwise the transfer will fail.
https://github.com/zeta-chain/protocol-contracts-solana/blob/21cfcadc11340a7b3b6072fb4e8c02e7812dacd3/programs/protocol-contracts-solana/src/lib.rs#L165-L175
Correct include the following conditions:
from
andto
are both token accounts;from
andto
token accounts have the same mint account (they store the same SPL token)Unlike Ethereum ERC20, SPL token cannot be transferred to arbitrary accounts/addresses.