Commit Graph

8 Commits

Author SHA1 Message Date
r4bbit
9374025924 feat(StakeManager): add capabilities to register vaults
This commit introduces changes related to vault registrations in the
stake manager.

The stake manager needs to keep track of the vaults a users creates so
it can aggregate accumulated MP across vaults for any given user.

The `StakeVault` now comes with a `register()` function which needs to
be called to register itself with the stake manager. `StakeManager` has
a new `onlyRegisteredVault` modifier that ensures only registered vaults
can actually `stake` and `unstake`.

Closes #70
2024-12-03 16:55:34 +01:00
Andrea Franz
dffaea2a73 feat(RewardsStreamerMP): stream rewards for a period without checking a real reward token balance 2024-12-03 13:50:52 +01:00
r4bbit
4968ad4ea6 test(RewardsStreamerMP): add test to ensure funds are saffe when stack overflow
If there's a malicious upgrade which causes a stack overflow error when
`leave()` is called, the user of the vault should still be able to get
their funds out.

This commit adds a test that proofs this is happening.
2024-12-01 08:25:36 +01:00
Andrea Franz
e4e8c7c505 chore(XPNFTToken): add INFTMetadataGenerator with Base and SVG generator 2024-10-14 11:58:28 +02:00
Andrea Franz
b9c34ec48e chore(XPToken): use share instead of contribution in IXPProvider function names 2024-10-11 16:56:03 +02:00
Andrea Franz
117fc2300e test(XPToken): add tests 2024-10-11 16:56:03 +02:00
Andrea Franz
4ef75621a3 import foundry template (#1) 2024-09-25 09:39:14 +02:00
Andrea Franz
912d0bd100 add tests on reward index after staking and unstaking 2024-09-13 16:36:23 +02:00