Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

Optimize rewards #41

@JakeHartnell

Description

@JakeHartnell

PR #40 is adding the withdraw rewards flow (not merged at time of writing), however it is still at proof of concept stage and not optimized at all. It is also not very robust or well tested.

@ethanfrey's comments from the review:

In terms of lazy distribution of tokens, I can recommend the approach we did in wynd dao that does one write on distribution, one on withdrawal, and one extra write each time a staked updates their shares.

I have not looked at the dao-dao distribution logic, but maybe that makes sense as well. However, the wynd dao logic is designed to handle discrete payment events triggered externally, which I think is more fitting here.

The DAO DAO implementation is here: https://github.com/DA0-DA0/dao-contracts/tree/main/contracts/staking/cw20-stake-external-rewards

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