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

Templates for twap and assets that are same base 1e18 #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrecronje
Copy link
Contributor

What I did

Added templates to meta pool for base 1e18 assets and include TWAP

base_tokens: uint256 = CurveBase(self.base_pool).calc_token_amount(base_amounts, _is_deposit)
meta_amounts[MAX_COIN] = base_tokens

return CurveMeta(self.pool).calc_token_amount(meta_amounts, _is_deposit)

Choose a reason for hiding this comment

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

thank you

@external
def unkill_me():
assert msg.sender == self.owner # dev: only owner
self.is_killed = False

Choose a reason for hiding this comment

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

thank you

"base_pool_token": true
}
]
}

Choose a reason for hiding this comment

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

thank you

@GopherJ
Copy link

GopherJ commented Feb 27, 2023

@iamdefinitelyahuman hi I'm working on a twap oracle based on fraxETH pool, but seems the pool contract is not deployed with twap feature enabled: https://etherscan.io/address/0xa1f8a6807c402e4a15ef4eba36528a3fed24e577

do you know why?|

while in the doc I can already find the get_twap_balances method: https://github.com/curvefi/curve-docs/blob/main/docs/factory-oracles.rst

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.

3 participants