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

ADO Idea Proposal - NFT Staking #8

Open
oneShot0430 opened this issue Jun 5, 2024 · 9 comments
Open

ADO Idea Proposal - NFT Staking #8

oneShot0430 opened this issue Jun 5, 2024 · 9 comments

Comments

@oneShot0430
Copy link

Contact Information
-Name: Richard Thomas
-Discord: konta5497
-Email Address: [email protected]

ADO Summary - What is the goal of this ADO and how does it function?
The aim of this ADO is to offer a smart contract that enables users to stake, unstake, and claim their NFTs, along with any accrued rewards, after the unbonding period has elapsed.

Does it need to work with another ADO or is it standalone? Also, does it implement any modules?
This ADO is designed to function independently and does not rely on other ADOs or implement any modules.

Are you planning to build this ADO yourself, or by the Andromeda team
(myself)

Credits/Associations - Is this ADO based upon a previous project or ADO or in partnership with any other groups or developers? If so, please list here and provide a link if possible.
This ADO is an original project and is not based on or affiliated with any previous projects, ADOs, groups, or developers.

Can you provide any docs/articles/research that explains the main idea of the ADO and how/why it is used.
For more information on the concept and utility of the ADO, please refer to the following resources:
https://www.andromedaprotocol.io/aos-hackerboard
https://www.coinbase.com/en-ca/learn/advanced-trading/what-is-nft-staking-and-how-does-it-work
https://stackbrowser.com/blog/staking-nfts

ADO Flow Breakdown - Please list and provide descriptions of each step in the ADO flow sequence (show us how to work with the ADO and associated workflow, visuals are great here):

  • Instantiation - What is defined when instantiating the ADO:

    • Owner of the contract
    • Unbonding period
    • Reward token denomination
    • Allowed NFT smart contract addresses for staking
  • Execution - After instantiation, what is the process for working with the ADO:

    • Receive: User transfers NFT to stake in the ADO.
    • Unstake: User initiates unstaking of an NFT, starting the unbonding period.
    • ClaimNFT: User claims the staked NFT after the unbonding period.
    • ClaimReward: User claims rewards for the staked NFT
    • AddReward: Owner adds rewards to the ADO.
    • RemoveReward: Owner removes rewards from the ADO, ensuring that pending rewards can still be fulfilled.
    • UpdateConfig: Owner updates platform configuration such as unbonding period and denomination.
  • Queries - What type of information will you need to include, search upon:

    • GetPlatformConfig: Get the configuration of the staking platform like unbonding period
    • ListAllStakers: Obtain a list of all stakers.
    • GetStakerDetails: Retrieve information about a specific staker, including total pending rewards and staked NFTs.
    • GetNFTDetails: Get details about the staked token, including owner information, pending rewards, and its status (staked or in unbonding period).
  • GetPendingRewards: Total pending rewards for the specified staker

Considerations/Concerns - What factors should be considered to mitigate risk of misuse, abuse, or other unintended scenarios, if any?

  • Consistency: Implement mechanisms to ensure fair and consistent configurations for all stakers. For example, if the unbonding period is extended, the original period should still apply to existing stakers.
  • Access Control: Enforce access control measures to prevent unauthorized configuration changes and reward management.
  • Reward Management: Apply rewards differently to various NFTs to ensure fairness.

Possible Next Iterations/Future Work - How can this ADO be further enhanced?

  • Advanced NFT management: Implement mechanisms to lock/unlock NFTs for staking/unstaking instead of transferring them.

Any Dependencies or Third Party Integrations? (Ex. Will this ADO need to work with anything off chain, a different app, etc?):
This ADO does not require any dependencies or third-party integrations.

@kevincolahan
Copy link

Thank you for submission. This is under review currently. Will report back soon :)

@joemonem
Copy link

joemonem commented Jul 3, 2024

Looks good to me, looking forward to reviewing the implementation!

@oneShot0430
Copy link
Author

Sounds good, I will complete it in several days

@oneShot0430
Copy link
Author

I found an issue for enhancement in andromeda core while working on the hackerboard. Mind reviewing that if you don't mind?

andromedaprotocol/andromeda-core#500

I think this might be pretty important for hackerboard submissions as it is also somewhat related to the template function

@joemonem
Copy link

joemonem commented Jul 4, 2024

I'll look into it and get back to you, thanks for the feedback.

@mdjakovic0920
Copy link

I also think it is important thing for Hackerborad ADO development - andromedaprotocol/andromeda-core#500
In development I used andromeda_std::error::ContractError as return type of customized ADO, but it limits the utility of various kinds of error at ADO development outside of Core framework.

@kevincolahan
Copy link

I also think it is important thing for Hackerborad ADO development - andromedaprotocol/andromeda-core#500 In development I used andromeda_std::error::ContractError as return type of customized ADO, but it limits the utility of various kinds of error at ADO development outside of Core framework.

@daniel-wehbe - can we make sure this is part of any of the ADO submission or build out details if it doesn't exist currently?

@kevincolahan
Copy link

@oneShot0430 - any other issues you ran into? Hope you had a good weekend!

@oneShot0430
Copy link
Author

Thank you for your asking, @kevincolahan , I had a nice weekend, Heop you also had a weekend.
I will let you know if I have any issue furthermore.

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

4 participants