Skip to content

Critical: accrue_postpaid_debt has no access control - anyone can force-slash any user's collateral #40

Description

@leanworld7-netizen

Critical: accrue_postpaid_debt has no access control - anyone can force-slash any user's collateral

Summary

The accrue_postpaid_debt function (line 8586 of contracts/utility_contracts/src/lib.rs) is a public contract function with zero authorization checks. Any caller can add arbitrary debt to any user's GuarantorDeposit, pushing the debt-to-collateral ratio above SLASH_THRESHOLD_BPS and triggering automatic slashing of the victim's locked collateral.

Affected Function

contracts/utility_contracts/src/lib.rs line 8586:

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