# Maintenance proposal: dotreasury and statescan Q3 and subsquare from 06.2022 to 09.2022 Proponent: OpenSquare(ESgz7GLVW7BL5DhRgpVnxSXVwaKt4ytWcrf52TY1GQD1cEb) Date: 10/09/2022 Requested Allocation: $36,841.2 (1066KSM with EMA7 price in 11.03.2022) ---- [Opensquare team](https://www.opensquare.network/team/) has been dedicated in dotsama ecosystem developing governance tools, explorers, dashboards, dapps. We are proposing a treasury proposal to cover our cost for the maintenance of [dotreasury](https://www.dotreasury.com/ksm/child-bounties), [statescan](https://statemine.statescan.io/), and [subsquare](https://www.subsquare.io/). Time scope: - dotreasury & statescan: Q3 2022. - subsquare: 06.2022 - 09.2022. ## Servers - Statescan: 4 Hetzner vps + a 800G volume, and the vps are 1 * CPX31 + 2 * CPX41 + 1 * CX41. - Dotreasury: 2 Hetzenr vps + 1200GB volume, and the vps are 2 * CPX31. - Subsquare: 2 Hetzenr vps, 2 * CX41. - Test and development: 3 contabo servers. | Product | Details | per month | Months | Total | |--------------|-------------------------------|-----------|--------|--------| | Dotreasury | 2 Hetzenr vps + 1200GB volume | $96.4 | 3 | $289.2 | | Statescan | 3 Hetzner vps + a 400G volume | $116.6 | 3 | $349.8 | | Subsquare | 2 Hetzner vps, CX41 * 2 | $34.8 | 4 | $139.2 | | Test and dev | 3 contabo servers | $21 | 3 | $63 | | Total | | | | $841.2 | ## Bug fixes, refactor and UI tweaks ### Dotreasury - Refactor - Upgrade various dependencies, like @polkadot/api, and fix the conflicts introduced by different versions. We need to replace some deprecated api calls. - Refactor background scripts. We merged several jobs into one to make it easier to maintain. - Bug fixes - signature validation. - Sort bounty/child bounty by state. - UI tweaks - Add a links column to tips table - Make bounty/child bounty curator column can be switched to beneficiary. - Show proposal title from subsquare api when admin has not edited it. - Change the UI to a smoothing font. - Other commits to improve small styles like padding, margin, etc. We will request 18 FTE equivalent work for Q3 dotreasury maintenance work. ### Statescan - Upgrade dependencies and fix the conflicts. - Some calls and events in uniques pallet changed, so we fixed scan scripts to adapt the latest interfaces. - Improve the code to decode calls. - Fix bugs about search. - Improve balance transfer records without extrinsic. We will request 10 FTE equivalent work for Q3 statescan maintenance work. ### Subsquare It cost us more time to improve, polish and refactor subsquare than other products. And, we have opened the [fronted code](https://github.com/opensquare-network/subsquare). - Bug fixes - Fix a SSR bug introduced by useEffect. - Solve some browser compatability problems like darkmode issues, SNS preview issues. - Markdown rendering related css style issues. - Fix various proposal state tag colors. - Prevent error by ethereum address in polkadot extension. - Show extrinsic failed info on toast. - UI tweaks - Improve the view for democracy proposal depositors. - Improved the chain selection dropdown menu for a clear UX. - Improved nested comments view for polkassembly post page. - Loading effect for various user actions like verifying email, thumbup, etc. - Improve login redirection. Previously it just redirect to the overview page, but it will be redirect the last page after improvement. - Accordion effect for detail page panels. - Add council motion to democracy proposal navigation bar. - Add pending toast when submitting extrinsic transaction. - Improve balance loading on treasury proposal modal. - Support customize poll end data. - Improve system#remark view by checking whether bytes are utf8. - Add tip/motion count to the right status card. - Add unsubscription link in notification emails. - Refactoring - Use react context for data sharing to take place some data on redux. - Aggregate chain settings info one file, so it became easier to add and config a new chain. - Refactor button, card container, tag, pagination and other components. - Refactor layout. - Remove useless authority query. We will request 8 FTE equivalent work per month for subsquare, so it's totally 40 FTE equivalent work. ## Enhancements ### Subsquare 1. Added interfaces to show all the votes on referendum detail page. It includes the active referendum and all the history ones. ![](https://i.imgur.com/oCSeini.jpg) 2. Editor is enhanced to support mention user with dotsama address. 3. Editor and content preview support github flavored markdown. 4. We stored the referendum electorate data for history referendums, so we don't have to load it every time. 5. Support democracy Proposal Canceled scan. ### Dotreasury - We improved the funded projects page, so it can support aggregation for proposals, tips, bounties and child bounties. We also added funded projects like [decoded-2022](https://www.dotreasury.com/ksm/projects/decoded-2022). ### Statescan - We are developing [statescan-v2](https://github.com/opensquare-network/statescan-v2), and we will migrate v1's business to this repo. We will request 12 FTE equivalent work in total for the enhancement work. ## Metrics ![](https://i.imgur.com/k2ndePI.jpg) ## Roadmaps(3~6 months) ## Total cost | Item | Detail | Cost | |------------|--------|-----------| | Servers | see servers section | $841.2 | | Bug fixs and refactor | 60FTE(dotreasury 18, statescan 10, subsquare 32) | $30,000 | | Enhancements | 12 FTE | $6,000 | | Total | | $36,841.2 | Payment conditions: - We use $500($62.5/hour) for each FTE(8 hours) maintenance cost, total 72 FTE, $36,000. - We will use the latest or EMA7 price to calculate the KSM amount, 1066KSM with price in 11.13.2022. --- Appendix: development plan for next 3~6 months. They are just for information sharing, no request in this proposal. Dotreasury: 1. More statistics. We will make more tags, and mark spendings, so we can get ratios of different spending types(marketing, development, research, etc). 2. Dapp features, more interfaces to interact with bounties, proposals, tips in a more user friendly way. 3. Providing public graphql apis for community. Statescan: We aim to make statescan an explorer solution which can be used for common substrate chains. Its main traits will be business oriented, which means well designed visualization to show on-chain business will be the most high priority goals. We also plan to use statescan development to collaborate and educate community developers, so we can enroll more developers to dotsama ecosystem. Future work in roadmap: - Migrate statemine/statemint explorer to [statescan-v2](https://github.com/opensquare-network/statescan-v2) repo. - Support polkadot/kusama. - Implement business for identity and vesting pallets. These work will be covered by the [bounty 11](https://kusama.subsquare.io/treasury/bounty/11). - Begin collaboration with developers in our bounties platform which will be released soon. Please check the code [here](https://github.com/opensquare-network/bounties). Subsquare: - Governance 2.0 support. - Off-chain discussions data decentralization. Steps: 1. Draft a spec. 2. Discuss with community in case of missed considerations and better ideas. 3. Implementation. We may start first from discussion posts, then on-chain proposals. - Post edition features enhacement which includes post tags/categories, post content catalog, uploading image directly from editor, etc. Check this [issue](https://github.com/opensquare-network/subsquare/issues/1466).