Skip to content

MiningManager #61

@EGreg

Description

@EGreg

The idea of StakeManager is very similar to ClaimManager but instead of trading ClaimingToken for TradedToken, you actually stake some StakingToken (which could be, in theory, the same as TradedToken) and receive staking shares. You will get TradedToken proportionally to how many shares you held at the time, relative to total staked shares at that time.

The TradedToken has availableToClaim() and claim() methods, which this contract uses to find out how many tokens it can claim, then claims them all and distributes according to the stakes. It has its own methods claim(), claimToAddress(), stake() and unstake().

This contract can be used, therefore, instead of ClaimManager. The difference is that unlike ClaimManager, stakers in StakeManager do not lose their StakedToken when they earn TradedToken for staking.

@EGreg already wrote the contract, upgradeable versions and factory, @artman325 needs to turn it into production-ready code with tests.

Metadata

Metadata

Assignees

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