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

SuperDCAStaker Contract #2

Open
mikeghen opened this issue Sep 9, 2024 · 0 comments
Open

SuperDCAStaker Contract #2

mikeghen opened this issue Sep 9, 2024 · 0 comments

Comments

@mikeghen
Copy link
Member

mikeghen commented Sep 9, 2024

This contract SuperDCAStaker is how DCA liquidity providers can deposit their LP into the UniswapV3Staker contract.

The contract purpose is to record the association between the Uni LP NFP and the owner of it. Currently, deposits to UniswapV3Staker mean that there is no way to find the owners NFP again, a posteriori the information about the NFP ID # is lost from on chain and would required an indexer to find.

Therefore this contract will maintain a look up table for owner to their NPID:

mapping(address owner => uint256 nfpId) ownerDepositNfpId
  • On deposit, record the mapping, on withdraw, remove the association.
  • Limit deposits of 1 NFP per owner to keep it simple
  • The users will interact with the UniswapV3Staker through this SuperDCAStaker
  • Will be ERC721Enumberable, the frontend will use the tokenIdOfOwnerByIndex(owner, index) to display all their staking deposits.
@mikeghen mikeghen changed the title SuperDCAStaking Contract SuperDCAStaker Contract Sep 9, 2024
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

1 participant