Commit Graph

10 Commits

Author SHA1 Message Date
r4bbit
782cd17f05 chore: use stable foundry on CI 2025-06-04 14:47:14 +02:00
r4bbit
801740f74f !refactor(RewardsStreamerMP): rename RewardsStreamerMP to StakeManager
This renames `RewardsStreamerMP` to `StakeManager`. The original name
only exists because the project has started with different versions of
the contract. Since the contract is no longer just dealing with MPs but
actually distributes rewards, it makes sense to make this the official
stake manager of the protocol.

**BREAKING CHANGE:**

- `RewardsStreamerMP` is now `StakeManager`
- `StakingManager__*` error selectors are now `StakeManager__*`
  selectors
2025-03-28 14:45:31 +01:00
r4bbit
fed4446749 fix(ci): run MPLessEqualMaxMP spec on CI (#171) 2025-03-11 08:24:39 +01:00
Andrea Franz
50b6d1a545 chore(XPToken): rename XP to Karma 2025-02-21 11:43:12 +01:00
r4bbit
dd755f1cb7 ci: add --via-ir option to coverage task
This is to avoid stack too deep errors when testing
2025-02-21 09:35:29 +01:00
r4bbit
cce4267ce4 ci: update certora CLI to 7.25.2 2025-02-20 20:02:45 +01:00
Ricardo Guilherme Schmidt
8561a68ffd feat(RewardsStreamerMP): make RewardsStreamerMP upgradeable
This commit introduces upgradeability of the `RewardsStreamerMP`
contract by leveraging the UUPS pattern.

This means, for deployment, we have to first deploy an instance of
`RewardsStreamerMP` contract as a "template" logic contract and then
create a ERC1967Proxy that points to it.

The proxy ensures the implementation address is stored in a
deterministic storage slot.

This will later be leveraged by the `StakeVault` contract to implement
the functionality to leave the system in case there was a malicious
upgrade.

Closes #22
2024-12-01 08:06:51 +01:00
r4bbit
1e703e3f71 feat(RewardStreamerMP): add emergency mode so users can exit the system
This adds a new emergency mode that can be enabled by the owner of the system.
When in emergency mode, stakers or `StakeVault`s can leave the system immediately.

This also applies when there was a malicious upgrade and a call to
`emergencyModeEnabled()` panics.

To have this in a fully secure manner, we still have to add the counter
part of "leaving" the system. This will allow users that don't agree
with a (malicious) upgrade to get their funds out of the vaults
regardless.

Closes #66
2024-11-28 08:27:58 +01:00
r4bbit
3eb4aa830e chore(certora): add sumOfBalancesIsTotalStaked invariant
Closes #24
2024-10-14 12:04:52 +02:00
Andrea Franz
4ef75621a3 import foundry template (#1) 2024-09-25 09:39:14 +02:00