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

Neutroswap milestone 0 delivery #136

Merged
merged 5 commits into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions deliveries/tokenomics_enhancement_neutroswap_milestone_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Milestone Delivery

**The [invoice form](https://forms.gle/wLuAzXKa9qYrZQob9) has been filled out for this milestone and the delivery is according to the official [milestone delivery guidelines](https://github.com/eosnetworkfoundation/grant-framework/blob/master/docs/milestone-deliverables-guidelines.md).**

* **Application Document:** [Tokenomics Enhancement Neutroswap
](https://github.com/eosnetworkfoundation/grant-framework/blob/main/applications/tokenomics_enhancement_neutroswap.md)
* **Milestone Number:** 0

**Context:**
For *Milestone 0 - Requirement Analysis* completion

**Deliverables:**
- **Estimated duration:** 2 weeks
- **FTE:** 2
- **Costs:** 5,000 USD

| Number | Deliverable | Link | Notes |
| -----: | ----------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| 0a. | License | MIT | |
| 0b. | Threads | [Twitter Thread](https://twitter.com/Neutroswap/status/1717168444666519930) | The link given here is just a typefully draft and will be released to the public at our marketing schedule |
| 1. | General Requirement and Migration Plan | Within this document | Unpacking smart contract requirements, migration plan for both subgraph and frontend, and integration testing plan |
| 2. | Documentation | [Neutroswap V2 Docs](https://docs.neutroswap.io/neutroswap-v2/staked-positions-spnfts/yield-farming), [Neutroswap V2 Contract Docs](https://github.com/neutroswap/neutroswap-v2-contracts/blob/main/README.md) | For an extensive understanding of Neutroswap v2, please refer to our [Documentation](https://docs.neutroswap.io) |

## General Requirement and Migration Plan
This document serves as an introduction to the general requirements and migration plan for a decentralized application. It aims to provide an outline for developers, project managers, and stakeholders to navigate the complexities of building and migrating to Neutroswap V2 effectively.

### Smart contract Requirement
Neutroswap V2 will introduce multiple contract that support our V2 tokenomics like plugins, NFT-based position, and launchpad.
For an extensive understanding of Neutroswap v2, please refer to our [Documentation](https://docs.neutroswap.io).
Below are the list of new Neutroswap V2 contract:

- **xNEUTRO**<br/>
The locked version and non-transferrable token of $NEUTRO with the purpose of providing utility for users by allocating xNEUTRO to various provided Plugins.

- **NeutroMaster**<br/>
Centralizes Neutro's yield incentives distribution.

- **NFTPoolFactory**<br/>
Factory pattern for creating NFT Pool.

- **NFTPool**<br/>
Wraps ERC20 assets into non-fungible staking positions called spNFTs. Yield-generating positions when the NFTPool contract has allocations from the Neutro Master.

- **NitroPoolFactory**<br/>
Factory pattern for creating Nitro Pool.

- **NitroPool**<br/>
spNFTs Pool for incentives position based on the determined position requirements and purposed for collaborating with other projects.

- **Dividends**<br/>
Neutroswap Plugin to distribute dividends to xNEUTRO allocators.

- **YieldBooster**<br/>
Neutroswap Plugin to boost spNFTs' yield (staking positions on NFTPools).

- **FairAuctionFactory**<br/>
Factory pattern for creating Fair Auction (launchpad).

- **NeutroHelper**<br/>
Serving data to the frontend, for example to calculate APR, dollar value of the pool, and etc.

> The legacy NeutroChef contract would stop its emission, and all $NEUTRO emission will be handled by the new NeutroMaster contract we mentioned above.

### Subgraph Migration Plan
No changes are required on our legacy subgraph, but there's two additional subgraph we should build:

- **NFT Pool Subgraph**<br/>
This subgraph is responsible to index all NFT pool created by user from our contract. In relationship, this subgraph will also track the relationship between Nitro pool and NFT pool.

- **FairAuction Subgraph**<br/>
The main use of this subgraph is to track contribution and index price change on our FairAuction contract. This subgraph also serve detailed information about the fair auction (launchpad).

### High Fidelity Prototype
Neutroswap V2 high fidelity prototype is available [here](https://www.figma.com/file/gkw76rgPT3CWqALsY51FEq/Neutroswap-V2-High-Fidelity-Prototype?type=design&node-id=0%3A1&mode=design&t=lZmmvo17eMou581J-1)

### Front-end Migration Plan
After long code review, we found multiple changes that are required for the app maintanability. We acknowledge that everything listed below is non intrusive and not required for the Neutroswap V2 launch, it is better to list them here for the app maintanability

- [ ] NextJS 13 introduced the `app` directory but `pages` directory isn’t deprecated yet
- [ ] Bump `wagmi` to latest (uses `viem` instead of `ethers`)
- [ ] Bump `viem` to latest
- [ ] Migrate all `ethers` to use `viem`
- [ ] Migrate all `BigNumber` to `BigInt`

### Integration Testing Plan
- [ ] Prepare the test case that covers V2 features
- [ ] Prepare the test environtment and test data
- [ ] Launch V2 features on testnet, and integrate all existing contract to the V2 features
- [ ] Execute the integration testing and create a integration testing report

>