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

Mint/Burn L Tokens #6

Closed
ethanfrey opened this issue Dec 7, 2021 · 0 comments · Fixed by #28
Closed

Mint/Burn L Tokens #6

ethanfrey opened this issue Dec 7, 2021 · 0 comments · Fixed by #28
Assignees
Milestone

Comments

@ethanfrey
Copy link
Collaborator

ethanfrey commented Dec 7, 2021

Add two more messages to the Market contract to "deposit" and "withdraw" L tokens.

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    /// X base_asset must be sent along with this message. If it matches, X l_token is minted of the sender address.
    /// The underlying base_asset is stored in this Market contract
    Deposit { },
    /// This requests to burn amount L Tokens and receive that in base_asset.
    /// In the future we will do a check if this is allowed, for now, you can always allow, assuming enough L Token balance
    /// Dispatches two messages, one to burn amount Token from this, and the other to send amount base asset to the sender.
    Withdraw { amount: Uint128 },
}

There should be a placeholder function can_withdraw(sender: &Addr, amount: Uint128) that always returns true now. This will later check if all the collateral is needed to cover other debts.

@ethanfrey ethanfrey added this to the v0.2.0 milestone Dec 7, 2021
@ethanfrey ethanfrey added this to Unrefined Backlog in Isotonic Contracts Dec 7, 2021
@ethanfrey ethanfrey moved this from Unrefined Backlog to To do in Isotonic Contracts Dec 7, 2021
@uint uint self-assigned this Dec 13, 2021
@uint uint moved this from To do to In progress in Isotonic Contracts Dec 13, 2021
@uint uint moved this from In progress to To do in Isotonic Contracts Dec 13, 2021
@uint uint moved this from To do to In progress in Isotonic Contracts Dec 13, 2021
@uint uint closed this as completed in #28 Dec 13, 2021
Isotonic Contracts automation moved this from In progress to Done Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants