Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate and confirm the behaviour for new staking users for uad-contracts and diamond #939

Open
gitcoindev opened this issue May 22, 2024 · 10 comments

Comments

@gitcoindev
Copy link
Contributor

gitcoindev commented May 22, 2024

Right now the behaviour for new staking users is this one:

  1. User deposits 1000 UAD3CRV LP to https://etherscan.io/address/0xc251ecd9f1bd5230823f9a0f99a44a87ddd4ca38 for 1 week
  2. User waits for 1 week
  3. User withdraws 1000 UAD3CRV LP and gets 178 UAD3CRV LP + 72 UBQ. User would expect to get 1000 UAD3CRV LP instead of 178.

Originally posted by @rndquu in #752 (comment)

@gitcoindev
Copy link
Contributor Author

I extracted this to a separate issue, will post finding for both uad-contracts and diamond-based staking contract.

@0x4007
Copy link
Member

0x4007 commented Sep 25, 2024

I'm assuming its because I moved collateral out of the contract which I know affects the withdrawal amounts.

@0x4007 0x4007 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
Copy link

ubiquity-os bot commented Sep 25, 2024

# Issue was not closed as completed. Skipping.

@rndquu
Copy link
Member

rndquu commented Sep 27, 2024

I'm assuming its because I moved collateral out of the contract which I know affects the withdrawal amounts.

Do we plan to move it back to the staking contract?

@0x4007
Copy link
Member

0x4007 commented Sep 27, 2024

Yeah I think we need to migrate to v2 somehow. It was mostly removed because of some problem discovered in Sherlock if I recall correctly.

@rndquu
Copy link
Member

rndquu commented Sep 27, 2024

Yeah I think we need to migrate to v2 somehow. It was mostly removed because of some problem discovered in Sherlock if I recall correctly.

Staking contracts weren't part of the Sherlock audit.

@0x4007
Copy link
Member

0x4007 commented Sep 27, 2024

Then I don't remember why some was moved

@rndquu
Copy link
Member

rndquu commented Sep 27, 2024

Then I don't remember why some was moved

Then perhaps we should reopen this issue?

@0x4007 0x4007 reopened this Sep 27, 2024
@0x4007
Copy link
Member

0x4007 commented Sep 27, 2024

It isn't clear to me if we redid the staking yet and if we should migrate? If so perhaps we should make a new issue instead.

@rndquu
Copy link
Member

rndquu commented Sep 27, 2024

It isn't clear to me if we redid the staking yet and if we should migrate? If so perhaps we should make a new issue instead.

What we have right now:

  1. MasterChefV2.1 contract (i.e. old staking) which seems to be working fine (almost)
  2. StakingFacet (i.e. new staking) which:
    a) is not used right now
    b) not fully covered with tests so it's hard to say that it works as the original MasterChef
    c) ideally requires an audit

The only issue with the MasterChefV2.1 contract (old staking) is current github issue with missing LP tokens. If this issue is the result of owner actions or some other expected behavior then it makes sense to save development time and simply use the old staking contract.

That is why we'd better to find out the root cause of missing LP tokens and then decide whether we should proceed with the old staking or migrate to the diamond's StakingFacet contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants