beamer-bridge / beamer

Beamer - Bridging rollups with L1 inherited security
https://beamerbridge.com
MIT License
44 stars 21 forks source link

How to compound balance #2

Closed fredo closed 2 years ago

fredo commented 3 years ago

Unfortunately, I realized that it is quite difficult to compound the balance of the service provider since the claim period ends with no interaction with the blockchain. This means that we end up with a list of claims and when they end, which will increase the balance. While we can still withdraw everything in one transaction, the complexity grows linearly with the number of claims and is not constant.

One mitigation what we could do is update the balance whenever the service provider starts a new claim.

If you have other suggestions, lets discuss

palango commented 3 years ago

We could add a compoundClaim call that basically moves the funds from the requester to the claimer inside the contracts. Still costs a transaction, but I don't see a way around it.

istankovic commented 2 years ago

@fredo what are your plans regarding this item?

fredo commented 2 years ago

there is a specific proposal how to do this with issue #882 . closing this in favor of #882 since it is kind a duplicate.