DXgovernance / davi-monorepo

https://davi-monorepo-davi.vercel.app
8 stars 12 forks source link

Rich contracts V2 - formulas #300

Open rossneilson opened 1 year ago

rossneilson commented 1 year ago

As a rich contract curator, I want to provide normalisation formulas that simplify the input and reading experience of certain inputs. A good example is percentages. If say we input 1000 to represent 10% then we should have a formula for input that does X*100 then a decode formula that does X/1000 so the user always sees 10% in the UI.

Formatting formulas - Transformations done to inputs and inverse for display (great for percetnage inputs, etc)

We will need to find a good library to read the formulas, something like EXCEL format would be great but we also have to have support for big numbers.

rossneilson commented 1 year ago

Likely we will instead use decimal places for this to represent floats