moneymarket-liquidation-queue 0.1.0

A MoneyMarket liquidation contract - handles over liquidation model
Documentation
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ExecuteMsg",
  "anyOf": [
    {
      "type": "object",
      "required": [
        "receive"
      ],
      "properties": {
        "receive": {
          "$ref": "#/definitions/Cw20ReceiveMsg"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "update_config"
      ],
      "properties": {
        "update_config": {
          "type": "object",
          "properties": {
            "bid_fee": {
              "anyOf": [
                {
                  "$ref": "#/definitions/Decimal256"
                },
                {
                  "type": "null"
                }
              ]
            },
            "liquidation_threshold": {
              "anyOf": [
                {
                  "$ref": "#/definitions/Uint256"
                },
                {
                  "type": "null"
                }
              ]
            },
            "liquidator_fee": {
              "anyOf": [
                {
                  "$ref": "#/definitions/Decimal256"
                },
                {
                  "type": "null"
                }
              ]
            },
            "oracle_contract": {
              "type": [
                "string",
                "null"
              ]
            },
            "overseer": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner": {
              "type": [
                "string",
                "null"
              ]
            },
            "price_timeframe": {
              "type": [
                "integer",
                "null"
              ],
              "format": "uint64",
              "minimum": 0.0
            },
            "safe_ratio": {
              "anyOf": [
                {
                  "$ref": "#/definitions/Decimal256"
                },
                {
                  "type": "null"
                }
              ]
            },
            "waiting_period": {
              "type": [
                "integer",
                "null"
              ],
              "format": "uint64",
              "minimum": 0.0
            }
          }
        }
      },
      "additionalProperties": false
    },
    {
      "description": "Owner operation to whitelist a new collateral",
      "type": "object",
      "required": [
        "whitelist_collateral"
      ],
      "properties": {
        "whitelist_collateral": {
          "type": "object",
          "required": [
            "bid_threshold",
            "collateral_token",
            "max_slot",
            "premium_rate_per_slot"
          ],
          "properties": {
            "bid_threshold": {
              "$ref": "#/definitions/Uint256"
            },
            "collateral_token": {
              "type": "string"
            },
            "max_slot": {
              "type": "integer",
              "format": "uint8",
              "minimum": 0.0
            },
            "premium_rate_per_slot": {
              "$ref": "#/definitions/Decimal256"
            }
          }
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "update_collateral_info"
      ],
      "properties": {
        "update_collateral_info": {
          "type": "object",
          "required": [
            "collateral_token"
          ],
          "properties": {
            "bid_threshold": {
              "anyOf": [
                {
                  "$ref": "#/definitions/Uint256"
                },
                {
                  "type": "null"
                }
              ]
            },
            "collateral_token": {
              "type": "string"
            },
            "max_slot": {
              "type": [
                "integer",
                "null"
              ],
              "format": "uint8",
              "minimum": 0.0
            }
          }
        }
      },
      "additionalProperties": false
    },
    {
      "description": "Submit a new bid to a bid pool",
      "type": "object",
      "required": [
        "submit_bid"
      ],
      "properties": {
        "submit_bid": {
          "type": "object",
          "required": [
            "collateral_token",
            "premium_slot"
          ],
          "properties": {
            "collateral_token": {
              "type": "string"
            },
            "premium_slot": {
              "type": "integer",
              "format": "uint8",
              "minimum": 0.0
            }
          }
        }
      },
      "additionalProperties": false
    },
    {
      "description": "Withdraw a bid",
      "type": "object",
      "required": [
        "retract_bid"
      ],
      "properties": {
        "retract_bid": {
          "type": "object",
          "required": [
            "bid_idx"
          ],
          "properties": {
            "amount": {
              "anyOf": [
                {
                  "$ref": "#/definitions/Uint256"
                },
                {
                  "type": "null"
                }
              ]
            },
            "bid_idx": {
              "$ref": "#/definitions/Uint128"
            }
          }
        }
      },
      "additionalProperties": false
    },
    {
      "description": "After waiting_period expires, user can activate the bid",
      "type": "object",
      "required": [
        "activate_bids"
      ],
      "properties": {
        "activate_bids": {
          "type": "object",
          "required": [
            "collateral_token"
          ],
          "properties": {
            "bids_idx": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "$ref": "#/definitions/Uint128"
              }
            },
            "collateral_token": {
              "type": "string"
            }
          }
        }
      },
      "additionalProperties": false
    },
    {
      "description": "Claim the corresponding amount of liquidated collateral",
      "type": "object",
      "required": [
        "claim_liquidations"
      ],
      "properties": {
        "claim_liquidations": {
          "type": "object",
          "required": [
            "collateral_token"
          ],
          "properties": {
            "bids_idx": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "$ref": "#/definitions/Uint128"
              }
            },
            "collateral_token": {
              "type": "string"
            }
          }
        }
      },
      "additionalProperties": false
    }
  ],
  "definitions": {
    "Binary": {
      "description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>",
      "type": "string"
    },
    "Cw20ReceiveMsg": {
      "description": "Cw20ReceiveMsg should be de/serialized under `Receive()` variant in a ExecuteMsg",
      "type": "object",
      "required": [
        "amount",
        "msg",
        "sender"
      ],
      "properties": {
        "amount": {
          "$ref": "#/definitions/Uint128"
        },
        "msg": {
          "$ref": "#/definitions/Binary"
        },
        "sender": {
          "type": "string"
        }
      }
    },
    "Decimal256": {
      "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal256(1_000_000_000_000_000_000) == 1.0 The greatest possible value that can be represented is 115792089237316195423570985008687907853269984665640564039457.584007913129639935 (which is (2^128 - 1) / 10^18)",
      "type": "string"
    },
    "Uint128": {
      "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
      "type": "string"
    },
    "Uint256": {
      "type": "string"
    }
  }
}