{"title": "Towards an Industry Standard Python Library for Token Engineering", "logoImg": "bafkreic6qs6f3pb3wbpt7rrnhg3zwudgtiidreb2ryols7t4phwi4xhan4", "website": "https://forum.tecommons.org/t/towards-an-industry-standard-python-library-for-token-engineering/1244", "bannerImg": "bafybeiamktagon6gqymood4uvzcnvoqc33kqgx7456kky3l5geynk7f62u", "createdAt": 1681604544331, "userGithub": "linuxiscool", "credentials": {"twitter": {"type": ["VerifiableCredential"], "proof": {"jws": "eyJhbGciOiJFZERTQSIsImNyaXQiOlsiYjY0Il0sImI2NCI6ZmFsc2V9..JBNLlssNEY6DQR8wfCZq2zIIV-CLd7X0uwRJSU6wvg9_RsxSuSMTL41ic645I18l6a1iddjuH4A4pobpkOrtCQ", "type": "Ed25519Signature2018", "created": "2023-08-11T20:48:18.484Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC#z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"}, "issuer": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", "@context": ["https://www.w3.org/2018/credentials/v1"], "issuanceDate": "2023-08-11T20:48:18.484Z", "expirationDate": "2023-11-09T20:48:18.484Z", "credentialSubject": {"id": "did:pkh:eip155:1:0x763d7D362B59aeA3858a92a302e18cd41b1252d4", "hash": "v0.0.0:ZaDIVJgR04tR6PT7qt3t42gCvjOudGHDy6XeL1dvNnw=", "@context": [{"hash": "https://schema.org/Text", "provider": "https://schema.org/Text"}], "provider": "ClearTextTwitter#ygg_anderson"}}}, "description": "\n### **Towards an Industry Standard Python Library for Token Engineering Models** \n\n\n### TL;DR\nThis proposal is to fund the joint collaboration between Token Engineering Commons and partner organizations to develop the industry standard token engineering models library using python param. \n\nThis proposal is to fund 6 part time developers for 4 months at a flat rate of $40WXDAI/hour as phase 1 of a 1 year development map.\n \n### Proposal description\nThe idea is to create the industry standard python library for Token Engineering.\n\nSimilar to how [scikit-learn](https://scikit-learn.org/stable/) is the industry standard python library for Machine Learning. \n\nThe objective is to produce an interface like the following:\n\n```python\nfrom tec.amm import Uniswap, Balancer, Curve, Water\nfrom tec.issuance import AugmentedBondingCurve\nfrom tec.stables import DAI, LAMMA, FRAX\nfrom tec.lending import Aave, Compound\nfrom tec.token import Erc20, Erc721, Erc1155, Erc4626\nfrom tec.voting import Dandelion, ConvictionVoting\nfrom tec.dao import Hatch, Gardens, Safe, Moloch, CulturalBuild\nfrom tec.rewards import Praise, Coordinape\n\ncommons_build_model = Gardens(\n                phase1=CulturalBuild(rewards=Praise(), voting=Dandelion()),\n                phase2=Hatch(\n                        issuance=AugmentedBondingCurve(reserve_ratio=0.65, starting_price=1, starting_supply=1e6),\n                        voting=ConvictionVoting(parameter='supagov'),\n                        liquidity=Water(Uniswap(supply=1e4), supply=1e4),\n                )\n            )\n\ncommons_build_model.view_dashboard()\n#... continue analysis\n```\n\nI propose the use of [python param](https://param.holoviz.org/) to structure the library as hierarchies of parameterized classes. Python param allows python code to offer guarentees to it's users, definining parameters as typed attributes with default values, bounds, and documentation among other qualities like typed dataframes.\n\nOne of the great features of param is that parameterized classes can be automatically visualized in jupyter notebooks or web applications using python panel. This allows custom TE dashboards to be very easily developed as compositions of TE models. To see how param can be used to automatically generate interactive dashboards, see the documentation on [panel param](https://panel.holoviz.org/user_guide/Param.html).\n\nYou can read about my opinion on param [here](https://discourse.holoviz.org/t/is-param-not-the-most-powerful-python-library-in-existence/385). To get more acquanted with param, I would recommend reading a few pages of [the documentation](https://param.holoviz.org/index.html), particularly interesting is the section about param enabling the [programming of contracts](https://param.holoviz.org/user_guide/Simplifying_Codebases.html#programming-contracts).\n\n\n### Additional information to add\nSome examples of TE models that have already been implemented with Python Param Panel:\n\n* ![Commons Build Hatch Model](https://forum.tecommons.org/uploads/default/original/1X/f1d583c967cbc4544ded3779b12b4418750ba182.png)\n* ![Augmented Bonding Curve Model](https://forum.tecommons.org/uploads/default/original/1X/534692fe5a0bc2a2d0a6fc936333453efa35a1d8.png)\n* ![Conviction Voting Model](https://forum.tecommons.org/uploads/default/original/1X/bb6f444ff97b3b56f667052b6d21dd60a1d61192.png)\n* ![Vyper by Example Models](https://forum.tecommons.org/uploads/default/original/1X/5571a0db080f8648a3fa9ebbb8f472136c4dcf22.png)\n* ![Balancer Liquidity Bootstrapping Pool Model](https://forum.tecommons.org/uploads/default/original/1X/75c68a11628586f9f003e2184364265ac0d630a1.png)\n\n\nThe work funded by this proposal would consolidate these models into a single convenient library making them all accessible and combinable from a simple python import. This will establish a single models repository that can attract developers and gain momentum as an open source project.\n\n\n### How does this proposal benefit the community and/or the field of Token Engineering? \n\n* A universal TE models library is exactly what Token Engineers are lacking in their ability to rapidly combine rigorous models in the designs of safe and sustainable token economies. \n* This work will be an attractor that pulls software engineering talent into token engineering. \n* This work will put TEC on the map as a funder and creator of essential token engineering tooling and standards. \n* Having a central repository for these disparate models will create a **schelling point** that will allow the convergence of Token Engineering resources, resulting in a rigorously developed and tested community software package that will continue to flourish over time.\n* This work is compatible and arguably essential to the TokenGaia narrative that is gaining momentum among prominent members of the TEC.\n* This work will allow a standardization and common language around token engineering models.\n* This work is highly complimentary to concurrent TEC initiatives such as the Bonding Curve research group, the TE stakeholder study analysis, and the token engineering academy.\n\n### Amount requested (Only for Conviction Voting)\n* $45KWXDAI for Phase 1\n* 4 months of funding for 6 part time developers\n\n### How will these funds be used? \n* Simple flat hourly rate, $40WXDAI/hour/contributor\n* Total hours available = $45000 / $40 = 1125 hours \n* Target 10 hours/week/contributor\n* 6 contributors * 10  = 60 hours/week total\n* 1125 hours / 60 = 18.75 weeks of runway\n* 18.75 / 4.33 = 4.33 months of runway\n\n* $10,000WXDAI sent as deposit to YGG for a credit of 250 hours as project lead upon passing of the proposal. This will guarantee consistent availability for the duration of the 4 month phase 1 roadmap.  Other members to be distributed monthly at end of month based on hours logged at a maximum of 43 hours per month. \n\n* It's important to note that the proposed budget is very lean. This proposal is open to ideas of expansion, larger funding, funding partners, development partners, and general creative expansions.\n\n### **What does success look like?** \nThis proposal is to fund phase 1 of a one year development roadmap. A successful phase 1 would result in the release of a successful software package that is available to the Token Engineering community for utilization.\n\nPhase 1 Deliverables\n* Stakeholder research to drive library specification\n* Library specification defined\n* Library infrastructure and devops initialized\n* Library MVP initialized\n* Library phase 1 features completed, tested, and documented\n* Project Website and Communication Channel initialized\n* Phase 2 funding strategy complete\n\n### How will you share progress? \n* The community can track the repository progress on Github to see commits, merged pull requests, and updated documentation\n* A project website will be established that contains library documentation\n* TEC Community call updates (Monthly frequency)\n* Twitter Spaces discussions (Semi-Monthly)\n\n### Project information (if applies) \n* No project website yet.\n* This forum post will serve as project website until further notice.\n\n### Team Information \n* [YGG](https://twitter.com/ygg_anderson) (LTF) - Lead developer\n* [BK](https://twitter.com/bgkakadiya) (LTF) - Developer\n* [MD](https://twitter.com/mikedemelo4) (LTF) - Developer in test\n* [Rex](https://twitter.com/tokengineer) (TEC) - Developer\n* Open (TEC) - Developer\n* Open (TEC) - Developer in test\n\n### Complementary information\n\nThe idea of[ producing a universal TE models library](https://forum.tecommons.org/t/universal-python-library-for-te-models/443) has been discussed among the TE community for a long time, but I believe the ecosystem is mature enough now to strike towards the right direction in successfully delivering what is needed by the field.\n\nThis proposal is complimentary to concurrently funded TEC projects such as the Bonding Curve research group, the TE stakeholder study, and the proposed TokenGaia direction of TEC and TEA.\n\nThe availability of such a powerful design and engineering tool for Token Engineers will allow the field to advance rapidly and is essential in the development of safe and sustainable token economies in alignment with the mission of the TEC.", "logoImgData": {}, "bannerImgData": {}, "projectGithub": "commonsbuild", "projectTwitter": "ygg_anderson"}