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

Aip 5 updates #8

Merged
merged 13 commits into from
Apr 4, 2022
Merged

Aip 5 updates #8

merged 13 commits into from
Apr 4, 2022

Conversation

nms-7
Copy link
Contributor

@nms-7 nms-7 commented Mar 22, 2022

  • updates both sdk and subgraph to estimate supply change, including necessary params rebaseFunctionLowerPercentage, rebaseFunctionUpperPercentage, and rebaseFunctionGrowth

@aalavandhan
Copy link
Member

aalavandhan commented Mar 22, 2022

Were you able to deploy this subgraph? I'm not sure if the updated version will work.

Since the new parameters are to be added much later as an upgrade, when we reindex the subgraph the rpc calls to query the lower, upper and growth parameters could fail.

https://github.com/ampleforth/ampleforth-core/pull/8/files#diff-91f6e273ed4336a18b587defbd09ad38908bb456a0c092a1d1ca922a81dba952R15

Copy link
Member

@aalavandhan aalavandhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you deploy the subgraph using your github handle?
Once It's indexed we can test it locally and then point ampleforthorg/core to it.

let exp = growth.multipliedBy(delta)
exp = BigNumber.maximum(new BigNumber('100'), exp)
exp = BigNumber.minimum(new BigNumber('-100'), exp)
const pow = new BigNumber('2').exponentiatedBy(exp)
Copy link

@ahnaguib ahnaguib Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exp=floor(exp * 32)/32
if (exp<0)
exp=ceil(exp * 32)/32

@aalavandhan aalavandhan merged commit 69caa95 into master Apr 4, 2022
@aalavandhan aalavandhan deleted the aip-5-updates branch April 4, 2022 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants