Vaulta

margin.wal

Contract

The data structures defined by this contract.

  • Table row type of accthistory

    {
      "name": "account_history",
      "base": "",
      "fields": [
        {
          "name": "record_id",
          "type": "uint64"
        },
        {
          "name": "account_id",
          "type": "name"
        },
        {
          "name": "exchange",
          "type": "name"
        },
        {
          "name": "leverage_id",
          "type": "uint64"
        },
        {
          "name": "type",
          "type": "uint8"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "event_time",
          "type": "time_point_sec"
        },
        {
          "name": "created_time",
          "type": "time_point_sec"
        }
      ]
    }
  • Table row type of acctlendrec

    {
      "name": "account_lend_record",
      "base": "",
      "fields": [
        {
          "name": "lend_id",
          "type": "uint64"
        },
        {
          "name": "from_order_id",
          "type": "uint64"
        },
        {
          "name": "from",
          "type": "name"
        },
        {
          "name": "to",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "interest",
          "type": "asset"
        },
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "paid_quantity",
          "type": "asset"
        },
        {
          "name": "paid_interest",
          "type": "asset"
        },
        {
          "name": "created_time",
          "type": "time_point_sec"
        },
        {
          "name": "updated_time",
          "type": "time_point_sec"
        },
        {
          "name": "period",
          "type": "int64"
        }
      ]
    }
  • Action parameter in cashin

    {
      "name": "cashin",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "exchange",
          "type": "name"
        },
        {
          "name": "account_id",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "contract",
          "type": "name"
        }
      ]
    }
  • Action parameter in cashout

    {
      "name": "cashout",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "exchange",
          "type": "name"
        },
        {
          "name": "account_id",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "force",
          "type": "bool"
        }
      ]
    }
  • Table row type of exstat

    {
      "name": "ex_stat",
      "base": "",
      "fields": [
        {
          "name": "pkey",
          "type": "uint64"
        },
        {
          "name": "balance",
          "type": "extended_asset"
        }
      ]
    }
  • Table row type of globalconfig

    {
      "name": "global_config",
      "base": "",
      "fields": [
        {
          "name": "whaleextrust",
          "type": "name"
        },
        {
          "name": "takeover_account",
          "type": "name"
        },
        {
          "name": "interestpool",
          "type": "name"
        },
        {
          "name": "whaleexadmin",
          "type": "name"
        },
        {
          "name": "quote_ref_id",
          "type": "uint32"
        },
        {
          "name": "min_cashout_risk_rate",
          "type": "float64"
        },
        {
          "name": "min_lend_risk_rate",
          "type": "float64"
        },
        {
          "name": "max_lend_value",
          "type": "float64"
        },
        {
          "name": "reserved1",
          "type": "uint32"
        },
        {
          "name": "reserved2",
          "type": "name"
        },
        {
          "name": "use_history",
          "type": "bool"
        }
      ]
    }
  • Action parameter in init

    {
      "name": "init",
      "base": "",
      "fields": [
        {
          "name": "whaleextrust",
          "type": "name"
        },
        {
          "name": "takeoveracct",
          "type": "name"
        },
        {
          "name": "interestpool",
          "type": "name"
        },
        {
          "name": "whaleexadmin",
          "type": "name"
        },
        {
          "name": "quote_symbol",
          "type": "symbol"
        },
        {
          "name": "quote_contract",
          "type": "name"
        },
        {
          "name": "min_cashout_risk_rate",
          "type": "float64"
        },
        {
          "name": "min_lend_risk_rate",
          "type": "float64"
        },
        {
          "name": "max_lend_value",
          "type": "float64"
        },
        {
          "name": "use_history",
          "type": "bool"
        }
      ]
    }
  • Action parameter in lend

    {
      "name": "lend",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "exchange",
          "type": "name"
        },
        {
          "name": "from_account_id",
          "type": "name"
        },
        {
          "name": "to_account_id",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "interest",
          "type": "asset"
        },
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "lend_symbol",
          "type": "symbol"
        },
        {
          "name": "from_order_id",
          "type": "uint64"
        },
        {
          "name": "interest_fee_rate",
          "type": "uint16"
        }
      ]
    }
  • Table row type of lendorder

    {
      "name": "lend_order",
      "base": "",
      "fields": [
        {
          "name": "order_id",
          "type": "uint64"
        },
        {
          "name": "interest_fee_rate",
          "type": "uint16"
        },
        {
          "name": "original_amount",
          "type": "int64"
        },
        {
          "name": "total_interest",
          "type": "int64"
        },
        {
          "name": "total_lent",
          "type": "int64"
        }
      ]
    }
  • Action parameter in lendrepay

    {
      "name": "lendrepay",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "exchange",
          "type": "name"
        },
        {
          "name": "from_account_id",
          "type": "name"
        },
        {
          "name": "to_account_id",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "interest",
          "type": "asset"
        },
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "lend_symbol",
          "type": "symbol"
        },
        {
          "name": "from_order_id",
          "type": "uint64"
        },
        {
          "name": "interest_fee_rate",
          "type": "uint16"
        },
        {
          "name": "lend_id",
          "type": "uint64"
        },
        {
          "name": "time",
          "type": "uint32"
        },
        {
          "name": "repay_to_id",
          "type": "name"
        },
        {
          "name": "repay_interest",
          "type": "asset"
        },
        {
          "name": "repay_fee",
          "type": "asset"
        }
      ]
    }
  • Action parameter in modify

    {
      "name": "modify",
      "base": "",
      "fields": [
        {
          "name": "lend_id",
          "type": "uint64"
        },
        {
          "name": "exchange",
          "type": "name"
        }
      ]
    }
  • Action parameter in repay

    {
      "name": "repay",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "lend_id",
          "type": "uint64"
        },
        {
          "name": "time",
          "type": "uint32"
        },
        {
          "name": "exchange",
          "type": "name"
        },
        {
          "name": "from_account_id",
          "type": "name"
        },
        {
          "name": "to_account_id",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "interest",
          "type": "asset"
        },
        {
          "name": "fee",
          "type": "asset"
        },
        {
          "name": "contract",
          "type": "name"
        }
      ]
    }
  • Action parameter in rmhistory

    {
      "name": "rmhistory",
      "base": "",
      "fields": [
        {
          "name": "max_record",
          "type": "uint64"
        },
        {
          "name": "before_created_time",
          "type": "uint32"
        }
      ]
    }
  • Table row type of userasset

    {
      "name": "user_asset",
      "base": "",
      "fields": [
        {
          "name": "exchange_ref_id",
          "type": "uint32"
        },
        {
          "name": "ext_symbol_ref_id",
          "type": "uint32"
        },
        {
          "name": "amount",
          "type": "int64"
        }
      ]
    }