Skip to content

[bug] ShieldedDelegationAccount: Spend limit only tracks ETH value, E/SRC20s #116

@samlaf

Description

@samlaf
if (S.spendLimit != 0) {
    totalValue = _calculateTotalSpend(executionData);

_calculateTotalSpend only sums the value field of each sub-call (ETH). A session key with a 1 ETH spend limit can still drain all ERC-20 tokens. Porto
tracks per-token spend by inspecting transfer/transferFrom calldata and comparing balance deltas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions