Skip to content

Conversation

@sidduHERE
Copy link
Contributor

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

contract YakAVAX is ERC20 {
contract YakAVAX is ERC20, Ownable {
IPair private swapPair;
bool private swapsEnabled;
Copy link
Collaborator

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);
Copy link
Collaborator

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 {
Copy link
Collaborator

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));
Copy link
Collaborator

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 {
Copy link
Collaborator

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

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.

2 participants