ExocoreNetwork / exocore-contracts

5 stars 5 forks source link

[security] Claim only to `msg.sender` #27

Closed MaxMustermann2 closed 5 months ago

MaxMustermann2 commented 5 months ago

Currently, our claim function is as follows.

function claim(address token, uint256 amount, address recipient)

However, it should be changed to this.

function claim(address token, uint256 amount)

This is to reduce the attack vector, and align with the advice that Exocore acts a trust-minimized L1 and that the withdrawal address equals the deposit address for all stakers.

adu-web3 commented 5 months ago

the recipient is later added as a feature: staker could specify a destination address(an EOA address or a contract address) as recipient address. If we remove this argument, we would disable this feature. So it depends on whether we need this feature