-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Structure #6
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
base: main
Are you sure you want to change the base?
Conversation
| contract YakAVAX is ERC20 { | ||
| contract YakAVAX is ERC20, Ownable { | ||
| IPair private swapPair; | ||
| bool private swapsEnabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need an admin function to disabled it and re-enable
| } | ||
|
|
||
| function unwrap(uint amount) public { | ||
| _burn(msg.sender,amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good idea to require that the contract has the underlying AVAX available
| _; | ||
| } | ||
|
|
||
| receive() external payable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MiniYak does not need to deal with payable, it'll receive YakToken which is ERC20 and wrap it
| } | ||
|
|
||
| function unwrap(uint amount) public { | ||
| _burn(msg.sender,amount.div(mini)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should require here that the amount is bigger than mini, otherwise the division will yield the result of 0.
| import "../libs/openzeppelin/utils/math/SafeMath.sol"; | ||
|
|
||
| contract MiniYak is ERC20 { | ||
| contract MiniYak is ERC20, Ownable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to limit the transfer function to only transfer values higher than mini, users with less mYak than the defined mini would cause problems
WE can either have an interface implementing the common methods., and leave them for now in their respective contracts.
we will be having a proxy contract which connects stable swap of Gondola to do swapFromAVAX/swapToAVAX methods.
We have a masterchef which can distribute rewards