Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

[security] prevent locking the finalisation #97

Open
YBadiss opened this issue Mar 7, 2024 · 0 comments
Open

[security] prevent locking the finalisation #97

YBadiss opened this issue Mar 7, 2024 · 0 comments
Assignees

Comments

@YBadiss
Copy link
Collaborator

YBadiss commented Mar 7, 2024

If a smart contract creates or rates a note, but has a failing receive function, the finalisation of notes will always fail.

This is a cheap way for blocking our finalisation process that can be mitigated by:

  • not reverting on failure to reward/slash
  • keep track of funds that were not returned to users
  • allow owners of these funds to retrieve them by calling into the contract (careful re-entrancy)

We could also remove the auto-send of funds on finalisation and force people to call us to get their funds, but that is costly for users and slows down the rewards.

@YBadiss YBadiss self-assigned this Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant