Towards an Industry Standard Python Library for Token Engineering

Towards an Industry Standard Python Library for Token Engineering Models

TL;DR

This 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.

This 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.

Proposal description

The idea is to create the industry standard python library for Token Engineering.

Similar to how scikit-learn is the industry standard python library for Machine Learning.

The objective is to produce an interface like the following:

from tec.amm import Uniswap, Balancer, Curve, Water
from tec.issuance import AugmentedBondingCurve
from tec.stables import DAI, LAMMA, FRAX
from tec.lending import Aave, Compound
from tec.token import Erc20, Erc721, Erc1155, Erc4626
from tec.voting import Dandelion, ConvictionVoting
from tec.dao import Hatch, Gardens, Safe, Moloch, CulturalBuild
from tec.rewards import Praise, Coordinape

commons_build_model = Gardens(
                phase1=CulturalBuild(rewards=Praise(), voting=Dandelion()),
                phase2=Hatch(
                        issuance=AugmentedBondingCurve(reserve_ratio=0.65, starting_price=1, starting_supply=1e6),
                        voting=ConvictionVoting(parameter='supagov'),
                        liquidity=Water(Uniswap(supply=1e4), supply=1e4),
                )
            )

commons_build_model.view_dashboard()
#... continue analysis

I propose the use of python param 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.

One 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.

You can read about my opinion on param here. To get more acquanted with param, I would recommend reading a few pages of the documentation, particularly interesting is the section about param enabling the programming of contracts.

Additional information to add

Here are screenshots of TE models that have already been implemented with Python Param Panel:

Commons Build Hatch Model

Augmented Bonding Curve Model

Conviction Voting Model

Vyper by Example Models

Balancer Liquidity Bootstrapping Pool Model

The 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.

How does this proposal benefit the community and/or the field of Token Engineering?

  • 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.
  • This work will be an attractor that pulls software engineering talent into token engineering.
  • This work will put TEC on the map as a funder and creator of essential token engineering tooling and standards.
  • 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.
  • This work is compatible and arguably essential to the TokenGaia narrative that is gaining momentum among prominent members of the TEC.
  • This work will allow a standardization and common language around token engineering models.
  • 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.

Amount requested (Only for Conviction Voting)

  • $45KWXDAI for Phase 1
  • 4 months of funding for 6 part time developers

How will these funds be used?

  • Simple flat hourly rate, $40WXDAI/hour/contributor

  • Total hours available = $45000 / $40 = 1125 hours

  • Target 10 hours/week/contributor

  • 6 contributors * 10 = 60 hours/week total

  • 1125 hours / 60 = 18.75 weeks of runway

  • 18.75 / 4.33 = 4.33 months of runway

  • $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.

  • 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.

What does success look like?

This 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.

Phase 1 Deliverables

  • Stakeholder research to drive library specification
  • Library specification defined
  • Library infrastructure and devops initialized
  • Library MVP initialized
  • Library phase 1 features completed, tested, and documented
  • Project Website and Communication Channel initialized
  • Phase 2 funding strategy complete

How will you share progress?

  • The community can track the repository progress on Github to see commits, merged pull requests, and updated documentation
  • A project website will be established that contains library documentation
  • TEC Community call updates (Monthly frequency)
  • Twitter Spaces discussions (Semi-Monthly)

Project information (if applies)

  • No project website yet.
  • This forum post will serve as project website until further notice.

Team Information

  • YGG (LTF) - Lead developer
  • BK (LTF) - Developer
  • MD (LTF) - Developer in test
  • Rex (TEC) - Developer
  • Open (TEC) - Developer
  • Open (TEC) - Developer in test

Complementary information

The idea of producing a universal TE models library 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.

This 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.

The 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.

4 Likes

I’ve applied this grant to the Token Engineering Beta Round Gitcoin Grants.

4 Likes