openapi: 3.0.1
info:
  title: Danogo Lending Public
  description: |
    Public API service for Danogo Fixed/Float Lending
  contact:
    name: Danogo Support Team
    email: support@danogo.io
  version: v1.0.0
servers:
  - url: 'https://danogo-lending.preview.tekoapis.net'
    description: Preview
  - url: 'https://danogo-lending.tekoapis.com'
    description: Mainnet
tags:
  - name: Loan
  - name: Utility
paths:
  /api/v1/get-available-loan-offers:
    post:
      tags:
        - Loan
      summary: Get available loan offers
      description: >-
        - Get all available loan offers, filter by loan tokens, collateral
        tokens, loan maturity and pagination with page/pageSize
      operationId: getAvailableLoanOffers
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    loanTokens:
                      type: array
                      description: Filter by list loan tokens
                      items:
                        type: string
                        format: '{policyId}.{assetName}'
                        description: Token id of Loan Token
                        nullable: false
                        example: >-
                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                    collateralTokens:
                      type: array
                      minItems: 1
                      maxItems: 50
                      description: >-
                        List of Collateral Tokens, in format
                        "{policyId}.{assetName}", for filtering Pools
                      items:
                        type: string
                        format: '{policyId}.{assetName}'
                        description: Token id of Collateral Token
                        nullable: false
                        example: >-
                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                    loanMaturity:
                      type: integer
                      format: int64
                      description: >
                        - Loan Maturity in milliseconds, for filtering Pools
                        with maturity greater than this value.

                        - If Null return Loan offer with float rate
                      nullable: true
                      example: 1731715200000
                - type: object
                  properties:
                    page:
                      type: integer
                      default: 1
                      example: 1
                      description: >-
                        Current page, for high performance try to use
                        pagination.offset instead!
                    pageSize:
                      type: integer
                      nullable: false
                      example: 10
                      description: Page size
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      data:
                        type: object
                        required:
                          - pagination
                        properties:
                          loans:
                            type: array
                            minItems: 0
                            maxItems: 50
                            description: List Available Loans
                            items:
                              type: object
                              required:
                                - loanToken
                              properties:
                                loanToken:
                                  type: string
                                  format: '{policyId}.{assetName}'
                                  nullable: false
                                  description: Token id of Loan Token
                                  example: >-
                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                loanOffers:
                                  type: array
                                  description: List loan offers
                                  items:
                                    type: object
                                    description: Loan offer
                                    required:
                                      - poolId
                                      - borrowRate
                                      - minBorrowAmount
                                      - availableLiquidity
                                    properties:
                                      poolId:
                                        type: string
                                        format: '{policyId}.{assetName}'
                                        nullable: false
                                        description: Token id of Pool NFT
                                        example: >-
                                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                      borrowRate:
                                        type: integer
                                        description: Borrow Rate in basis point
                                        nullable: false
                                        example: 5000
                                      loanDuration:
                                        type: integer
                                        description: >-
                                          Loan duration in days, for loan offer
                                          with fixed rate
                                        nullable: true
                                        example: 7
                                      minBorrowAmount:
                                        type: string
                                        format: bigint
                                        nullable: true
                                        description: >-
                                          The minimum borrow amount when create
                                          loan
                                        example: '2000000'
                                      availableLiquidity:
                                        type: string
                                        format: bigint
                                        nullable: false
                                        description: >-
                                          Amount of token available in liquidity
                                          of Pool
                                        example: '1234567'
                                      collaterals:
                                        type: array
                                        minItems: 1
                                        maxItems: 50
                                        items:
                                          type: object
                                          description: >-
                                            Collateral token and its liquidation
                                            threshold
                                          required:
                                            - collateralToken
                                            - liquidationThreshold
                                          properties:
                                            collateralToken:
                                              type: string
                                              format: '{policyId}.{assetName}'
                                              nullable: false
                                              description: Token id of the Collateral token
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                            liquidationThreshold:
                                              type: integer
                                              nullable: false
                                              description: >-
                                                Liquidation threshold of collateral
                                                token in basis points
                                              example: 8100
                          pagination:
                            type: object
                            properties:
                              page:
                                type: integer
                                format: int32
                                description: 'Current page, start from 1'
                                nullable: false
                                example: 1
                              pageSize:
                                type: integer
                                format: int32
                                description: Page size
                                nullable: false
                                example: 10
                              total:
                                type: integer
                                format: int32
                                description: Total items
                                nullable: false
                                example: 1
                            required:
                              - page
                              - pageSize
                              - total
        default:
          description: An unexpected error response
          content:
            application/json:
              schema:
                title: runtimeError
                x-stoplight:
                  id: f63af62084983
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      error:
                        type: string
                        deprecated: true
                        description: >-
                          do NOT use this field anymore! Use code & message
                          instead!
                      details:
                        type: array
                        items:
                          title: protobufAny
                          type: object
                          properties:
                            typeUrl:
                              type: string
                              description: >-
                                A URL/resource name that uniquely identifies the
                                type of the serialized

                                protocol buffer message. This string must
                                contain at least

                                one "/" character. The last segment of the URL's
                                path must represent

                                the fully qualified name of the type (as in

                                `path/google.protobuf.Duration`). The name
                                should be in a canonical form

                                (e.g., leading "." is not accepted).


                                In practice, teams usually precompile into the
                                binary all types that they

                                expect it to use in the context of Any. However,
                                for URLs which use the

                                scheme `http`, `https`, or no scheme, one can
                                optionally set up a type

                                server that maps type URLs to message
                                definitions as follows:


                                * If no scheme is provided, `https` is assumed.

                                * An HTTP GET on the URL must yield a
                                [google.protobuf.Type][]
                                  value in binary format, or produce an error.
                                * Applications are allowed to cache lookup
                                results based on the
                                  URL, or have them precompiled into a binary to avoid any
                                  lookup. Therefore, binary compatibility needs to be preserved
                                  on changes to types. (Use versioned type names to manage
                                  breaking changes.)

                                Note: this functionality is not currently
                                available in the official

                                protobuf release, and it is not used for type
                                URLs beginning with

                                type.googleapis.com.


                                Schemes other than `http`, `https` (or the empty
                                scheme) might be

                                used with implementation specific semantics.
                            value:
                              pattern: >-
                                ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
                              type: string
                              description: >-
                                Must be a valid serialized protocol buffer of
                                the above specified type.
                              format: byte
                          description: >-
                            `Any` contains an arbitrary serialized protocol
                            buffer message along with a

                            URL that describes the type of the serialized
                            message.


                            Protobuf library provides support to pack/unpack Any
                            values in the form

                            of utility functions or additional generated methods
                            of the Any type.


                            Example 1: Pack and unpack a message in C++.

                                Foo foo = ...;
                                Any any;
                                any.PackFrom(foo);
                                ...
                                if (any.UnpackTo(&foo)) {
                                  ...
                                }

                            Example 2: Pack and unpack a message in Java.

                                Foo foo = ...;
                                Any any = Any.pack(foo);
                                ...
                                if (any.is(Foo.class)) {
                                  foo = any.unpack(Foo.class);
                                }

                              Example 3: Pack and unpack a message in Python.

                                foo = Foo(...)
                                any = Any()
                                any.Pack(foo)
                                ...
                                if any.Is(Foo.DESCRIPTOR):
                                  any.Unpack(foo)
                                  ...

                              Example 4: Pack and unpack a message in Go

                                  foo := &pb.Foo{...}
                                  any, err := ptypes.MarshalAny(foo)
                                  ...
                                  foo := &pb.Foo{}
                                  if err := ptypes.UnmarshalAny(any, foo); err != nil {
                                    ...
                                  }

                            The pack methods provided by protobuf library will
                            by default use

                            'type.googleapis.com/full.type.name' as the type URL
                            and the unpack

                            methods only use the fully qualified type name after
                            the last '/'

                            in the type URL, for example "foo.bar.com/x/y.z"
                            will yield type

                            name "y.z".



                            JSON

                            ====

                            The JSON representation of an `Any` value uses the
                            regular

                            representation of the deserialized, embedded
                            message, with an

                            additional field `@type` which contains the type
                            URL. Example:

                                package google.profile;
                                message Person {
                                  string first_name = 1;
                                  string last_name = 2;
                                }

                                {
                                  "@type": "type.googleapis.com/google.profile.Person",
                                  "firstName": <string>,
                                  "lastName": <string>
                                }

                            If the embedded message type is well-known and has a
                            custom JSON

                            representation, that representation will be embedded
                            adding a field

                            `value` which holds the custom JSON in addition to
                            the `@type`

                            field. Example (for message
                            [google.protobuf.Duration][]):

                                {
                                  "@type": "type.googleapis.com/google.protobuf.Duration",
                                  "value": "1.212s"
                                }
  /api/v1/get-create-fixed-loan-params:
    post:
      tags:
        - Loan
      summary: Get Params for Create Fixed Rate Loan transaction
      description: >-
        - Get parameters for Create Fixed Rate Loan Transaction

        - Documentation:
        https://docs.danogo.io/developers/integration/how-to-build-transaction-to-create-a-fixed-rate-loan
      operationId: getCreateFixedLoanParams
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - poolId
                - borrowAmount
                - loanDuration
                - collateralTokens
              properties:
                poolId:
                  type: string
                  format: '{policyId}.{assetName}'
                  nullable: false
                  description: Token id of the Pool NFT from which the Loan will borrow
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                borrowAmount:
                  type: string
                  format: bigint
                  nullable: false
                  description: 'Amount of token to borrow, in base unit'
                  example: '10000000000'
                loanDuration:
                  type: integer
                  nullable: false
                  description: Loan duration in days
                  example: 7
                collaterals:
                  type: array
                  minItems: 1
                  maxItems: 50
                  description: List of collaterals
                  items:
                    type: object
                    required:
                      - collateralToken
                      - collateralAmount
                    properties:
                      collateralToken:
                        type: string
                        format: '{policyId}.{assetName}'
                        nullable: false
                        description: Token id of Collateral token
                        example: >-
                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                      collateralAmount:
                        type: string
                        format: bigint
                        nullable: false
                        description: Amount of Collateral token
                        example: '1231354'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      data:
                        type: object
                        required:
                          - inputs
                          - outputs
                          - withdrawals
                          - mint
                          - referenceInputs
                        properties:
                          inputs:
                            type: object
                            description: >-
                              Inputs info for building transaction, required
                              either liqwidInUtxo or floatPoolInUtxo
                            required:
                              - poolInUtxo
                              - floatPoolInUtxo
                            properties:
                              poolInUtxo:
                                allOf:
                                  - title: UTxO model
                                    type: object
                                    description: UTxO detail for building Transaction
                                    allOf:
                                      - title: UTxO model
                                        type: object
                                        description: UTxO detail for building Transaction
                                        required:
                                          - address
                                          - coin
                                        properties:
                                          address:
                                            type: string
                                            format: bech32
                                            description: address of UTxO
                                            nullable: false
                                            example: >-
                                              addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                          coin:
                                            type: string
                                            format: bigint (lovelace)
                                            description: number ADA of utxo
                                            nullable: false
                                            example: '2000000'
                                          multiAssets:
                                            type: array
                                            minItems: 0
                                            maxItems: 100
                                            items:
                                              type: object
                                              required:
                                                - policyId
                                                - assets
                                              properties:
                                                policyId:
                                                  type: string
                                                  description: Policy Id of token
                                                  nullable: false
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                                assets:
                                                  type: array
                                                  minItems: 1
                                                  maxItems: 100
                                                  items:
                                                    type: object
                                                    required:
                                                      - name
                                                      - value
                                                    properties:
                                                      name:
                                                        type: string
                                                        description: Asset Name of token
                                                        nullable: false
                                                        example: 4d494e
                                                      value:
                                                        type: string
                                                        format: bigint
                                                        description: Token amount
                                                        nullable: false
                                                        example: '123123123'
                                      - type: object
                                        properties:
                                          outRef:
                                            type: string
                                            format: '{transactionHash}#{index}'
                                            description: Output Reference of UTxO
                                            nullable: false
                                            example: >-
                                              884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                  - description: |-
                                      - UTxO of Fixed Pool, used for input
                                      - Spending redeemer struct:
                                        - Redeemer Indexer: Index for Create loan
                                          - Pool Out Index: Int - Index of Pool UTxO in outputs
                                          - Loan Out Index: Int - Index of Loan UTxO in outputs
                                        - Pool In Index: Int - Index of Pool UTxO in inputs
                                        - Loan In Index: Int - Index of Loan UTxO in inputs (Null when Create new loan)
                                        - Protocol Script Index: Int - Index of Protocol Script UTxO in reference inputs
                                        - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                        - Fee Out Index: Int - Index of Fee UTxO in outputs (Null when Fee = 0)
                              floatPoolInUtxo:
                                allOf:
                                  - title: UTxO model
                                    type: object
                                    description: UTxO detail for building Transaction
                                    allOf:
                                      - title: UTxO model
                                        type: object
                                        description: UTxO detail for building Transaction
                                        required:
                                          - address
                                          - coin
                                        properties:
                                          address:
                                            type: string
                                            format: bech32
                                            description: address of UTxO
                                            nullable: false
                                            example: >-
                                              addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                          coin:
                                            type: string
                                            format: bigint (lovelace)
                                            description: number ADA of utxo
                                            nullable: false
                                            example: '2000000'
                                          multiAssets:
                                            type: array
                                            minItems: 0
                                            maxItems: 100
                                            items:
                                              type: object
                                              required:
                                                - policyId
                                                - assets
                                              properties:
                                                policyId:
                                                  type: string
                                                  description: Policy Id of token
                                                  nullable: false
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                                assets:
                                                  type: array
                                                  minItems: 1
                                                  maxItems: 100
                                                  items:
                                                    type: object
                                                    required:
                                                      - name
                                                      - value
                                                    properties:
                                                      name:
                                                        type: string
                                                        description: Asset Name of token
                                                        nullable: false
                                                        example: 4d494e
                                                      value:
                                                        type: string
                                                        format: bigint
                                                        description: Token amount
                                                        nullable: false
                                                        example: '123123123'
                                      - type: object
                                        properties:
                                          outRef:
                                            type: string
                                            format: '{transactionHash}#{index}'
                                            description: Output Reference of UTxO
                                            nullable: false
                                            example: >-
                                              884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                  - description: |-
                                      - UTxO of Float Pool, used for input
                                      - Spending redeemer struct:
                                        - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                        - Pool Market Ref Indexers: List\<PoolMarketIndexer\>
                                          - Pool Out Index: Int - Index of Pool UTxO in outputs
                                          - Fee Out Index: Option\<Int\> - Index of Fee UTxO in outputs (Null when Fee = 0)
                                          - Market Ref Index: Int - Index of Market Ref UTxO in reference inputs
                              stakingContractInUtxo:
                                allOf:
                                  - title: UTxO model
                                    type: object
                                    description: UTxO detail for building Transaction
                                    allOf:
                                      - title: UTxO model
                                        type: object
                                        description: UTxO detail for building Transaction
                                        required:
                                          - address
                                          - coin
                                        properties:
                                          address:
                                            type: string
                                            format: bech32
                                            description: address of UTxO
                                            nullable: false
                                            example: >-
                                              addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                          coin:
                                            type: string
                                            format: bigint (lovelace)
                                            description: number ADA of utxo
                                            nullable: false
                                            example: '2000000'
                                          multiAssets:
                                            type: array
                                            minItems: 0
                                            maxItems: 100
                                            items:
                                              type: object
                                              required:
                                                - policyId
                                                - assets
                                              properties:
                                                policyId:
                                                  type: string
                                                  description: Policy Id of token
                                                  nullable: false
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                                assets:
                                                  type: array
                                                  minItems: 1
                                                  maxItems: 100
                                                  items:
                                                    type: object
                                                    required:
                                                      - name
                                                      - value
                                                    properties:
                                                      name:
                                                        type: string
                                                        description: Asset Name of token
                                                        nullable: false
                                                        example: 4d494e
                                                      value:
                                                        type: string
                                                        format: bigint
                                                        description: Token amount
                                                        nullable: false
                                                        example: '123123123'
                                      - type: object
                                        properties:
                                          outRef:
                                            type: string
                                            format: '{transactionHash}#{index}'
                                            description: Output Reference of UTxO
                                            nullable: false
                                            example: >-
                                              884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                  - description: >-
                                      - UTxO of Staking Contract Pool, used for
                                      input

                                      - Spending redeemer struct:
                                        - Pool Out Index: Int - Index of Pool UTxO in outputs
                          outputs:
                            type: object
                            description: Outputs info for building transaction
                            required:
                              - poolOutUtxo
                              - loanOutUtxo
                            properties:
                              poolOutUtxo:
                                description: UTxO of Fixed Pool
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - supplyToken
                                          - supplyYieldToken
                                          - circulatingPTSupply
                                          - circulatingYTSupply
                                          - supplyMaturity
                                          - collaterals
                                          - baseInterestRate
                                          - gradient
                                          - maxLoanDuration
                                          - activeLoanCount
                                          - feeCollected
                                          - minBorrowAmount
                                        properties:
                                          supplyToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: false
                                            description: Token id of supply token of Pool
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          supplyYieldToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: true
                                            description: >-
                                              Token id of substitute token of supply
                                              token
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          circulatingPTSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Amount of Pool PT in circulating
                                            example: '1000000000'
                                          circulatingYTSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Amount of Pool YT in circulating
                                            example: '1000000000'
                                          supplyMaturity:
                                            type: integer
                                            nullable: false
                                            description: Maturity timestamp of Pool
                                            example: 1234567890
                                          collaterals:
                                            type: array
                                            minItems: 1
                                            maxItems: 50
                                            items:
                                              type: object
                                              description: >-
                                                Collateral token with its price and
                                                liquidation threshold
                                              required:
                                                - collateralToken
                                                - liquidationThreshold
                                              properties:
                                                collateralToken:
                                                  type: string
                                                  format: '{policyId}.{assetName}'
                                                  nullable: false
                                                  description: Token id of the Collateral token
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                                liquidationThreshold:
                                                  type: integer
                                                  nullable: false
                                                  description: >-
                                                    Liquidation threshold of collateral
                                                    token in basis points
                                                  example: 8100
                                          baseInterestRate:
                                            type: integer
                                            nullable: false
                                            description: Base Interest Rate in basis points
                                            example: 2000
                                          gradient:
                                            type: integer
                                            nullable: false
                                            description: Gradient in basis points
                                            example: 1100
                                          maxLoanDuration:
                                            type: integer
                                            nullable: false
                                            description: Max loan duration in milliseconds
                                            example: 15552000000
                                          activeLoanCount:
                                            type: integer
                                            nullable: false
                                            description: Number of Active Loan borrowed from Pool
                                            example: 1
                                          feeCollected:
                                            type: boolean
                                            nullable: false
                                            description: >-
                                              True if the fee has been collected from
                                              the pool, false otherwise
                                            example: true
                                          minBorrowAmount:
                                            type: string
                                            format: bigint
                                            nullable: true
                                            description: >-
                                              The minimum borrow amount when create
                                              loan
                                            example: '2000000'
                              loanOutUtxo:
                                description: >-
                                  UTxO of Fixed Loan, borrower must add
                                  collateral to multiAssets
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - loanProfitFee
                                          - loanAmount
                                          - loanOwnerNftName
                                        properties:
                                          loanProfitFee:
                                            type: string
                                            format: bigint
                                            nullable: true
                                            description: >-
                                              Loan profit fee in datum of Loan UTxO,
                                              set when building the Tx
                                            example: '90000000'
                                          loanAmount:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Debt amount of token in Loan UTxO
                                            example: '1000000000'
                                          loanMaturity:
                                            type: number
                                            format: int64
                                            nullable: true
                                            description: >-
                                              Maturity timestamp of Loan in
                                              milliseconds, set to loan maturity when
                                              building the Tx
                                            example: 1234567890
                                          loanOwnerNftName:
                                            type: string
                                            format: '{assetName}'
                                            nullable: false
                                            description: Token id asset name of Loan Owner NFT
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                              feeOutUtxo:
                                description: Output UTxO detail for building Transaction
                                type: object
                                required:
                                  - coin
                                properties:
                                  address:
                                    type: string
                                    format: bech32
                                    description: >-
                                      address of UTxO, set to null when it
                                      should be constructed using borrower
                                      information
                                    nullable: true
                                    example: >-
                                      addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                  coin:
                                    type: string
                                    format: bigint (lovelace)
                                    description: number ADA of utxo
                                    nullable: false
                                    example: '2000000'
                                  multiAssets:
                                    type: array
                                    minItems: 0
                                    maxItems: 100
                                    items:
                                      type: object
                                      required:
                                        - policyId
                                        - assets
                                      properties:
                                        policyId:
                                          type: string
                                          description: Policy Id of token
                                          nullable: false
                                          example: >-
                                            29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                        assets:
                                          type: array
                                          minItems: 1
                                          maxItems: 100
                                          items:
                                            type: object
                                            required:
                                              - name
                                              - value
                                            properties:
                                              name:
                                                type: string
                                                description: Asset Name of token
                                                nullable: false
                                                example: 4d494e
                                              value:
                                                type: string
                                                format: bigint
                                                description: Token amount
                                                nullable: false
                                                example: '123123123'
                              floatPoolOutUtxo:
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - totalSupply
                                          - circulatingDToken
                                          - totalBorrow
                                          - borrowApy
                                          - undistributedFee
                                          - interestIndex
                                          - interestTime
                                          - alternativeSupplyTokens
                                        properties:
                                          totalSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: 'Total supply in pool, in base unit'
                                            example: '100009399400'
                                          circulatingDToken:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              Total dToken minted - total dToken
                                              burned
                                            example: '134344444554'
                                          totalBorrow:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: 'Total borrow in pool, in base unit'
                                            example: '100009399400'
                                          borrowRate:
                                            type: integer
                                            nullable: false
                                            description: Borrow rate in basis point
                                            example: 5000
                                          undistributedFee:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              Protocol fee not distributed for
                                              supplier, in base unit
                                            example: '100009399400'
                                          interestIndex:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Interest index
                                            example: '12000000000'
                                          interestTime:
                                            type: number
                                            format: int64
                                            nullable: false
                                            description: >-
                                              updated market state timestamp in
                                              millisecond
                                            example: 1745028479000
                                          alternativeSupplyTokens:
                                            type: array
                                            description: >-
                                              List of alternative supply tokens in
                                              pools
                                            items:
                                              type: object
                                              required:
                                                - token
                                                - latestExchangeRateNum
                                                - latestExchangeRateDen
                                              properties:
                                                token:
                                                  type: string
                                                  format: '{policyId}.{assetName}'
                                                  nullable: false
                                                  description: Token id of alternative token
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                                latestExchangeRateNum:
                                                  type: string
                                                  format: bigint
                                                  nullable: false
                                                  description: >-
                                                    Numerator of exchange alternative token
                                                    rate has been captured at the last
                                                    interest time
                                                  example: '13000000000'
                                                latestExchangeRateDen:
                                                  type: string
                                                  format: bigint
                                                  nullable: false
                                                  description: >-
                                                    Denominator of exchange qToken rate has
                                                    been captured at the last interest time
                                                  example: '12000000000'
                              stakingContractOutUtxo:
                                type: object
                                description: UTxO of Staking Contract contains ADA of users
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - totalSupply
                                          - circulatingSToken
                                          - validUntil
                                        properties:
                                          totalSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: total supply of staking contract
                                            example: '20239625330'
                                          circulatingSToken:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              circulating sToken for this staking
                                              contract
                                            example: '20145500576'
                                          validUntil:
                                            type: integer
                                            format: int64
                                            nullable: false
                                            description: >-
                                              The maximum time until which the
                                              exchange rate between sADA and ADA is
                                              accepted, determinedby the end time of
                                              the epoch containing the transaction
                                              start time in milliseconds
                                            example: '1749513600000'
                              withdrawalFeeOutUtxo:
                                description: Output UTxO detail for building Transaction
                                type: object
                                required:
                                  - coin
                                properties:
                                  address:
                                    type: string
                                    format: bech32
                                    description: >-
                                      address of UTxO, set to null when it
                                      should be constructed using borrower
                                      information
                                    nullable: true
                                    example: >-
                                      addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                  coin:
                                    type: string
                                    format: bigint (lovelace)
                                    description: number ADA of utxo
                                    nullable: false
                                    example: '2000000'
                                  multiAssets:
                                    type: array
                                    minItems: 0
                                    maxItems: 100
                                    items:
                                      type: object
                                      required:
                                        - policyId
                                        - assets
                                      properties:
                                        policyId:
                                          type: string
                                          description: Policy Id of token
                                          nullable: false
                                          example: >-
                                            29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                        assets:
                                          type: array
                                          minItems: 1
                                          maxItems: 100
                                          items:
                                            type: object
                                            required:
                                              - name
                                              - value
                                            properties:
                                              name:
                                                type: string
                                                description: Asset Name of token
                                                nullable: false
                                                example: 4d494e
                                              value:
                                                type: string
                                                format: bigint
                                                description: Token amount
                                                nullable: false
                                                example: '123123123'
                          withdrawals:
                            type: array
                            minItems: 1
                            maxItems: 2
                            description: >-
                              Withdrawals info for building transaction, include
                              Reward Address Script Hash, coin and withdrawal
                              redeemer
                            items:
                              type: object
                              required:
                                - rewardAddressScriptHash
                                - coin
                              properties:
                                rewardAddressScriptHash:
                                  type: string
                                  format: bech32
                                  description: >-
                                    Script Hash of reward address, used for
                                    withdrawal
                                  nullable: false
                                  example: >-
                                    f0e22afe38c8a48cd86f871cd0fd27cbb8deca4da76d8c06cb8f3c41bf
                                coin:
                                  type: string
                                  format: bigint (lovelace)
                                  description: Number of ADA to withdrawal
                                  nullable: false
                                  example: '2000000'
                                withdrawalRedeemer:
                                  type: object
                                  description: |-
                                    - Withdrawal Redeemer Struct:
                                      - Global Config Index: Int - Index of Global Config UTxO in reference inputs
                                      - Oracle Path Indexes: ByteArray(List\<Int\>) - List Index of Oracle Path UTxO in reference inputs, convert to ByteArray
                                      - Oracle Price Indexes: ByteArray(List\<OraclePriceIndex\>) - List Index of Oracle Price UTxO in reference inputs or outputs, group by Oracle Source Type and convert to ByteArray
                                        - OraclePriceIndex: <UtxoTarget, OracleType, Index> - Index of Oracle Price UTxO
                                          - UtxoTarget: Enum - UTxO in reference inputs or outputs, include:
                                            - REF
                                            - OUT
                                            - IN
                                          - OracleType: Enum - Type of Oracle Price UTxO, include:
                                            - ORCFAX_FSP
                                            - ORCFAX_FS
                                            - LIQWID_MARKET_STATE
                                            - LIQWID_MARKET_PARAM
                                            - LIQWID_ORACLE_V1
                                            - LIQWID_ORACLE_V2
                                            - DANOGO_FLOAT_POOL
                                            - INDIGO
                                            - DJED
                                            - DANOGO_STAKING
                                            - MINSWAP_LP
                                            - SPLASH_LP_CFMM_G1
                                            - SPLASH_LP_CFMM_G2
                                            - SPLASH_LP_CFMM_G3
                                            - SPLASH_LP_STABLE
                                          - Index: Int - Index of Oracle Price UTxO in reference inputs or outputs
                                      - Prices: List\<OraclePrice\> - List of prices of collateralToken/borrowToken
                                        - OraclePrice: List\<(CalcType, prices)\> - Prices of each collateral token
                                          - CalcType: Int - 0: Normal, 1: Splash
                                      - Borrow Rates: List\<BorrowRate\> - List of borrow rates from Yield Protocols associated with Danogo Lending (e.g., Liqwid)
                                  required:
                                    - prices
                                  properties:
                                    prices:
                                      type: array
                                      minItems: 1
                                      maxItems: 50
                                      description: List of prices of token pairs (A/B)
                                      items:
                                        type: object
                                        required:
                                          - borrowToken
                                          - oraclePrices
                                        properties:
                                          borrowToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: false
                                            description: Token id of Borrow token
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          oraclePrices:
                                            type: array
                                            minItems: 1
                                            maxItems: 50
                                            description: Prices of each collateral token
                                            items:
                                              type: object
                                              required:
                                                - collateralToken
                                                - priceNum
                                                - priceDen
                                              properties:
                                                collateralToken:
                                                  type: string
                                                  format: '{policyId}.{assetName}'
                                                  nullable: false
                                                  description: Token id of Collateral token
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                                priceNum:
                                                  type: string
                                                  format: bigint
                                                  nullable: true
                                                  description: >-
                                                    Numerator of Collateral token price in
                                                    Supply token
                                                  example: '1231354'
                                                priceDen:
                                                  type: string
                                                  format: bigint
                                                  nullable: true
                                                  description: >-
                                                    Denominator of Collateral token price in
                                                    Supply token
                                                  example: '1000000'
                                    borrowRates:
                                      type: array
                                      minItems: 1
                                      maxItems: 50
                                      description: >-
                                        List of borrow rates from Yield
                                        Protocols associated with Danogo Lending
                                        (e.g., Liqwid)
                                      items:
                                        type: object
                                        properties:
                                          yieldToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: false
                                            description: Token id of Yield token
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          borrowRate:
                                            type: integer
                                            nullable: false
                                            description: borrow rate in basis points
                                            example: '5000'
                          mint:
                            type: object
                            description: >-
                              - Mint info for building transaction with
                              multiAssets
                                - MultiAssets: List token to mint/burn when create loan, include:
                                  - Loan Owner NFT: Owner NFT token send to borrower
                                  - Loan Validity Token: Token used for loan validity, include in Loan UTxO
                                  - Liqwid qToken: The qToken is burned when withdrawing from the Liqwid Pool UTxO
                                - Minting redeemer struct (Fixed):
                                  - Reddemer Indexer: Index for Create loan
                                    - Pool Out Index: Int - Index of Pool UTxO in outputs
                                    - Loan Out Index: Int - Index of Loan UTxO in outputs
                                  - Pool In Index: Int - Index of Pool UTxO in inputs
                                  - Loan In Index: Int - Index of Loan UTxO in inputs (Null when Create new loan)
                                  - Protocol Script Index: Int - Index of Protocol Script UTxO in reference inputs
                                  - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                  - Fee Out Index: Int - Index of Fee UTxO in outputs (Null when Fee = 0)
                                - Minting redeemer struct (Float):
                                  - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                  - Pool Market Ref Indexers: List\<PoolMarketIndexer\>
                                    - Pool Out Index: Int - Index of Pool UTxO in outputs
                                    - Fee Out Index: Option\<Int\> - Index of Fee UTxO in outputs (Null when Fee = 0)
                                    - Market Ref Index: Int - Index of Market Ref UTxO in reference inputs
                                - Minting redeemer struct (Staking Contract):
                                  - Pool Out Index: Int - Index of Pool UTxO in outputs
                            required:
                              - multiAssets
                            properties:
                              multiAssets:
                                type: array
                                minItems: 0
                                maxItems: 100
                                items:
                                  type: object
                                  required:
                                    - policyId
                                    - assets
                                    - redeemerType
                                  properties:
                                    policyId:
                                      type: string
                                      description: Policy Id of token
                                      nullable: false
                                      example: >-
                                        29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                    assets:
                                      type: array
                                      minItems: 1
                                      maxItems: 100
                                      items:
                                        type: object
                                        required:
                                          - name
                                          - value
                                        properties:
                                          name:
                                            type: string
                                            description: Asset Name of token
                                            nullable: false
                                            example: 4d494e
                                          value:
                                            type: string
                                            format: bigint
                                            description: Token amount
                                            nullable: false
                                            example: '123123123'
                                    redeemerType:
                                      type: string
                                      enum:
                                        - FIXED
                                        - FLOAT
                                        - FLOAT
                                        - STAKING
                                      description: >-
                                        Redeemer type, used when building the
                                        transaction; each type requires a
                                        different redeemer structure
                                      example: FIXED
                          referenceInputs:
                            type: array
                            minItems: 1
                            maxItems: 50
                            description: >-
                              List of UTxO output reference required to be
                              included in transaction as reference inputs
                            items:
                              type: object
                              required:
                                - outRef
                                - type
                              properties:
                                outRef:
                                  type: string
                                  format: '{transactionHash}#{index}'
                                  nullable: false
                                  description: Output Reference of UTxO
                                  example: >-
                                    884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                type:
                                  type: string
                                  enum:
                                    - POOL_SCRIPT
                                    - LOAN_SCRIPT
                                    - ORACLE_PRICE_SCRIPT
                                    - GLOBAL_CONFIG
                                    - ORACLE_PATH
                                    - ORACLE_PRICE
                                    - PROTOCOL_SCRIPT
                                    - PROTOCOL_CONFIG
                                    - LIQWID_MARKET_STATE
                                    - LIQWID_MARKET_PARAM
                                    - ORCFAX_FSP
                                    - ORCFAX_FS
                                    - LIQWID_ORACLE
                                    - DANOGO_FLOAT_POOL
                                    - INDIGO
                                    - DJED
                                    - DANOGO_STAKING
                                    - MINSWAP_LP
                                    - STAKING_CONTRACT_SCRIPT
                                    - FLOAT_PROTOCOL_CONFIG
                                    - FLOAT_POOL_SCRIPT
                                    - FLOAT_POOL_CONFIG
                                    - FLOAT_LOAN_SCRIPT
                                  description: >-
                                    Type of UTxO OutRef, used for reference
                                    inputs and indexer in redeemer
                                  example: POOL_SCRIPT
                          auxiliaryData:
                            description: >-
                              Auxiliary data associated with the loan, follows
                              CIP-25
                            type: object
                            properties:
                              loanOwnerNftMetadata:
                                allOf:
                                  - type: object
                                    description: >-
                                      Metadata associated with the loan owner's
                                      NFT, follows CIP-25
                                  - title: tokenMetadata
                                    type: object
                                    description: CIP-25 token metadata
                                    required:
                                      - name
                                      - image
                                    properties:
                                      name:
                                        type: string
                                        description: Display name of token
                                        nullable: false
                                        example: pDJED
                                      image:
                                        type: string
                                        description: Image URL of token on ipfs
                                        nullable: false
                                        example: >-
                                          ipfs://bafybeidx7wy2bclp6bhbvbmtuwmhx4jvrvt6lrbntinjyxlte47kwh63
                                      description:
                                        type: string
                                        description: Description of token
                                        nullable: true
                                        example: >-
                                          qADA is an interest bearing token minted
                                          upon deposit into the Liqwid ADA market
                                          and burned when redeemed.
        default:
          description: An unexpected error response
          content:
            application/json:
              schema:
                title: runtimeError
                x-stoplight:
                  id: f63af62084983
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      error:
                        type: string
                        deprecated: true
                        description: >-
                          do NOT use this field anymore! Use code & message
                          instead!
                      details:
                        type: array
                        items:
                          title: protobufAny
                          type: object
                          properties:
                            typeUrl:
                              type: string
                              description: >-
                                A URL/resource name that uniquely identifies the
                                type of the serialized

                                protocol buffer message. This string must
                                contain at least

                                one "/" character. The last segment of the URL's
                                path must represent

                                the fully qualified name of the type (as in

                                `path/google.protobuf.Duration`). The name
                                should be in a canonical form

                                (e.g., leading "." is not accepted).


                                In practice, teams usually precompile into the
                                binary all types that they

                                expect it to use in the context of Any. However,
                                for URLs which use the

                                scheme `http`, `https`, or no scheme, one can
                                optionally set up a type

                                server that maps type URLs to message
                                definitions as follows:


                                * If no scheme is provided, `https` is assumed.

                                * An HTTP GET on the URL must yield a
                                [google.protobuf.Type][]
                                  value in binary format, or produce an error.
                                * Applications are allowed to cache lookup
                                results based on the
                                  URL, or have them precompiled into a binary to avoid any
                                  lookup. Therefore, binary compatibility needs to be preserved
                                  on changes to types. (Use versioned type names to manage
                                  breaking changes.)

                                Note: this functionality is not currently
                                available in the official

                                protobuf release, and it is not used for type
                                URLs beginning with

                                type.googleapis.com.


                                Schemes other than `http`, `https` (or the empty
                                scheme) might be

                                used with implementation specific semantics.
                            value:
                              pattern: >-
                                ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
                              type: string
                              description: >-
                                Must be a valid serialized protocol buffer of
                                the above specified type.
                              format: byte
                          description: >-
                            `Any` contains an arbitrary serialized protocol
                            buffer message along with a

                            URL that describes the type of the serialized
                            message.


                            Protobuf library provides support to pack/unpack Any
                            values in the form

                            of utility functions or additional generated methods
                            of the Any type.


                            Example 1: Pack and unpack a message in C++.

                                Foo foo = ...;
                                Any any;
                                any.PackFrom(foo);
                                ...
                                if (any.UnpackTo(&foo)) {
                                  ...
                                }

                            Example 2: Pack and unpack a message in Java.

                                Foo foo = ...;
                                Any any = Any.pack(foo);
                                ...
                                if (any.is(Foo.class)) {
                                  foo = any.unpack(Foo.class);
                                }

                              Example 3: Pack and unpack a message in Python.

                                foo = Foo(...)
                                any = Any()
                                any.Pack(foo)
                                ...
                                if any.Is(Foo.DESCRIPTOR):
                                  any.Unpack(foo)
                                  ...

                              Example 4: Pack and unpack a message in Go

                                  foo := &pb.Foo{...}
                                  any, err := ptypes.MarshalAny(foo)
                                  ...
                                  foo := &pb.Foo{}
                                  if err := ptypes.UnmarshalAny(any, foo); err != nil {
                                    ...
                                  }

                            The pack methods provided by protobuf library will
                            by default use

                            'type.googleapis.com/full.type.name' as the type URL
                            and the unpack

                            methods only use the fully qualified type name after
                            the last '/'

                            in the type URL, for example "foo.bar.com/x/y.z"
                            will yield type

                            name "y.z".



                            JSON

                            ====

                            The JSON representation of an `Any` value uses the
                            regular

                            representation of the deserialized, embedded
                            message, with an

                            additional field `@type` which contains the type
                            URL. Example:

                                package google.profile;
                                message Person {
                                  string first_name = 1;
                                  string last_name = 2;
                                }

                                {
                                  "@type": "type.googleapis.com/google.profile.Person",
                                  "firstName": <string>,
                                  "lastName": <string>
                                }

                            If the embedded message type is well-known and has a
                            custom JSON

                            representation, that representation will be embedded
                            adding a field

                            `value` which holds the custom JSON in addition to
                            the `@type`

                            field. Example (for message
                            [google.protobuf.Duration][]):

                                {
                                  "@type": "type.googleapis.com/google.protobuf.Duration",
                                  "value": "1.212s"
                                }
  /api/v1/get-create-float-loan-params:
    post:
      tags:
        - Loan
      summary: Get Params for Create Float Rate Loan transaction
      description: Get parameters for Create Float Rate Loan Transaction
      operationId: getCreateFloatLoanParams
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - borrowToken
                - borrowAmount
                - collateralTokens
              properties:
                borrowToken:
                  type: string
                  format: '{policyId}.{assetName}'
                  nullable: false
                  description: >-
                    Token id, concat of asset policyId with asset name (Case
                    ADA, id = "")
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                borrowAmount:
                  type: string
                  format: bigint
                  nullable: false
                  description: 'Amount of token to borrow, in base unit'
                  example: '10000000000'
                collaterals:
                  type: array
                  minItems: 1
                  maxItems: 50
                  description: List of collaterals
                  items:
                    type: object
                    required:
                      - collateralToken
                      - collateralAmount
                    properties:
                      collateralToken:
                        type: string
                        format: '{policyId}.{assetName}'
                        nullable: false
                        description: Token id of Collateral token
                        example: >-
                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                      collateralAmount:
                        type: string
                        format: bigint
                        nullable: false
                        description: Amount of Collateral token
                        example: '1231354'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      data:
                        type: object
                        required:
                          - inputs
                          - outputs
                          - withdrawals
                          - mint
                          - referenceInputs
                        properties:
                          inputs:
                            type: object
                            description: Inputs info for building transaction
                            required:
                              - poolInUtxo
                            properties:
                              stakingContractInUtxo:
                                allOf:
                                  - title: UTxO model
                                    type: object
                                    description: UTxO detail for building Transaction
                                    allOf:
                                      - title: UTxO model
                                        type: object
                                        description: UTxO detail for building Transaction
                                        required:
                                          - address
                                          - coin
                                        properties:
                                          address:
                                            type: string
                                            format: bech32
                                            description: address of UTxO
                                            nullable: false
                                            example: >-
                                              addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                          coin:
                                            type: string
                                            format: bigint (lovelace)
                                            description: number ADA of utxo
                                            nullable: false
                                            example: '2000000'
                                          multiAssets:
                                            type: array
                                            minItems: 0
                                            maxItems: 100
                                            items:
                                              type: object
                                              required:
                                                - policyId
                                                - assets
                                              properties:
                                                policyId:
                                                  type: string
                                                  description: Policy Id of token
                                                  nullable: false
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                                assets:
                                                  type: array
                                                  minItems: 1
                                                  maxItems: 100
                                                  items:
                                                    type: object
                                                    required:
                                                      - name
                                                      - value
                                                    properties:
                                                      name:
                                                        type: string
                                                        description: Asset Name of token
                                                        nullable: false
                                                        example: 4d494e
                                                      value:
                                                        type: string
                                                        format: bigint
                                                        description: Token amount
                                                        nullable: false
                                                        example: '123123123'
                                      - type: object
                                        properties:
                                          outRef:
                                            type: string
                                            format: '{transactionHash}#{index}'
                                            description: Output Reference of UTxO
                                            nullable: false
                                            example: >-
                                              884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                  - description: >-
                                      - UTxO of Staking Contract Pool, used for
                                      input

                                      - Spending redeemer struct:
                                        - Pool Out Index: Int - Index of Pool UTxO in outputs
                              poolInUtxo:
                                allOf:
                                  - title: UTxO model
                                    type: object
                                    description: UTxO detail for building Transaction
                                    allOf:
                                      - title: UTxO model
                                        type: object
                                        description: UTxO detail for building Transaction
                                        required:
                                          - address
                                          - coin
                                        properties:
                                          address:
                                            type: string
                                            format: bech32
                                            description: address of UTxO
                                            nullable: false
                                            example: >-
                                              addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                          coin:
                                            type: string
                                            format: bigint (lovelace)
                                            description: number ADA of utxo
                                            nullable: false
                                            example: '2000000'
                                          multiAssets:
                                            type: array
                                            minItems: 0
                                            maxItems: 100
                                            items:
                                              type: object
                                              required:
                                                - policyId
                                                - assets
                                              properties:
                                                policyId:
                                                  type: string
                                                  description: Policy Id of token
                                                  nullable: false
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                                assets:
                                                  type: array
                                                  minItems: 1
                                                  maxItems: 100
                                                  items:
                                                    type: object
                                                    required:
                                                      - name
                                                      - value
                                                    properties:
                                                      name:
                                                        type: string
                                                        description: Asset Name of token
                                                        nullable: false
                                                        example: 4d494e
                                                      value:
                                                        type: string
                                                        format: bigint
                                                        description: Token amount
                                                        nullable: false
                                                        example: '123123123'
                                      - type: object
                                        properties:
                                          outRef:
                                            type: string
                                            format: '{transactionHash}#{index}'
                                            description: Output Reference of UTxO
                                            nullable: false
                                            example: >-
                                              884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                  - description: |-
                                      - UTxO of Pool, used for input
                                      - Spending redeemer struct:
                                        - Pool Out Index: Int - Index of Pool UTxO in outputs
                                        - Loan Out Index: Int - Index of Loan UTxO in outputs
                                        - Fee Out Index: Int - Index of Fee UTxO in outputs
                                        - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                        - Market Ref Index: Int - Index of Market Ref UTxO in reference inputs
                                        - Pool In OutRef: String - OutRef of Pool UTxO in inputs
                          outputs:
                            type: object
                            description: Outputs info for building transaction
                            required:
                              - poolOutUtxo
                              - loanOutUtxo
                            properties:
                              poolOutUtxo:
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - totalSupply
                                          - circulatingDToken
                                          - totalBorrow
                                          - borrowApy
                                          - undistributedFee
                                          - interestIndex
                                          - interestTime
                                          - alternativeSupplyTokens
                                        properties:
                                          totalSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: 'Total supply in pool, in base unit'
                                            example: '100009399400'
                                          circulatingDToken:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              Total dToken minted - total dToken
                                              burned
                                            example: '134344444554'
                                          totalBorrow:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: 'Total borrow in pool, in base unit'
                                            example: '100009399400'
                                          borrowRate:
                                            type: integer
                                            nullable: false
                                            description: Borrow rate in basis point
                                            example: 5000
                                          undistributedFee:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              Protocol fee not distributed for
                                              supplier, in base unit
                                            example: '100009399400'
                                          interestIndex:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Interest index
                                            example: '12000000000'
                                          interestTime:
                                            type: number
                                            format: int64
                                            nullable: false
                                            description: >-
                                              updated market state timestamp in
                                              millisecond
                                            example: 1745028479000
                                          alternativeSupplyTokens:
                                            type: array
                                            description: >-
                                              List of alternative supply tokens in
                                              pools
                                            items:
                                              type: object
                                              required:
                                                - token
                                                - latestExchangeRateNum
                                                - latestExchangeRateDen
                                              properties:
                                                token:
                                                  type: string
                                                  format: '{policyId}.{assetName}'
                                                  nullable: false
                                                  description: Token id of alternative token
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                                latestExchangeRateNum:
                                                  type: string
                                                  format: bigint
                                                  nullable: false
                                                  description: >-
                                                    Numerator of exchange alternative token
                                                    rate has been captured at the last
                                                    interest time
                                                  example: '13000000000'
                                                latestExchangeRateDen:
                                                  type: string
                                                  format: bigint
                                                  nullable: false
                                                  description: >-
                                                    Denominator of exchange qToken rate has
                                                    been captured at the last interest time
                                                  example: '12000000000'
                              loanOutUtxo:
                                description: >-
                                  UTxO of Float Loan, borrower must add
                                  collateral to multiAssets
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - loanOwnerToken
                                          - loanToken
                                          - loanAmount
                                          - initialInterestIndex
                                        properties:
                                          loanOwnerToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: false
                                            description: >-
                                              Token id of Loan Owner NFT, null if loan
                                              was liquidated
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          loanToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: false
                                            description: Token id of Loan Token
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          loanAmount:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: loan amount in lovelace
                                            example: '10000000000'
                                          initialInterestIndex:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              captured interest index when create loan
                                              or modify loan
                                            example: '12000000000'
                              feeOutUtxo:
                                description: Output UTxO detail for building Transaction
                                type: object
                                required:
                                  - coin
                                properties:
                                  address:
                                    type: string
                                    format: bech32
                                    description: >-
                                      address of UTxO, set to null when it
                                      should be constructed using borrower
                                      information
                                    nullable: true
                                    example: >-
                                      addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                  coin:
                                    type: string
                                    format: bigint (lovelace)
                                    description: number ADA of utxo
                                    nullable: false
                                    example: '2000000'
                                  multiAssets:
                                    type: array
                                    minItems: 0
                                    maxItems: 100
                                    items:
                                      type: object
                                      required:
                                        - policyId
                                        - assets
                                      properties:
                                        policyId:
                                          type: string
                                          description: Policy Id of token
                                          nullable: false
                                          example: >-
                                            29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                        assets:
                                          type: array
                                          minItems: 1
                                          maxItems: 100
                                          items:
                                            type: object
                                            required:
                                              - name
                                              - value
                                            properties:
                                              name:
                                                type: string
                                                description: Asset Name of token
                                                nullable: false
                                                example: 4d494e
                                              value:
                                                type: string
                                                format: bigint
                                                description: Token amount
                                                nullable: false
                                                example: '123123123'
                              stakingContractOutUtxo:
                                type: object
                                description: UTxO of Staking Contract contains ADA of users
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - totalSupply
                                          - circulatingSToken
                                          - validUntil
                                        properties:
                                          totalSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: total supply of staking contract
                                            example: '20239625330'
                                          circulatingSToken:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              circulating sToken for this staking
                                              contract
                                            example: '20145500576'
                                          validUntil:
                                            type: integer
                                            format: int64
                                            nullable: false
                                            description: >-
                                              The maximum time until which the
                                              exchange rate between sADA and ADA is
                                              accepted, determinedby the end time of
                                              the epoch containing the transaction
                                              start time in milliseconds
                                            example: '1749513600000'
                          withdrawals:
                            type: array
                            minItems: 1
                            maxItems: 2
                            description: >-
                              Withdrawals info for building transaction, include
                              Reward Address Script Hash, coin and withdrawal
                              redeemer
                            items:
                              type: object
                              required:
                                - rewardAddressScriptHash
                                - coin
                              properties:
                                rewardAddressScriptHash:
                                  type: string
                                  format: bech32
                                  description: >-
                                    Script Hash of reward address, used for
                                    withdrawal
                                  nullable: false
                                  example: >-
                                    f0e22afe38c8a48cd86f871cd0fd27cbb8deca4da76d8c06cb8f3c41bf
                                coin:
                                  type: string
                                  format: bigint (lovelace)
                                  description: Number of ADA to withdrawal
                                  nullable: false
                                  example: '2000000'
                                withdrawalRedeemer:
                                  type: object
                                  description: |-
                                    - Withdrawal Redeemer Struct:
                                      - Global Config Index: Int - Index of Global Config UTxO in reference inputs
                                      - Oracle Path Indexes: ByteArray(List\<Int\>) - List Index of Oracle Path UTxO in reference inputs, convert to ByteArray
                                      - Oracle Price Indexes: ByteArray(List\<OraclePriceIndex\>) - List Index of Oracle Price UTxO in reference inputs or outputs, group by Oracle Source Type and convert to ByteArray
                                        - OraclePriceIndex: <UtxoTarget, OracleType, Index> - Index of Oracle Price UTxO
                                          - UtxoTarget: Enum - UTxO in reference inputs or outputs, include:
                                            - REF
                                            - OUT
                                            - IN
                                          - OracleType: Enum - Type of Oracle Price UTxO, include:
                                            - ORCFAX_FSP
                                            - ORCFAX_FS
                                            - LIQWID_MARKET_STATE
                                            - LIQWID_MARKET_PARAM
                                            - LIQWID_ORACLE_V1
                                            - LIQWID_ORACLE_V2
                                            - DANOGO_FLOAT_POOL
                                            - INDIGO
                                            - DJED
                                            - DANOGO_STAKING
                                            - MINSWAP_LP
                                            - SPLASH_LP_CFMM_G1
                                            - SPLASH_LP_CFMM_G2
                                            - SPLASH_LP_CFMM_G3
                                            - SPLASH_LP_STABLE
                                          - Index: Int - Index of Oracle Price UTxO in reference inputs or outputs
                                      - Prices: List\<OraclePrice\> - List of prices of collateralToken/borrowToken
                                        - OraclePrice: List\<(CalcType, prices)\> - Prices of each collateral token
                                          - CalcType: Int - 0: Normal, 1: Splash
                                      - Borrow Rates: List\<BorrowRate\> - List of borrow rates from Yield Protocols associated with Danogo Lending (e.g., Liqwid)
                                  required:
                                    - prices
                                  properties:
                                    prices:
                                      type: array
                                      minItems: 1
                                      maxItems: 50
                                      description: List of prices of token pairs (A/B)
                                      items:
                                        type: object
                                        required:
                                          - borrowToken
                                          - oraclePrices
                                        properties:
                                          borrowToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: false
                                            description: Token id of Borrow token
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          oraclePrices:
                                            type: array
                                            minItems: 1
                                            maxItems: 50
                                            description: Prices of each collateral token
                                            items:
                                              type: object
                                              required:
                                                - collateralToken
                                                - priceNum
                                                - priceDen
                                              properties:
                                                collateralToken:
                                                  type: string
                                                  format: '{policyId}.{assetName}'
                                                  nullable: false
                                                  description: Token id of Collateral token
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                                priceNum:
                                                  type: string
                                                  format: bigint
                                                  nullable: true
                                                  description: >-
                                                    Numerator of Collateral token price in
                                                    Supply token
                                                  example: '1231354'
                                                priceDen:
                                                  type: string
                                                  format: bigint
                                                  nullable: true
                                                  description: >-
                                                    Denominator of Collateral token price in
                                                    Supply token
                                                  example: '1000000'
                                    borrowRates:
                                      type: array
                                      minItems: 1
                                      maxItems: 50
                                      description: >-
                                        List of borrow rates from Yield
                                        Protocols associated with Danogo Lending
                                        (e.g., Liqwid)
                                      items:
                                        type: object
                                        properties:
                                          yieldToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: false
                                            description: Token id of Yield token
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          borrowRate:
                                            type: integer
                                            nullable: false
                                            description: borrow rate in basis points
                                            example: '5000'
                          mint:
                            type: object
                            description: >-
                              - Mint info for building transaction with
                              multiAssets
                                - MultiAssets: List token to mint/burn when create loan, include:
                                  - Loan Owner NFT: Owner NFT token send to borrower
                                  - Loan Validity Token: Token used for loan validity, include in Loan UTxO
                                  - Float dToken: The dToken is burned when withdrawing from the Float Pool UTxO
                                  - Liqwid qToken: The qToken is burned when withdrawing from the Liqwid Pool UTxO
                                - Minting redeemer struct (Float):
                                  - Pool Out Index: Int - Index of Pool UTxO in outputs
                                  - Loan Out Index: Int - Index of Loan UTxO in outputs
                                  - Fee Out Index: Int - Index of Fee UTxO in outputs
                                  - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                  - Market Ref Index: Int - Index of Market Ref UTxO in reference inputs
                                  - Pool In OutRef: String - OutRef of Pool UTxO in inputs
                                - Minting redeemer struct (Float):
                                  - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                  - Pool Market Ref Indexers: List\<PoolMarketIndexer\>
                                    - Pool Out Index: Int - Index of Pool UTxO in outputs
                                    - Fee Out Index: Option\<Int\> - Index of Fee UTxO in outputs (Null when Fee = 0)
                                    - Market Ref Index: Int - Index of Market Ref UTxO in reference inputs
                                - Minting redeemer struct (Staking Contract):
                                  - Pool Out Index: Int - Index of Pool UTxO in outputs
                            required:
                              - multiAssets
                            properties:
                              multiAssets:
                                type: array
                                minItems: 0
                                maxItems: 100
                                items:
                                  type: object
                                  required:
                                    - policyId
                                    - assets
                                    - redeemerType
                                  properties:
                                    policyId:
                                      type: string
                                      description: Policy Id of token
                                      nullable: false
                                      example: >-
                                        29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                    assets:
                                      type: array
                                      minItems: 1
                                      maxItems: 100
                                      items:
                                        type: object
                                        required:
                                          - name
                                          - value
                                        properties:
                                          name:
                                            type: string
                                            description: Asset Name of token
                                            nullable: false
                                            example: 4d494e
                                          value:
                                            type: string
                                            format: bigint
                                            description: Token amount
                                            nullable: false
                                            example: '123123123'
                                    redeemerType:
                                      type: string
                                      enum:
                                        - FIXED
                                        - FLOAT
                                        - FLOAT
                                        - STAKING
                                      description: >-
                                        Redeemer type, used when building the
                                        transaction; each type requires a
                                        different redeemer structure
                                      example: FIXED
                          referenceInputs:
                            type: array
                            minItems: 1
                            maxItems: 50
                            description: >-
                              List of UTxO output reference required to be
                              included in transaction as reference inputs
                            items:
                              type: object
                              required:
                                - outRef
                                - type
                              properties:
                                outRef:
                                  type: string
                                  format: '{transactionHash}#{index}'
                                  nullable: false
                                  description: Output Reference of UTxO
                                  example: >-
                                    884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                type:
                                  type: string
                                  enum:
                                    - POOL_SCRIPT
                                    - POOL_CONFIG
                                    - LOAN_SCRIPT
                                    - STAKING_CONTRACT_SCRIPT
                                    - ORACLE_PRICE_SCRIPT
                                    - GLOBAL_CONFIG
                                    - ORACLE_PATH
                                    - ORACLE_PRICE
                                    - PROTOCOL_CONFIG
                                    - LIQWID_MARKET_STATE
                                    - LIQWID_MARKET_PARAM
                                    - ORCFAX_FSP
                                    - ORCFAX_FS
                                    - LIQWID_ORACLE
                                    - DANOGO_FLOAT_POOL
                                    - INDIGO
                                    - DJED
                                    - DANOGO_STAKING
                                    - MINSWAP_LP
                                    - SPLASH_LP_CFMM_G3
                                  description: >-
                                    Type of UTxO OutRef, used for reference
                                    inputs and indexer in redeemer
                                  example: POOL_SCRIPT
        default:
          description: An unexpected error response
          content:
            application/json:
              schema:
                title: runtimeError
                x-stoplight:
                  id: f63af62084983
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      error:
                        type: string
                        deprecated: true
                        description: >-
                          do NOT use this field anymore! Use code & message
                          instead!
                      details:
                        type: array
                        items:
                          title: protobufAny
                          type: object
                          properties:
                            typeUrl:
                              type: string
                              description: >-
                                A URL/resource name that uniquely identifies the
                                type of the serialized

                                protocol buffer message. This string must
                                contain at least

                                one "/" character. The last segment of the URL's
                                path must represent

                                the fully qualified name of the type (as in

                                `path/google.protobuf.Duration`). The name
                                should be in a canonical form

                                (e.g., leading "." is not accepted).


                                In practice, teams usually precompile into the
                                binary all types that they

                                expect it to use in the context of Any. However,
                                for URLs which use the

                                scheme `http`, `https`, or no scheme, one can
                                optionally set up a type

                                server that maps type URLs to message
                                definitions as follows:


                                * If no scheme is provided, `https` is assumed.

                                * An HTTP GET on the URL must yield a
                                [google.protobuf.Type][]
                                  value in binary format, or produce an error.
                                * Applications are allowed to cache lookup
                                results based on the
                                  URL, or have them precompiled into a binary to avoid any
                                  lookup. Therefore, binary compatibility needs to be preserved
                                  on changes to types. (Use versioned type names to manage
                                  breaking changes.)

                                Note: this functionality is not currently
                                available in the official

                                protobuf release, and it is not used for type
                                URLs beginning with

                                type.googleapis.com.


                                Schemes other than `http`, `https` (or the empty
                                scheme) might be

                                used with implementation specific semantics.
                            value:
                              pattern: >-
                                ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
                              type: string
                              description: >-
                                Must be a valid serialized protocol buffer of
                                the above specified type.
                              format: byte
                          description: >-
                            `Any` contains an arbitrary serialized protocol
                            buffer message along with a

                            URL that describes the type of the serialized
                            message.


                            Protobuf library provides support to pack/unpack Any
                            values in the form

                            of utility functions or additional generated methods
                            of the Any type.


                            Example 1: Pack and unpack a message in C++.

                                Foo foo = ...;
                                Any any;
                                any.PackFrom(foo);
                                ...
                                if (any.UnpackTo(&foo)) {
                                  ...
                                }

                            Example 2: Pack and unpack a message in Java.

                                Foo foo = ...;
                                Any any = Any.pack(foo);
                                ...
                                if (any.is(Foo.class)) {
                                  foo = any.unpack(Foo.class);
                                }

                              Example 3: Pack and unpack a message in Python.

                                foo = Foo(...)
                                any = Any()
                                any.Pack(foo)
                                ...
                                if any.Is(Foo.DESCRIPTOR):
                                  any.Unpack(foo)
                                  ...

                              Example 4: Pack and unpack a message in Go

                                  foo := &pb.Foo{...}
                                  any, err := ptypes.MarshalAny(foo)
                                  ...
                                  foo := &pb.Foo{}
                                  if err := ptypes.UnmarshalAny(any, foo); err != nil {
                                    ...
                                  }

                            The pack methods provided by protobuf library will
                            by default use

                            'type.googleapis.com/full.type.name' as the type URL
                            and the unpack

                            methods only use the fully qualified type name after
                            the last '/'

                            in the type URL, for example "foo.bar.com/x/y.z"
                            will yield type

                            name "y.z".



                            JSON

                            ====

                            The JSON representation of an `Any` value uses the
                            regular

                            representation of the deserialized, embedded
                            message, with an

                            additional field `@type` which contains the type
                            URL. Example:

                                package google.profile;
                                message Person {
                                  string first_name = 1;
                                  string last_name = 2;
                                }

                                {
                                  "@type": "type.googleapis.com/google.profile.Person",
                                  "firstName": <string>,
                                  "lastName": <string>
                                }

                            If the embedded message type is well-known and has a
                            custom JSON

                            representation, that representation will be embedded
                            adding a field

                            `value` which holds the custom JSON in addition to
                            the `@type`

                            field. Example (for message
                            [google.protobuf.Duration][]):

                                {
                                  "@type": "type.googleapis.com/google.protobuf.Duration",
                                  "value": "1.212s"
                                }
  /api/v1/get-create-loan-ga-params:
    post:
      tags:
        - Loan
      summary: Get Params for Create Loan to Submit GA Transaction
      description: >
        Get parameters for Create Loan to Submit GA Transaction

        Note: API response doesn't include proposal procedures due to object
        complication, client needs to build themselves.
      operationId: getCreateLoanToSubmitGAParams
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                poolId:
                  type: string
                  format: '{policyId}.{assetName}'
                  description: Token id of the Pool NFT from which the Loan will borrow
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      data:
                        type: object
                        required:
                          - inputs
                          - outputs
                          - withdrawal
                          - mint
                          - referenceInputs
                        properties:
                          poolId:
                            type: string
                            description: >-
                              Token id of the Pool NFT of the Fixed Rate Pool to
                              borrow from.
                            example: >-
                              c8eb1e7c8998ee247181ae5305319f329ba317664f6ecd21d144e2b4.a2c783c4cb30eb99ea91b7e3be7257aa7ac2c0510a9cad394c96693789a76dbc
                          gaTreasuryAddress:
                            type: string
                            format: bech32
                            nullable: true
                            description: >-
                              Stake address of GA Treasury SC, used for
                              receiving reward after Governance Action
                              finalized.
                            example: >-
                              stake1u9fnh9vx7rae4t740rsdq92wj3udyds5uumwkww35vxc4xgffy4va
                          loanFee:
                            type: string
                            format: bigint (lovelace)
                            description: >
                              The loan fee that user must pay to the lending
                              pool for each governance action, included of:

                              - pool's loan interest

                              - collector fee / minAda

                              - loan origination fee
                            example: '300000000'
                          govActionParams:
                            description: >-
                              Parameters for Gov Action, used when building the
                              transaction
                            type: object
                            properties:
                              lastGuardrails:
                                type: string
                                description: >
                                  The optional guardrails script defined in the
                                  constitution. This script is executed by the
                                  ledger alongside the hard-coded ledger rules
                                  and applies only to PROTOCOL_PARAMETER_CHANGE
                                  and TREASURY_WITHDRAWALS proposals.
                                example: >-
                                  fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64
                              lastGuardrailsScriptOutRef:
                                type: string
                                description: >-
                                  The guardrails script has been put on a UTxO
                                  so that it can be used as reference script in
                                  Treasury Withdrawal and Protocol Parameter
                                  Change proposals. [See
                                  more](https://book.world.dev.cardano.org/env-mainnet.html#guardrails-reference-script-utxo)
                                example: >-
                                  dc06746a898fd230f164f47a3d749348b65655b8fb388ff275f54d62891653e2#0
                              lastEnactedNoConfidenceGovActionId:
                                type: string
                                description: >-
                                  The ID of the last enacted governance action
                                  of type NO_CONFIDENCE.
                                example: >-
                                  2a3745e4c2bada0d51d248aa3dacc9044d327280e7de4547a24464c064516d17#0
                              lastEnactedUpdateCommitteeGovActionId:
                                type: string
                                description: >-
                                  The ID of the last enacted governance action
                                  of type UPDATE_COMMITTEE.
                                example: >-
                                  3d2745e5d3ebae0e51d649ab3d9de1145e8b01f5f6c4236f2854637c1d64b412#1
                              lastEnactedNewConstitutionGovActionId:
                                type: string
                                description: >-
                                  The ID of the last enacted governance action
                                  of type NEW_CONSTITUTION.
                                example: >-
                                  5a6346f9d7b0c15c9a7fd9db7bcb429eff4bb12e5b1f6534e7bb2caa5174b283#2
                              lastEnactedHardForkGovActionId:
                                type: string
                                description: >-
                                  The ID of the last enacted governance action
                                  of type HARD_FORK_INITIATION.
                                example: >-
                                  4b3742e3e0f7c21d52e21e62b6e1cdcefa1f6d8a1fdf933162519ffbe728f1a5#3
                              lastEnactedProtocolParamChangeGovActionId:
                                type: string
                                description: >-
                                  The ID of the last enacted governance action
                                  of type PROTOCOL_PARAMETER_CHANGE.
                                example: >-
                                  6c1236b0c7a2b5c4f0b2d134ff8b1f341d8e3eaf37e6f26f15b30173b9939b17#4
                              currentProtocolVersion:
                                type: string
                                description: The current protocol version in Cardano.
                                example: 10
                              committeeVotingThreshold:
                                allOf:
                                  - title: Ratio
                                    description: >-
                                      Represents a ratio of a numerator and a
                                      denominator.
                                    type: object
                                    properties:
                                      numerator:
                                        type: string
                                        format: int64
                                        description: The numerator of the ratio.
                                        default: '0'
                                      denominator:
                                        type: string
                                        format: int64
                                        description: The denominator of the ratio.
                                        default: '1'
                                  - description: >-
                                      The voting threshold for committee
                                      approval
                              protocolParameters:
                                title: Cardano Protocol Parameters
                                type: object
                                properties:
                                  maxBlockBodySize:
                                    type: string
                                    format: int64
                                    description: Maximum size of a block body in bytes.
                                    example: '90112'
                                  maxTxSize:
                                    type: string
                                    format: int64
                                    description: Maximum size of a transaction in bytes.
                                    example: '16384'
                                  maxBlockHeaderSize:
                                    type: string
                                    format: int64
                                    description: Maximum size of a block header in bytes.
                                    example: '1100'
                                  maxValueSize:
                                    type: string
                                    format: int64
                                    description: Maximum value size in bytes.
                                    example: '5000'
                                  maxTxExecutionMemUnits:
                                    type: string
                                    format: int64
                                    description: >-
                                      Maximum memory units in a single
                                      transaction
                                    example: '14000000'
                                  maxTxExecutionStepUnits:
                                    type: string
                                    format: int64
                                    description: Maximum step units in a single transaction
                                    example: '10000000000'
                                  maxBlockExecutionMemUnits:
                                    type: string
                                    format: int64
                                    description: Maximum memory units in a single block
                                    example: '62000000'
                                  maxBlockExecutionStepUnits:
                                    type: string
                                    format: int64
                                    description: Maximum step units in a single block
                                    example: '20000000000'
                                  maxCollateralInputs:
                                    type: string
                                    format: int64
                                    description: >-
                                      Maximum number of collateral inputs in a
                                      single transaction.
                                    example: '3'
                                  txFeePerByte:
                                    type: string
                                    format: int64
                                    description: The fee per byte for transactions.
                                    example: '44'
                                  txFeeFixed:
                                    type: string
                                    format: int64
                                    description: The fixed fee for transactions.
                                    example: '155381'
                                  stakeAddressDeposit:
                                    type: string
                                    format: int64
                                    description: >-
                                      The deposit required for stake key
                                      registration.
                                    example: '2000000'
                                  stakePoolDeposit:
                                    type: string
                                    format: int64
                                    description: >-
                                      The deposit required for pool
                                      registration.
                                    example: '500000000'
                                  monetaryExpansion:
                                    allOf:
                                      - title: Ratio
                                        description: >-
                                          Represents a ratio of a numerator and a
                                          denominator.
                                        type: object
                                        properties:
                                          numerator:
                                            type: string
                                            format: int64
                                            description: The numerator of the ratio.
                                            default: '0'
                                          denominator:
                                            type: string
                                            format: int64
                                            description: The denominator of the ratio.
                                            default: '1'
                                      - description: The rate of monetary expansion.
                                  treasuryCut:
                                    allOf:
                                      - title: Ratio
                                        description: >-
                                          Represents a ratio of a numerator and a
                                          denominator.
                                        type: object
                                        properties:
                                          numerator:
                                            type: string
                                            format: int64
                                            description: The numerator of the ratio.
                                            default: '0'
                                          denominator:
                                            type: string
                                            format: int64
                                            description: The denominator of the ratio.
                                            default: '1'
                                      - description: >-
                                          The rate at which the treasury will grow
                                          over time.
                                  minPoolCost:
                                    type: string
                                    format: int64
                                    description: The minimum cost to maintain a pool.
                                    example: '170000000'
                                  utxoCostPerByte:
                                    type: string
                                    format: int64
                                    description: >-
                                      The minimum Lovelace deposit per byte for
                                      serialized UTxOs.
                                    example: '4310'
                                  executionMemUnitPrices:
                                    allOf:
                                      - title: Ratio
                                        description: >-
                                          Represents a ratio of a numerator and a
                                          denominator.
                                        type: object
                                        properties:
                                          numerator:
                                            type: string
                                            format: int64
                                            description: The numerator of the ratio.
                                            default: '0'
                                          denominator:
                                            type: string
                                            format: int64
                                            description: The denominator of the ratio.
                                            default: '1'
                                      - description: >-
                                          Price for memory usage in script
                                          execution.
                                  executionStepUnitPrices:
                                    allOf:
                                      - title: Ratio
                                        description: >-
                                          Represents a ratio of a numerator and a
                                          denominator.
                                        type: object
                                        properties:
                                          numerator:
                                            type: string
                                            format: int64
                                            description: The numerator of the ratio.
                                            default: '0'
                                          denominator:
                                            type: string
                                            format: int64
                                            description: The denominator of the ratio.
                                            default: '1'
                                      - description: >-
                                          Price for step execution in script
                                          execution.
                                  poolPledgeInfluence:
                                    allOf:
                                      - title: Ratio
                                        description: >-
                                          Represents a ratio of a numerator and a
                                          denominator.
                                        type: object
                                        properties:
                                          numerator:
                                            type: string
                                            format: int64
                                            description: The numerator of the ratio.
                                            default: '0'
                                          denominator:
                                            type: string
                                            format: int64
                                            description: The denominator of the ratio.
                                            default: '1'
                                      - description: >-
                                          The influence of pool pledge on
                                          governance actions.
                                  poolRetireMaxEpoch:
                                    type: string
                                    format: int64
                                    description: The maximum epoch for pool retirement.
                                    example: '18'
                                  stakePoolTargetNum:
                                    type: string
                                    format: int64
                                    description: >-
                                      The desired number of stake pools in the
                                      system.
                                    example: '500'
                                  costModels:
                                    description: >-
                                      Cost model data for different versions of
                                      Plutus scripts.
                                    type: object
                                    properties:
                                      plutusV1:
                                        type: array
                                        description: >-
                                          The cost model for Plutus v1 scripts,
                                          typically containing 166 integers
                                          representing resource usage costs.
                                        items:
                                          type: integer
                                      plutusV2:
                                        type: array
                                        description: >-
                                          The cost model for Plutus v2 scripts,
                                          typically containing 175 integers
                                          representing resource usage costs.
                                        items:
                                          type: integer
                                      plutusV3:
                                        type: array
                                        description: >-
                                          The cost model for Plutus v3 scripts,
                                          typically containing 223 integers
                                          representing resource usage costs.
                                        items:
                                          type: integer
                                  collateralPercentage:
                                    type: string
                                    format: int64
                                    description: >-
                                      The percentage of collateral required for
                                      scripts.
                                    example: '10'
                                  pvtMotionNoConfidence:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The pool voting threshold for a motion of
                                      no confidence.
                                  pvtCommitteeNormal:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The pool voting threshold for
                                      constitutional committee decisions.
                                  pvtCommitteeNoConfidence:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The pool voting threshold for
                                      constitutional committee actions under no
                                      confidence.
                                  pvtHardForkInitiation:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The pool voting threshold for approving a
                                      hard fork initiation.
                                  pvtPPSecurityGroup:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The pool voting threshold for changes to
                                      the protocol parameters security group.
                                  dvtMotionNoConfidence:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for a motion of
                                      no confidence.
                                  dvtCommitteeNormal:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for
                                      constitutional committee decisions.
                                  dvtCommitteeNoConfidence:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for
                                      constitutional committee actions under no
                                      confidence.
                                  dvtUpdateToConstitution:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for approving
                                      constitutional changes.
                                  dvtHardForkInitiation:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for approving a
                                      hard fork.
                                  dvtPPNetworkGroup:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for changes to
                                      the protocol parameters network group.
                                  dvtPPEconomicGroup:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for changes to
                                      the protocol parameters economic group.
                                  dvtPPTechnicalGroup:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for changes to
                                      the protocol parameters technical group.
                                  dvtPPGovGroup:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for changes to
                                      the protocol parameters governance group.
                                  dvtTreasuryWithdrawal:
                                    type: number
                                    format: double
                                    example: 0.67
                                    description: >-
                                      The drep voting threshold for treasury
                                      withdrawals.
                                  govActionLifetime:
                                    type: string
                                    format: int64
                                    description: >-
                                      The maximum lifetime of a governance
                                      action in epochs, after which it will be
                                      considered expired.
                                    example: '6'
                                  govActionDeposit:
                                    type: string
                                    format: int64
                                    description: >-
                                      The required deposit for submitting a
                                      governance action.
                                    example: '100000000000'
                                  dRepDeposit:
                                    type: string
                                    format: int64
                                    description: >-
                                      The deposit required for DRep
                                      registration.
                                    example: '500000000'
                                  dRepActivity:
                                    type: string
                                    format: int64
                                    description: >-
                                      The activity period in epochs before a
                                      DRep is considered inactive.
                                    example: '1000'
                                  committeeMinSize:
                                    type: string
                                    format: int64
                                    description: >-
                                      The minimum number of members required for
                                      a constitutional committee to function.
                                    example: '7'
                                  committeeMaxTermLength:
                                    type: string
                                    format: int64
                                    description: >-
                                      The maximum number of epochs a committee
                                      member can serve before their term
                                      expires.
                                    example: '146'
                                  minFeeRefScriptCostPerByte:
                                    allOf:
                                      - title: Ratio
                                        description: >-
                                          Represents a ratio of a numerator and a
                                          denominator.
                                        type: object
                                        properties:
                                          numerator:
                                            type: string
                                            format: int64
                                            description: The numerator of the ratio.
                                            default: '0'
                                          denominator:
                                            type: string
                                            format: int64
                                            description: The denominator of the ratio.
                                            default: '1'
                                      - description: >-
                                          The minimum fee charged per byte for
                                          reference scripts used in transactions.
                          inputs:
                            type: object
                            description: Inputs info for building transaction
                            required:
                              - poolInUtxo
                              - floatPoolInUtxo
                            properties:
                              poolInUtxo:
                                allOf:
                                  - title: UTxO model
                                    type: object
                                    description: UTxO detail for building Transaction
                                    allOf:
                                      - title: UTxO model
                                        type: object
                                        description: UTxO detail for building Transaction
                                        required:
                                          - address
                                          - coin
                                        properties:
                                          address:
                                            type: string
                                            format: bech32
                                            description: address of UTxO
                                            nullable: false
                                            example: >-
                                              addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                          coin:
                                            type: string
                                            format: bigint (lovelace)
                                            description: number ADA of utxo
                                            nullable: false
                                            example: '2000000'
                                          multiAssets:
                                            type: array
                                            minItems: 0
                                            maxItems: 100
                                            items:
                                              type: object
                                              required:
                                                - policyId
                                                - assets
                                              properties:
                                                policyId:
                                                  type: string
                                                  description: Policy Id of token
                                                  nullable: false
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                                assets:
                                                  type: array
                                                  minItems: 1
                                                  maxItems: 100
                                                  items:
                                                    type: object
                                                    required:
                                                      - name
                                                      - value
                                                    properties:
                                                      name:
                                                        type: string
                                                        description: Asset Name of token
                                                        nullable: false
                                                        example: 4d494e
                                                      value:
                                                        type: string
                                                        format: bigint
                                                        description: Token amount
                                                        nullable: false
                                                        example: '123123123'
                                      - type: object
                                        properties:
                                          outRef:
                                            type: string
                                            format: '{transactionHash}#{index}'
                                            description: Output Reference of UTxO
                                            nullable: false
                                            example: >-
                                              884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                  - description: |-
                                      - UTxO of Fixed Pool, used for input
                                      - Spending redeemer struct:
                                        - Redeemer Indexer: Index for Create loan GA (List of LoanGAPoolIndexer)
                                          - Pool In Index: Int - Index of Pool UTxO in inputs
                                          - Pool Out Index: Int - Index of Pool UTxO in outputs
                                          - LoanGA Out Index: Int - Index of LoanGA UTxO in outputs
                                        - Pool In Index: Int - Index of Pool UTxO in inputs
                                        - LoanGA In Index: Int - Index of LoanGA UTxO in inputs (Null when Create new loan)
                                        - Protocol Script Index: Int - Index of Protocol Script UTxO in reference inputs
                                        - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                        - Fee Out Index: Int - Index of Fee UTxO in outputs (Null when Fee = 0)
                              floatPoolInUtxo:
                                description: UTxO detail for building Transaction
                                title: UTxO model
                                type: object
                                allOf:
                                  - title: UTxO model
                                    type: object
                                    description: UTxO detail for building Transaction
                                    required:
                                      - address
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: address of UTxO
                                        nullable: false
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    properties:
                                      outRef:
                                        type: string
                                        format: '{transactionHash}#{index}'
                                        description: Output Reference of UTxO
                                        nullable: false
                                        example: >-
                                          884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                              stakingContractInUtxo:
                                description: UTxO detail for building Transaction
                                title: UTxO model
                                type: object
                                allOf:
                                  - title: UTxO model
                                    type: object
                                    description: UTxO detail for building Transaction
                                    required:
                                      - address
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: address of UTxO
                                        nullable: false
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    properties:
                                      outRef:
                                        type: string
                                        format: '{transactionHash}#{index}'
                                        description: Output Reference of UTxO
                                        nullable: false
                                        example: >-
                                          884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                          outputs:
                            type: object
                            description: Outputs info for building transaction
                            required:
                              - poolOutUtxo
                              - loanGAOutUtxo
                              - floatPoolOutUtxo
                            properties:
                              poolOutUtxo:
                                description: UTxO of Fixed Pool
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - supplyToken
                                          - supplyYieldToken
                                          - circulatingPTSupply
                                          - circulatingYTSupply
                                          - supplyMaturity
                                          - collaterals
                                          - baseInterestRate
                                          - gradient
                                          - maxLoanDuration
                                          - activeLoanCount
                                          - feeCollected
                                          - minBorrowAmount
                                        properties:
                                          supplyToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: false
                                            description: Token id of supply token of Pool
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          supplyYieldToken:
                                            type: string
                                            format: '{policyId}.{assetName}'
                                            nullable: true
                                            description: >-
                                              Token id of substitute token of supply
                                              token
                                            example: >-
                                              29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                          circulatingPTSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Amount of Pool PT in circulating
                                            example: '1000000000'
                                          circulatingYTSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Amount of Pool YT in circulating
                                            example: '1000000000'
                                          supplyMaturity:
                                            type: integer
                                            nullable: false
                                            description: Maturity timestamp of Pool
                                            example: 1234567890
                                          collaterals:
                                            type: array
                                            minItems: 1
                                            maxItems: 50
                                            items:
                                              type: object
                                              description: >-
                                                Collateral token with its price and
                                                liquidation threshold
                                              required:
                                                - collateralToken
                                                - liquidationThreshold
                                              properties:
                                                collateralToken:
                                                  type: string
                                                  format: '{policyId}.{assetName}'
                                                  nullable: false
                                                  description: Token id of the Collateral token
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                                liquidationThreshold:
                                                  type: integer
                                                  nullable: false
                                                  description: >-
                                                    Liquidation threshold of collateral
                                                    token in basis points
                                                  example: 8100
                                          baseInterestRate:
                                            type: integer
                                            nullable: false
                                            description: Base Interest Rate in basis points
                                            example: 2000
                                          gradient:
                                            type: integer
                                            nullable: false
                                            description: Gradient in basis points
                                            example: 1100
                                          maxLoanDuration:
                                            type: integer
                                            nullable: false
                                            description: Max loan duration in milliseconds
                                            example: 15552000000
                                          activeLoanCount:
                                            type: integer
                                            nullable: false
                                            description: Number of Active Loan borrowed from Pool
                                            example: 1
                                          feeCollected:
                                            type: boolean
                                            nullable: false
                                            description: >-
                                              True if the fee has been collected from
                                              the pool, false otherwise
                                            example: true
                                          minBorrowAmount:
                                            type: string
                                            format: bigint
                                            nullable: true
                                            description: >-
                                              The minimum borrow amount when create
                                              loan
                                            example: '2000000'
                              loanGAOutUtxo:
                                description: UTxO of Fixed LoanGA
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - title: Reference script in UTxO
                                    type: object
                                    properties:
                                      refScriptCborHex:
                                        type: string
                                        nullable: true
                                        description: CBOR hex of reference script
                                        example: >-
                                          5906da5906d7010100332229800aba2aba1aba0aab9faab9e4c011e581cc231b60979e8c856256695139ce0251eb55a05e842050b8167e8d5600001
                                      refScriptHash:
                                        type: string
                                        nullable: true
                                        description: Script hash of reference script
                                        example: >-
                                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - loanProfitFee
                                          - loanAmount
                                        properties:
                                          loanProfitFee:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              Fee amount (extracted from loan profit)
                                              that will be collected at LoanGA
                                              Collection
                                            default: '90000000'
                                          loanAmount:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Debt amount of token in LoanGA UTxO
                                            default: '100000000000'
                              feeOutUtxo:
                                description: Output UTxO detail for building Transaction
                                type: object
                                required:
                                  - coin
                                properties:
                                  address:
                                    type: string
                                    format: bech32
                                    description: >-
                                      address of UTxO, set to null when it
                                      should be constructed using borrower
                                      information
                                    nullable: true
                                    example: >-
                                      addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                  coin:
                                    type: string
                                    format: bigint (lovelace)
                                    description: number ADA of utxo
                                    nullable: false
                                    example: '2000000'
                                  multiAssets:
                                    type: array
                                    minItems: 0
                                    maxItems: 100
                                    items:
                                      type: object
                                      required:
                                        - policyId
                                        - assets
                                      properties:
                                        policyId:
                                          type: string
                                          description: Policy Id of token
                                          nullable: false
                                          example: >-
                                            29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                        assets:
                                          type: array
                                          minItems: 1
                                          maxItems: 100
                                          items:
                                            type: object
                                            required:
                                              - name
                                              - value
                                            properties:
                                              name:
                                                type: string
                                                description: Asset Name of token
                                                nullable: false
                                                example: 4d494e
                                              value:
                                                type: string
                                                format: bigint
                                                description: Token amount
                                                nullable: false
                                                example: '123123123'
                              floatPoolOutUtxo:
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - totalSupply
                                          - circulatingDToken
                                          - totalBorrow
                                          - borrowApy
                                          - undistributedFee
                                          - interestIndex
                                          - interestTime
                                          - alternativeSupplyTokens
                                        properties:
                                          totalSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: 'Total supply in pool, in base unit'
                                            example: '100009399400'
                                          circulatingDToken:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              Total dToken minted - total dToken
                                              burned
                                            example: '134344444554'
                                          totalBorrow:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: 'Total borrow in pool, in base unit'
                                            example: '100009399400'
                                          borrowRate:
                                            type: integer
                                            nullable: false
                                            description: Borrow rate in basis point
                                            example: 5000
                                          undistributedFee:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              Protocol fee not distributed for
                                              supplier, in base unit
                                            example: '100009399400'
                                          interestIndex:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: Interest index
                                            example: '12000000000'
                                          interestTime:
                                            type: number
                                            format: int64
                                            nullable: false
                                            description: >-
                                              updated market state timestamp in
                                              millisecond
                                            example: 1745028479000
                                          alternativeSupplyTokens:
                                            type: array
                                            description: >-
                                              List of alternative supply tokens in
                                              pools
                                            items:
                                              type: object
                                              required:
                                                - token
                                                - latestExchangeRateNum
                                                - latestExchangeRateDen
                                              properties:
                                                token:
                                                  type: string
                                                  format: '{policyId}.{assetName}'
                                                  nullable: false
                                                  description: Token id of alternative token
                                                  example: >-
                                                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                                latestExchangeRateNum:
                                                  type: string
                                                  format: bigint
                                                  nullable: false
                                                  description: >-
                                                    Numerator of exchange alternative token
                                                    rate has been captured at the last
                                                    interest time
                                                  example: '13000000000'
                                                latestExchangeRateDen:
                                                  type: string
                                                  format: bigint
                                                  nullable: false
                                                  description: >-
                                                    Denominator of exchange qToken rate has
                                                    been captured at the last interest time
                                                  example: '12000000000'
                              stakingContractOutUtxo:
                                type: object
                                description: UTxO of Staking Contract contains ADA of users
                                allOf:
                                  - type: object
                                    description: >-
                                      Output UTxO detail for building
                                      Transaction
                                    required:
                                      - coin
                                    properties:
                                      address:
                                        type: string
                                        format: bech32
                                        description: >-
                                          address of UTxO, set to null when it
                                          should be constructed using borrower
                                          information
                                        nullable: true
                                        example: >-
                                          addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                      coin:
                                        type: string
                                        format: bigint (lovelace)
                                        description: number ADA of utxo
                                        nullable: false
                                        example: '2000000'
                                      multiAssets:
                                        type: array
                                        minItems: 0
                                        maxItems: 100
                                        items:
                                          type: object
                                          required:
                                            - policyId
                                            - assets
                                          properties:
                                            policyId:
                                              type: string
                                              description: Policy Id of token
                                              nullable: false
                                              example: >-
                                                29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                            assets:
                                              type: array
                                              minItems: 1
                                              maxItems: 100
                                              items:
                                                type: object
                                                required:
                                                  - name
                                                  - value
                                                properties:
                                                  name:
                                                    type: string
                                                    description: Asset Name of token
                                                    nullable: false
                                                    example: 4d494e
                                                  value:
                                                    type: string
                                                    format: bigint
                                                    description: Token amount
                                                    nullable: false
                                                    example: '123123123'
                                  - type: object
                                    required:
                                      - datum
                                    properties:
                                      datum:
                                        type: object
                                        description: UTxO Datum Info
                                        required:
                                          - totalSupply
                                          - circulatingSToken
                                          - validUntil
                                        properties:
                                          totalSupply:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: total supply of staking contract
                                            example: '20239625330'
                                          circulatingSToken:
                                            type: string
                                            format: bigint
                                            nullable: false
                                            description: >-
                                              circulating sToken for this staking
                                              contract
                                            example: '20145500576'
                                          validUntil:
                                            type: integer
                                            format: int64
                                            nullable: false
                                            description: >-
                                              The maximum time until which the
                                              exchange rate between sADA and ADA is
                                              accepted, determinedby the end time of
                                              the epoch containing the transaction
                                              start time in milliseconds
                                            example: '1749513600000'
                              withdrawalFeeOutUtxo:
                                description: Output UTxO detail for building Transaction
                                type: object
                                required:
                                  - coin
                                properties:
                                  address:
                                    type: string
                                    format: bech32
                                    description: >-
                                      address of UTxO, set to null when it
                                      should be constructed using borrower
                                      information
                                    nullable: true
                                    example: >-
                                      addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
                                  coin:
                                    type: string
                                    format: bigint (lovelace)
                                    description: number ADA of utxo
                                    nullable: false
                                    example: '2000000'
                                  multiAssets:
                                    type: array
                                    minItems: 0
                                    maxItems: 100
                                    items:
                                      type: object
                                      required:
                                        - policyId
                                        - assets
                                      properties:
                                        policyId:
                                          type: string
                                          description: Policy Id of token
                                          nullable: false
                                          example: >-
                                            29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                        assets:
                                          type: array
                                          minItems: 1
                                          maxItems: 100
                                          items:
                                            type: object
                                            required:
                                              - name
                                              - value
                                            properties:
                                              name:
                                                type: string
                                                description: Asset Name of token
                                                nullable: false
                                                example: 4d494e
                                              value:
                                                type: string
                                                format: bigint
                                                description: Token amount
                                                nullable: false
                                                example: '123123123'
                          withdrawal:
                            type: object
                            description: >-
                              Withdrawal info for building transaction, include
                              Reward Address Script Hash, coin and withdrawal
                              redeemer
                            required:
                              - rewardAddressScriptHash
                              - coin
                              - withdrawalRedeemer
                            properties:
                              rewardAddressScriptHash:
                                type: string
                                format: bech32
                                description: >-
                                  Script Hash of reward address, used for
                                  withdrawal
                                nullable: false
                                example: >-
                                  f0e22afe38c8a48cd86f871cd0fd27cbb8deca4da76d8c06cb8f3c41bf
                              coin:
                                type: string
                                format: bigint (lovelace)
                                description: Number of ADA to withdrawal
                                nullable: false
                                example: '2000000'
                              withdrawalRedeemer:
                                type: object
                                description: |-
                                  - Withdrawal Redeemer Struct:
                                    - Global Config Index: Int - Index of Global Config UTxO in reference inputs
                                    - Oracle Path Indexes: ByteArray(List\<Int\>) - List Index of Oracle Path UTxO in reference inputs, convert to ByteArray
                                    - Oracle Price Indexes: ByteArray(List\<OraclePriceIndex\>) - List Index of Oracle Price UTxO in reference inputs or outputs, group by Oracle Source Type and convert to ByteArray
                                      - OraclePriceIndex: <UtxoTarget, OracleType, Index> - Index of Oracle Price UTxO
                                        - UtxoTarget: Enum - UTxO in reference inputs or outputs, include:
                                          - REF
                                          - OUT
                                          - IN
                                        - OracleType: Enum - Type of Oracle Price UTxO, include:
                                          - ORCFAX_FSP
                                          - ORCFAX_FS
                                          - LIQWID_MARKET_STATE
                                          - LIQWID_MARKET_PARAM
                                          - LIQWID_ORACLE_V1
                                          - LIQWID_ORACLE_V2
                                          - DANOGO_FLOAT_POOL
                                          - INDIGO
                                          - DJED
                                          - DANOGO_STAKING
                                          - MINSWAP_LP
                                          - SPLASH_LP_CFMM_G1
                                          - SPLASH_LP_CFMM_G2
                                          - SPLASH_LP_CFMM_G3
                                          - SPLASH_LP_STABLE
                                        - Index: Int - Index of Oracle Price UTxO in reference inputs or outputs
                                    - Prices: List\<OraclePrice\> - List of prices of collateralToken/borrowToken
                                      - OraclePrice: List\<(CalcType, prices)\> - Prices of each collateral token
                                        - CalcType: Int - 0: Normal, 1: Splash
                                    - Borrow Rates: List\<BorrowRate\> - List of borrow rates from Yield Protocols associated with Danogo Lending (e.g., Liqwid)
                                required:
                                  - prices
                                properties:
                                  prices:
                                    type: array
                                    minItems: 1
                                    maxItems: 50
                                    description: List of prices of token pairs (A/B)
                                    items:
                                      type: object
                                      required:
                                        - borrowToken
                                        - oraclePrices
                                      properties:
                                        borrowToken:
                                          type: string
                                          format: '{policyId}.{assetName}'
                                          nullable: false
                                          description: Token id of Borrow token
                                          example: >-
                                            29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                        oraclePrices:
                                          type: array
                                          minItems: 1
                                          maxItems: 50
                                          description: Prices of each collateral token
                                          items:
                                            type: object
                                            required:
                                              - collateralToken
                                              - priceNum
                                              - priceDen
                                            properties:
                                              collateralToken:
                                                type: string
                                                format: '{policyId}.{assetName}'
                                                nullable: false
                                                description: Token id of Collateral token
                                                example: >-
                                                  29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                              priceNum:
                                                type: string
                                                format: bigint
                                                nullable: true
                                                description: >-
                                                  Numerator of Collateral token price in
                                                  Supply token
                                                example: '1231354'
                                              priceDen:
                                                type: string
                                                format: bigint
                                                nullable: true
                                                description: >-
                                                  Denominator of Collateral token price in
                                                  Supply token
                                                example: '1000000'
                                  borrowRates:
                                    type: array
                                    minItems: 1
                                    maxItems: 50
                                    description: >-
                                      List of borrow rates from Yield Protocols
                                      associated with Danogo Lending (e.g.,
                                      Liqwid)
                                    items:
                                      type: object
                                      properties:
                                        yieldToken:
                                          type: string
                                          format: '{policyId}.{assetName}'
                                          nullable: false
                                          description: Token id of Yield token
                                          example: >-
                                            29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                                        borrowRate:
                                          type: integer
                                          nullable: false
                                          description: borrow rate in basis points
                                          example: '5000'
                              stakeAddress:
                                type: string
                                format: bech32
                                description: >-
                                  Stake address of staking contract, used for
                                  withdrawal if staking contract involved
                                nullable: true
                                example: >-
                                  stake1u8vx9c5h3n5el06h2k82jvzf76jssesww53xk98u9mfrcuqschj39
                              stakeRewards:
                                type: string
                                format: bigint
                                nullable: true
                                description: Rewards of stake address in lovelace
                                example: '100000000'
                          mint:
                            type: object
                            description: >-
                              - Mint info for building transaction with
                              multiAssets
                                - MultiAssets: List token to mint/burn when create loan GA, include:
                                  - Loan NFT: NFT token used for loan validity, include in LoanGA UTxO
                                  - Float dToken: The dToken is burned when withdrawing from the Float Pool UTxO
                                - Minting redeemer struct:
                                  - Redeemer Indexer: Index for Create loan GA
                                    - Pool Out Index: Int - Index of Pool UTxO in outputs
                                    - LoanGA Out Index: Int - Index of LoanGA UTxO in outputs
                                  - Pool In Index: Int - Index of Pool UTxO in inputs
                                  - LoanGA In Index: Int - Index of LoanGA UTxO in inputs (Null when Create new loan)
                                  - Protocol Script Index: Int - Index of Protocol Script UTxO in reference inputs
                                  - Protocol Config Index: Int - Index of Protocol Config UTxO in reference inputs
                                  - Fee Out Index: Int - Index of Fee UTxO in outputs (Null when Fee = 0)
                            required:
                              - multiAssets
                            properties:
                              multiAssets:
                                type: array
                                minItems: 0
                                maxItems: 100
                                items:
                                  type: object
                                  required:
                                    - policyId
                                    - assets
                                  properties:
                                    policyId:
                                      type: string
                                      description: Policy Id of token
                                      nullable: false
                                      example: >-
                                        29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                                    assets:
                                      type: array
                                      minItems: 1
                                      maxItems: 100
                                      items:
                                        type: object
                                        required:
                                          - name
                                          - value
                                        properties:
                                          name:
                                            type: string
                                            description: Asset Name of token
                                            nullable: false
                                            example: 4d494e
                                          value:
                                            type: string
                                            format: bigint
                                            description: Token amount
                                            nullable: false
                                            example: '123123123'
                          referenceInputs:
                            type: array
                            minItems: 1
                            maxItems: 50
                            description: >-
                              List of UTxO output reference required to be
                              included in transaction as reference inputs
                            items:
                              type: object
                              required:
                                - outRef
                                - type
                              properties:
                                outRef:
                                  type: string
                                  format: '{transactionHash}#{index}'
                                  nullable: false
                                  description: Output Reference of UTxO
                                  example: >-
                                    884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
                                type:
                                  type: string
                                  enum:
                                    - POOL_SCRIPT
                                    - LOAN_SCRIPT
                                    - ORACLE_PRICE_SCRIPT
                                    - GLOBAL_CONFIG
                                    - ORACLE_PATH
                                    - ORACLE_PRICE
                                    - PROTOCOL_SCRIPT
                                    - PROTOCOL_CONFIG
                                    - ORCFAX_FSP
                                    - ORCFAX_FS
                                    - DANOGO_FLOAT_POOL
                                    - INDIGO
                                    - DJED
                                    - DANOGO_STAKING
                                    - MINSWAP_LP
                                  description: >-
                                    Type of UTxO OutRef, used for reference
                                    inputs and indexer in redeemer
                                  example: POOL_SCRIPT
        default:
          description: An unexpected error response
          content:
            application/json:
              schema:
                title: runtimeError
                x-stoplight:
                  id: f63af62084983
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      error:
                        type: string
                        deprecated: true
                        description: >-
                          do NOT use this field anymore! Use code & message
                          instead!
                      details:
                        type: array
                        items:
                          title: protobufAny
                          type: object
                          properties:
                            typeUrl:
                              type: string
                              description: >-
                                A URL/resource name that uniquely identifies the
                                type of the serialized

                                protocol buffer message. This string must
                                contain at least

                                one "/" character. The last segment of the URL's
                                path must represent

                                the fully qualified name of the type (as in

                                `path/google.protobuf.Duration`). The name
                                should be in a canonical form

                                (e.g., leading "." is not accepted).


                                In practice, teams usually precompile into the
                                binary all types that they

                                expect it to use in the context of Any. However,
                                for URLs which use the

                                scheme `http`, `https`, or no scheme, one can
                                optionally set up a type

                                server that maps type URLs to message
                                definitions as follows:


                                * If no scheme is provided, `https` is assumed.

                                * An HTTP GET on the URL must yield a
                                [google.protobuf.Type][]
                                  value in binary format, or produce an error.
                                * Applications are allowed to cache lookup
                                results based on the
                                  URL, or have them precompiled into a binary to avoid any
                                  lookup. Therefore, binary compatibility needs to be preserved
                                  on changes to types. (Use versioned type names to manage
                                  breaking changes.)

                                Note: this functionality is not currently
                                available in the official

                                protobuf release, and it is not used for type
                                URLs beginning with

                                type.googleapis.com.


                                Schemes other than `http`, `https` (or the empty
                                scheme) might be

                                used with implementation specific semantics.
                            value:
                              pattern: >-
                                ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
                              type: string
                              description: >-
                                Must be a valid serialized protocol buffer of
                                the above specified type.
                              format: byte
                          description: >-
                            `Any` contains an arbitrary serialized protocol
                            buffer message along with a

                            URL that describes the type of the serialized
                            message.


                            Protobuf library provides support to pack/unpack Any
                            values in the form

                            of utility functions or additional generated methods
                            of the Any type.


                            Example 1: Pack and unpack a message in C++.

                                Foo foo = ...;
                                Any any;
                                any.PackFrom(foo);
                                ...
                                if (any.UnpackTo(&foo)) {
                                  ...
                                }

                            Example 2: Pack and unpack a message in Java.

                                Foo foo = ...;
                                Any any = Any.pack(foo);
                                ...
                                if (any.is(Foo.class)) {
                                  foo = any.unpack(Foo.class);
                                }

                              Example 3: Pack and unpack a message in Python.

                                foo = Foo(...)
                                any = Any()
                                any.Pack(foo)
                                ...
                                if any.Is(Foo.DESCRIPTOR):
                                  any.Unpack(foo)
                                  ...

                              Example 4: Pack and unpack a message in Go

                                  foo := &pb.Foo{...}
                                  any, err := ptypes.MarshalAny(foo)
                                  ...
                                  foo := &pb.Foo{}
                                  if err := ptypes.UnmarshalAny(any, foo); err != nil {
                                    ...
                                  }

                            The pack methods provided by protobuf library will
                            by default use

                            'type.googleapis.com/full.type.name' as the type URL
                            and the unpack

                            methods only use the fully qualified type name after
                            the last '/'

                            in the type URL, for example "foo.bar.com/x/y.z"
                            will yield type

                            name "y.z".



                            JSON

                            ====

                            The JSON representation of an `Any` value uses the
                            regular

                            representation of the deserialized, embedded
                            message, with an

                            additional field `@type` which contains the type
                            URL. Example:

                                package google.profile;
                                message Person {
                                  string first_name = 1;
                                  string last_name = 2;
                                }

                                {
                                  "@type": "type.googleapis.com/google.profile.Person",
                                  "firstName": <string>,
                                  "lastName": <string>
                                }

                            If the embedded message type is well-known and has a
                            custom JSON

                            representation, that representation will be embedded
                            adding a field

                            `value` which holds the custom JSON in addition to
                            the `@type`

                            field. Example (for message
                            [google.protobuf.Duration][]):

                                {
                                  "@type": "type.googleapis.com/google.protobuf.Duration",
                                  "value": "1.212s"
                                }
  /api/v1/calculate-max-loan-amount:
    post:
      tags:
        - Utility
      summary: Calculate max loan amount
      description: >-
        - Calculate max loan amount of a pool, based on collateral amount and
        health factor
      operationId: calculateMaxLoanAmount
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - loanToken
                - healthFactor
                - collateralTokens
              properties:
                loanToken:
                  type: string
                  format: '{policyId}.{assetName}'
                  nullable: false
                  description: Token id of loan token
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                healthFactor:
                  type: number
                  format: double
                  nullable: false
                  description: Health factor of this loan
                  example: 1.23
                collateralTokens:
                  type: array
                  minItems: 1
                  maxItems: 50
                  description: List of collaterals used by Loan
                  items:
                    type: object
                    required:
                      - collateralToken
                      - collateralAmount
                      - liquidationThreshold
                    properties:
                      collateralToken:
                        type: string
                        format: '{policyId}.{assetName}'
                        nullable: false
                        description: Token id of Collateral token
                        example: >-
                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                      collateralAmount:
                        type: string
                        format: bigint
                        nullable: false
                        description: Amount of Collateral token
                        example: '1231354'
                      liquidationThreshold:
                        type: integer
                        nullable: false
                        description: >-
                          Liquidation threshold of collateral token in basis
                          points
                        example: 8100
                borrowRate:
                  type: integer
                  nullable: true
                  description: >-
                    Borrow rate of this Pool in bais point, used for calculating
                    max loan amount of Fixed Pool
                  example: 500
                loanDuration:
                  type: integer
                  nullable: true
                  description: >-
                    Loan duration in days, used for calculating max loan amount
                    of Fixed Pool
                  example: 7
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      data:
                        type: object
                        required:
                          - maxBorrowAmount
                          - maxLoanAmount
                        properties:
                          maxBorrowAmount:
                            type: string
                            format: bigint
                            nullable: false
                            description: 'Max borrow amount user can borrow, in base unit'
                            example: '1231354'
                          maxLoanAmount:
                            type: string
                            format: bigint
                            nullable: false
                            description: >-
                              Max loan amount user need to paid when repaying
                              loan, in base unit
                            example: '1231354'
        default:
          description: An unexpected error response
          content:
            application/json:
              schema:
                title: runtimeError
                x-stoplight:
                  id: f63af62084983
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      error:
                        type: string
                        deprecated: true
                        description: >-
                          do NOT use this field anymore! Use code & message
                          instead!
                      details:
                        type: array
                        items:
                          title: protobufAny
                          type: object
                          properties:
                            typeUrl:
                              type: string
                              description: >-
                                A URL/resource name that uniquely identifies the
                                type of the serialized

                                protocol buffer message. This string must
                                contain at least

                                one "/" character. The last segment of the URL's
                                path must represent

                                the fully qualified name of the type (as in

                                `path/google.protobuf.Duration`). The name
                                should be in a canonical form

                                (e.g., leading "." is not accepted).


                                In practice, teams usually precompile into the
                                binary all types that they

                                expect it to use in the context of Any. However,
                                for URLs which use the

                                scheme `http`, `https`, or no scheme, one can
                                optionally set up a type

                                server that maps type URLs to message
                                definitions as follows:


                                * If no scheme is provided, `https` is assumed.

                                * An HTTP GET on the URL must yield a
                                [google.protobuf.Type][]
                                  value in binary format, or produce an error.
                                * Applications are allowed to cache lookup
                                results based on the
                                  URL, or have them precompiled into a binary to avoid any
                                  lookup. Therefore, binary compatibility needs to be preserved
                                  on changes to types. (Use versioned type names to manage
                                  breaking changes.)

                                Note: this functionality is not currently
                                available in the official

                                protobuf release, and it is not used for type
                                URLs beginning with

                                type.googleapis.com.


                                Schemes other than `http`, `https` (or the empty
                                scheme) might be

                                used with implementation specific semantics.
                            value:
                              pattern: >-
                                ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
                              type: string
                              description: >-
                                Must be a valid serialized protocol buffer of
                                the above specified type.
                              format: byte
                          description: >-
                            `Any` contains an arbitrary serialized protocol
                            buffer message along with a

                            URL that describes the type of the serialized
                            message.


                            Protobuf library provides support to pack/unpack Any
                            values in the form

                            of utility functions or additional generated methods
                            of the Any type.


                            Example 1: Pack and unpack a message in C++.

                                Foo foo = ...;
                                Any any;
                                any.PackFrom(foo);
                                ...
                                if (any.UnpackTo(&foo)) {
                                  ...
                                }

                            Example 2: Pack and unpack a message in Java.

                                Foo foo = ...;
                                Any any = Any.pack(foo);
                                ...
                                if (any.is(Foo.class)) {
                                  foo = any.unpack(Foo.class);
                                }

                              Example 3: Pack and unpack a message in Python.

                                foo = Foo(...)
                                any = Any()
                                any.Pack(foo)
                                ...
                                if any.Is(Foo.DESCRIPTOR):
                                  any.Unpack(foo)
                                  ...

                              Example 4: Pack and unpack a message in Go

                                  foo := &pb.Foo{...}
                                  any, err := ptypes.MarshalAny(foo)
                                  ...
                                  foo := &pb.Foo{}
                                  if err := ptypes.UnmarshalAny(any, foo); err != nil {
                                    ...
                                  }

                            The pack methods provided by protobuf library will
                            by default use

                            'type.googleapis.com/full.type.name' as the type URL
                            and the unpack

                            methods only use the fully qualified type name after
                            the last '/'

                            in the type URL, for example "foo.bar.com/x/y.z"
                            will yield type

                            name "y.z".



                            JSON

                            ====

                            The JSON representation of an `Any` value uses the
                            regular

                            representation of the deserialized, embedded
                            message, with an

                            additional field `@type` which contains the type
                            URL. Example:

                                package google.profile;
                                message Person {
                                  string first_name = 1;
                                  string last_name = 2;
                                }

                                {
                                  "@type": "type.googleapis.com/google.profile.Person",
                                  "firstName": <string>,
                                  "lastName": <string>
                                }

                            If the embedded message type is well-known and has a
                            custom JSON

                            representation, that representation will be embedded
                            adding a field

                            `value` which holds the custom JSON in addition to
                            the `@type`

                            field. Example (for message
                            [google.protobuf.Duration][]):

                                {
                                  "@type": "type.googleapis.com/google.protobuf.Duration",
                                  "value": "1.212s"
                                }
  /api/v1/calculate-health-factor:
    post:
      tags:
        - Utility
      summary: Calculate health factor
      description: >-
        - Calculate health factor of a loan, based on loan amount and collateral
        amount
      operationId: calculateHealthFactor
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - loanToken
                - loanAmount
                - collateralTokens
              properties:
                loanToken:
                  type: string
                  format: '{policyId}.{assetName}'
                  nullable: false
                  description: Token id of loan token
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                loanAmount:
                  type: string
                  format: bigint
                  nullable: false
                  description: Loan amount
                  example: '1231354'
                collateralTokens:
                  type: array
                  minItems: 1
                  maxItems: 50
                  description: List of collaterals used by Loan
                  items:
                    type: object
                    required:
                      - collateralToken
                      - collateralAmount
                      - liquidationThreshold
                    properties:
                      collateralToken:
                        type: string
                        format: '{policyId}.{assetName}'
                        nullable: false
                        description: Token id of Collateral token
                        example: >-
                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                      collateralAmount:
                        type: string
                        format: bigint
                        nullable: false
                        description: Amount of Collateral token
                        example: '1231354'
                      liquidationThreshold:
                        type: integer
                        nullable: false
                        description: >-
                          Liquidation threshold of collateral token in basis
                          points
                        example: 8100
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      data:
                        type: object
                        required:
                          - healthFactor
                          - totalCollateralAmount
                        properties:
                          healthFactor:
                            type: number
                            format: double
                            nullable: false
                            description: >-
                              Health factor collateraled based on borrow amount
                              and collateral amount
                            example: 1.23
                          totalCollateralAmount:
                            type: string
                            format: bigint
                            nullable: false
                            description: Total collateral amount in base unit
                            example: '1231354'
        default:
          description: An unexpected error response
          content:
            application/json:
              schema:
                title: runtimeError
                x-stoplight:
                  id: f63af62084983
                allOf:
                  - title: generic message response
                    type: object
                    properties:
                      code:
                        type: integer
                        description: >-
                          response code, 200 is success, other code is not
                          success
                      traceId:
                        type: string
                        description: >-
                          Trace ID of the request (required when request is
                          error).

                          Trace ID is used to trace the root cause of the error
                          quickly.

                          - Why we need it?, please refer TDD:
                          https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                          - Distributed tracing guideline:
                          https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                          - Service mesh guideline:
                          https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
                      message:
                        type: string
                        description: response message
                  - type: object
                    properties:
                      error:
                        type: string
                        deprecated: true
                        description: >-
                          do NOT use this field anymore! Use code & message
                          instead!
                      details:
                        type: array
                        items:
                          title: protobufAny
                          type: object
                          properties:
                            typeUrl:
                              type: string
                              description: >-
                                A URL/resource name that uniquely identifies the
                                type of the serialized

                                protocol buffer message. This string must
                                contain at least

                                one "/" character. The last segment of the URL's
                                path must represent

                                the fully qualified name of the type (as in

                                `path/google.protobuf.Duration`). The name
                                should be in a canonical form

                                (e.g., leading "." is not accepted).


                                In practice, teams usually precompile into the
                                binary all types that they

                                expect it to use in the context of Any. However,
                                for URLs which use the

                                scheme `http`, `https`, or no scheme, one can
                                optionally set up a type

                                server that maps type URLs to message
                                definitions as follows:


                                * If no scheme is provided, `https` is assumed.

                                * An HTTP GET on the URL must yield a
                                [google.protobuf.Type][]
                                  value in binary format, or produce an error.
                                * Applications are allowed to cache lookup
                                results based on the
                                  URL, or have them precompiled into a binary to avoid any
                                  lookup. Therefore, binary compatibility needs to be preserved
                                  on changes to types. (Use versioned type names to manage
                                  breaking changes.)

                                Note: this functionality is not currently
                                available in the official

                                protobuf release, and it is not used for type
                                URLs beginning with

                                type.googleapis.com.


                                Schemes other than `http`, `https` (or the empty
                                scheme) might be

                                used with implementation specific semantics.
                            value:
                              pattern: >-
                                ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
                              type: string
                              description: >-
                                Must be a valid serialized protocol buffer of
                                the above specified type.
                              format: byte
                          description: >-
                            `Any` contains an arbitrary serialized protocol
                            buffer message along with a

                            URL that describes the type of the serialized
                            message.


                            Protobuf library provides support to pack/unpack Any
                            values in the form

                            of utility functions or additional generated methods
                            of the Any type.


                            Example 1: Pack and unpack a message in C++.

                                Foo foo = ...;
                                Any any;
                                any.PackFrom(foo);
                                ...
                                if (any.UnpackTo(&foo)) {
                                  ...
                                }

                            Example 2: Pack and unpack a message in Java.

                                Foo foo = ...;
                                Any any = Any.pack(foo);
                                ...
                                if (any.is(Foo.class)) {
                                  foo = any.unpack(Foo.class);
                                }

                              Example 3: Pack and unpack a message in Python.

                                foo = Foo(...)
                                any = Any()
                                any.Pack(foo)
                                ...
                                if any.Is(Foo.DESCRIPTOR):
                                  any.Unpack(foo)
                                  ...

                              Example 4: Pack and unpack a message in Go

                                  foo := &pb.Foo{...}
                                  any, err := ptypes.MarshalAny(foo)
                                  ...
                                  foo := &pb.Foo{}
                                  if err := ptypes.UnmarshalAny(any, foo); err != nil {
                                    ...
                                  }

                            The pack methods provided by protobuf library will
                            by default use

                            'type.googleapis.com/full.type.name' as the type URL
                            and the unpack

                            methods only use the fully qualified type name after
                            the last '/'

                            in the type URL, for example "foo.bar.com/x/y.z"
                            will yield type

                            name "y.z".



                            JSON

                            ====

                            The JSON representation of an `Any` value uses the
                            regular

                            representation of the deserialized, embedded
                            message, with an

                            additional field `@type` which contains the type
                            URL. Example:

                                package google.profile;
                                message Person {
                                  string first_name = 1;
                                  string last_name = 2;
                                }

                                {
                                  "@type": "type.googleapis.com/google.profile.Person",
                                  "firstName": <string>,
                                  "lastName": <string>
                                }

                            If the embedded message type is well-known and has a
                            custom JSON

                            representation, that representation will be embedded
                            adding a field

                            `value` which holds the custom JSON in addition to
                            the `@type`

                            field. Example (for message
                            [google.protobuf.Duration][]):

                                {
                                  "@type": "type.googleapis.com/google.protobuf.Duration",
                                  "value": "1.212s"
                                }
components:
  schemas:
    FixedPoolUTxO:
      description: UTxO of Fixed Pool
      allOf:
        - type: object
          description: Output UTxO detail for building Transaction
          required:
            - coin
          properties:
            address:
              type: string
              format: bech32
              description: >-
                address of UTxO, set to null when it should be constructed using
                borrower information
              nullable: true
              example: >-
                addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
            coin:
              type: string
              format: bigint (lovelace)
              description: number ADA of utxo
              nullable: false
              example: '2000000'
            multiAssets:
              type: array
              minItems: 0
              maxItems: 100
              items:
                type: object
                required:
                  - policyId
                  - assets
                properties:
                  policyId:
                    type: string
                    description: Policy Id of token
                    nullable: false
                    example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                  assets:
                    type: array
                    minItems: 1
                    maxItems: 100
                    items:
                      type: object
                      required:
                        - name
                        - value
                      properties:
                        name:
                          type: string
                          description: Asset Name of token
                          nullable: false
                          example: 4d494e
                        value:
                          type: string
                          format: bigint
                          description: Token amount
                          nullable: false
                          example: '123123123'
        - type: object
          required:
            - datum
          properties:
            datum:
              type: object
              description: UTxO Datum Info
              required:
                - supplyToken
                - supplyYieldToken
                - circulatingPTSupply
                - circulatingYTSupply
                - supplyMaturity
                - collaterals
                - baseInterestRate
                - gradient
                - maxLoanDuration
                - activeLoanCount
                - feeCollected
                - minBorrowAmount
              properties:
                supplyToken:
                  type: string
                  format: '{policyId}.{assetName}'
                  nullable: false
                  description: Token id of supply token of Pool
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                supplyYieldToken:
                  type: string
                  format: '{policyId}.{assetName}'
                  nullable: true
                  description: Token id of substitute token of supply token
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                circulatingPTSupply:
                  type: string
                  format: bigint
                  nullable: false
                  description: Amount of Pool PT in circulating
                  example: '1000000000'
                circulatingYTSupply:
                  type: string
                  format: bigint
                  nullable: false
                  description: Amount of Pool YT in circulating
                  example: '1000000000'
                supplyMaturity:
                  type: integer
                  nullable: false
                  description: Maturity timestamp of Pool
                  example: 1234567890
                collaterals:
                  type: array
                  minItems: 1
                  maxItems: 50
                  items:
                    type: object
                    description: Collateral token with its price and liquidation threshold
                    required:
                      - collateralToken
                      - liquidationThreshold
                    properties:
                      collateralToken:
                        type: string
                        format: '{policyId}.{assetName}'
                        nullable: false
                        description: Token id of the Collateral token
                        example: >-
                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                      liquidationThreshold:
                        type: integer
                        nullable: false
                        description: >-
                          Liquidation threshold of collateral token in basis
                          points
                        example: 8100
                baseInterestRate:
                  type: integer
                  nullable: false
                  description: Base Interest Rate in basis points
                  example: 2000
                gradient:
                  type: integer
                  nullable: false
                  description: Gradient in basis points
                  example: 1100
                maxLoanDuration:
                  type: integer
                  nullable: false
                  description: Max loan duration in milliseconds
                  example: 15552000000
                activeLoanCount:
                  type: integer
                  nullable: false
                  description: Number of Active Loan borrowed from Pool
                  example: 1
                feeCollected:
                  type: boolean
                  nullable: false
                  description: >-
                    True if the fee has been collected from the pool, false
                    otherwise
                  example: true
                minBorrowAmount:
                  type: string
                  format: bigint
                  nullable: true
                  description: The minimum borrow amount when create loan
                  example: '2000000'
    FixedLoanUTxO:
      description: 'UTxO of Fixed Loan, borrower must add collateral to multiAssets'
      allOf:
        - type: object
          description: Output UTxO detail for building Transaction
          required:
            - coin
          properties:
            address:
              type: string
              format: bech32
              description: >-
                address of UTxO, set to null when it should be constructed using
                borrower information
              nullable: true
              example: >-
                addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
            coin:
              type: string
              format: bigint (lovelace)
              description: number ADA of utxo
              nullable: false
              example: '2000000'
            multiAssets:
              type: array
              minItems: 0
              maxItems: 100
              items:
                type: object
                required:
                  - policyId
                  - assets
                properties:
                  policyId:
                    type: string
                    description: Policy Id of token
                    nullable: false
                    example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                  assets:
                    type: array
                    minItems: 1
                    maxItems: 100
                    items:
                      type: object
                      required:
                        - name
                        - value
                      properties:
                        name:
                          type: string
                          description: Asset Name of token
                          nullable: false
                          example: 4d494e
                        value:
                          type: string
                          format: bigint
                          description: Token amount
                          nullable: false
                          example: '123123123'
        - type: object
          required:
            - datum
          properties:
            datum:
              type: object
              description: UTxO Datum Info
              required:
                - loanProfitFee
                - loanAmount
                - loanOwnerNftName
              properties:
                loanProfitFee:
                  type: string
                  format: bigint
                  nullable: true
                  description: >-
                    Loan profit fee in datum of Loan UTxO, set when building the
                    Tx
                  example: '90000000'
                loanAmount:
                  type: string
                  format: bigint
                  nullable: false
                  description: Debt amount of token in Loan UTxO
                  example: '1000000000'
                loanMaturity:
                  type: number
                  format: int64
                  nullable: true
                  description: >-
                    Maturity timestamp of Loan in milliseconds, set to loan
                    maturity when building the Tx
                  example: 1234567890
                loanOwnerNftName:
                  type: string
                  format: '{assetName}'
                  nullable: false
                  description: Token id asset name of Loan Owner NFT
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
    FixedLoanGAUTxO:
      description: UTxO of Fixed LoanGA
      allOf:
        - type: object
          description: Output UTxO detail for building Transaction
          required:
            - coin
          properties:
            address:
              type: string
              format: bech32
              description: >-
                address of UTxO, set to null when it should be constructed using
                borrower information
              nullable: true
              example: >-
                addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
            coin:
              type: string
              format: bigint (lovelace)
              description: number ADA of utxo
              nullable: false
              example: '2000000'
            multiAssets:
              type: array
              minItems: 0
              maxItems: 100
              items:
                type: object
                required:
                  - policyId
                  - assets
                properties:
                  policyId:
                    type: string
                    description: Policy Id of token
                    nullable: false
                    example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                  assets:
                    type: array
                    minItems: 1
                    maxItems: 100
                    items:
                      type: object
                      required:
                        - name
                        - value
                      properties:
                        name:
                          type: string
                          description: Asset Name of token
                          nullable: false
                          example: 4d494e
                        value:
                          type: string
                          format: bigint
                          description: Token amount
                          nullable: false
                          example: '123123123'
        - title: Reference script in UTxO
          type: object
          properties:
            refScriptCborHex:
              type: string
              nullable: true
              description: CBOR hex of reference script
              example: >-
                5906da5906d7010100332229800aba2aba1aba0aab9faab9e4c011e581cc231b60979e8c856256695139ce0251eb55a05e842050b8167e8d5600001
            refScriptHash:
              type: string
              nullable: true
              description: Script hash of reference script
              example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
        - type: object
          required:
            - datum
          properties:
            datum:
              type: object
              description: UTxO Datum Info
              required:
                - loanProfitFee
                - loanAmount
              properties:
                loanProfitFee:
                  type: string
                  format: bigint
                  nullable: false
                  description: >-
                    Fee amount (extracted from loan profit) that will be
                    collected at LoanGA Collection
                  default: '90000000'
                loanAmount:
                  type: string
                  format: bigint
                  nullable: false
                  description: Debt amount of token in LoanGA UTxO
                  default: '100000000000'
    FloatPoolUTxO:
      allOf:
        - type: object
          description: Output UTxO detail for building Transaction
          required:
            - coin
          properties:
            address:
              type: string
              format: bech32
              description: >-
                address of UTxO, set to null when it should be constructed using
                borrower information
              nullable: true
              example: >-
                addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
            coin:
              type: string
              format: bigint (lovelace)
              description: number ADA of utxo
              nullable: false
              example: '2000000'
            multiAssets:
              type: array
              minItems: 0
              maxItems: 100
              items:
                type: object
                required:
                  - policyId
                  - assets
                properties:
                  policyId:
                    type: string
                    description: Policy Id of token
                    nullable: false
                    example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                  assets:
                    type: array
                    minItems: 1
                    maxItems: 100
                    items:
                      type: object
                      required:
                        - name
                        - value
                      properties:
                        name:
                          type: string
                          description: Asset Name of token
                          nullable: false
                          example: 4d494e
                        value:
                          type: string
                          format: bigint
                          description: Token amount
                          nullable: false
                          example: '123123123'
        - type: object
          required:
            - datum
          properties:
            datum:
              type: object
              description: UTxO Datum Info
              required:
                - totalSupply
                - circulatingDToken
                - totalBorrow
                - borrowApy
                - undistributedFee
                - interestIndex
                - interestTime
                - alternativeSupplyTokens
              properties:
                totalSupply:
                  type: string
                  format: bigint
                  nullable: false
                  description: 'Total supply in pool, in base unit'
                  example: '100009399400'
                circulatingDToken:
                  type: string
                  format: bigint
                  nullable: false
                  description: Total dToken minted - total dToken burned
                  example: '134344444554'
                totalBorrow:
                  type: string
                  format: bigint
                  nullable: false
                  description: 'Total borrow in pool, in base unit'
                  example: '100009399400'
                borrowRate:
                  type: integer
                  nullable: false
                  description: Borrow rate in basis point
                  example: 5000
                undistributedFee:
                  type: string
                  format: bigint
                  nullable: false
                  description: 'Protocol fee not distributed for supplier, in base unit'
                  example: '100009399400'
                interestIndex:
                  type: string
                  format: bigint
                  nullable: false
                  description: Interest index
                  example: '12000000000'
                interestTime:
                  type: number
                  format: int64
                  nullable: false
                  description: updated market state timestamp in millisecond
                  example: 1745028479000
                alternativeSupplyTokens:
                  type: array
                  description: List of alternative supply tokens in pools
                  items:
                    type: object
                    required:
                      - token
                      - latestExchangeRateNum
                      - latestExchangeRateDen
                    properties:
                      token:
                        type: string
                        format: '{policyId}.{assetName}'
                        nullable: false
                        description: Token id of alternative token
                        example: >-
                          29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                      latestExchangeRateNum:
                        type: string
                        format: bigint
                        nullable: false
                        description: >-
                          Numerator of exchange alternative token rate has been
                          captured at the last interest time
                        example: '13000000000'
                      latestExchangeRateDen:
                        type: string
                        format: bigint
                        nullable: false
                        description: >-
                          Denominator of exchange qToken rate has been captured
                          at the last interest time
                        example: '12000000000'
    FloatLoanUTxO:
      description: 'UTxO of Float Loan, borrower must add collateral to multiAssets'
      allOf:
        - type: object
          description: Output UTxO detail for building Transaction
          required:
            - coin
          properties:
            address:
              type: string
              format: bech32
              description: >-
                address of UTxO, set to null when it should be constructed using
                borrower information
              nullable: true
              example: >-
                addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
            coin:
              type: string
              format: bigint (lovelace)
              description: number ADA of utxo
              nullable: false
              example: '2000000'
            multiAssets:
              type: array
              minItems: 0
              maxItems: 100
              items:
                type: object
                required:
                  - policyId
                  - assets
                properties:
                  policyId:
                    type: string
                    description: Policy Id of token
                    nullable: false
                    example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                  assets:
                    type: array
                    minItems: 1
                    maxItems: 100
                    items:
                      type: object
                      required:
                        - name
                        - value
                      properties:
                        name:
                          type: string
                          description: Asset Name of token
                          nullable: false
                          example: 4d494e
                        value:
                          type: string
                          format: bigint
                          description: Token amount
                          nullable: false
                          example: '123123123'
        - type: object
          required:
            - datum
          properties:
            datum:
              type: object
              description: UTxO Datum Info
              required:
                - loanOwnerToken
                - loanToken
                - loanAmount
                - initialInterestIndex
              properties:
                loanOwnerToken:
                  type: string
                  format: '{policyId}.{assetName}'
                  nullable: false
                  description: 'Token id of Loan Owner NFT, null if loan was liquidated'
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                loanToken:
                  type: string
                  format: '{policyId}.{assetName}'
                  nullable: false
                  description: Token id of Loan Token
                  example: >-
                    29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                loanAmount:
                  type: string
                  format: bigint
                  nullable: false
                  description: loan amount in lovelace
                  example: '10000000000'
                initialInterestIndex:
                  type: string
                  format: bigint
                  nullable: false
                  description: captured interest index when create loan or modify loan
                  example: '12000000000'
    StakingContractUTxO:
      type: object
      description: UTxO of Staking Contract contains ADA of users
      allOf:
        - type: object
          description: Output UTxO detail for building Transaction
          required:
            - coin
          properties:
            address:
              type: string
              format: bech32
              description: >-
                address of UTxO, set to null when it should be constructed using
                borrower information
              nullable: true
              example: >-
                addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
            coin:
              type: string
              format: bigint (lovelace)
              description: number ADA of utxo
              nullable: false
              example: '2000000'
            multiAssets:
              type: array
              minItems: 0
              maxItems: 100
              items:
                type: object
                required:
                  - policyId
                  - assets
                properties:
                  policyId:
                    type: string
                    description: Policy Id of token
                    nullable: false
                    example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                  assets:
                    type: array
                    minItems: 1
                    maxItems: 100
                    items:
                      type: object
                      required:
                        - name
                        - value
                      properties:
                        name:
                          type: string
                          description: Asset Name of token
                          nullable: false
                          example: 4d494e
                        value:
                          type: string
                          format: bigint
                          description: Token amount
                          nullable: false
                          example: '123123123'
        - type: object
          required:
            - datum
          properties:
            datum:
              type: object
              description: UTxO Datum Info
              required:
                - totalSupply
                - circulatingSToken
                - validUntil
              properties:
                totalSupply:
                  type: string
                  format: bigint
                  nullable: false
                  description: total supply of staking contract
                  example: '20239625330'
                circulatingSToken:
                  type: string
                  format: bigint
                  nullable: false
                  description: circulating sToken for this staking contract
                  example: '20145500576'
                validUntil:
                  type: integer
                  format: int64
                  nullable: false
                  description: >-
                    The maximum time until which the exchange rate between sADA
                    and ADA is accepted, determinedby the end time of the epoch
                    containing the transaction start time in milliseconds
                  example: '1749513600000'
    OracleWitdrawalRedeemerStruct:
      type: object
      description: |-
        - Withdrawal Redeemer Struct:
          - Global Config Index: Int - Index of Global Config UTxO in reference inputs
          - Oracle Path Indexes: ByteArray(List\<Int\>) - List Index of Oracle Path UTxO in reference inputs, convert to ByteArray
          - Oracle Price Indexes: ByteArray(List\<OraclePriceIndex\>) - List Index of Oracle Price UTxO in reference inputs or outputs, group by Oracle Source Type and convert to ByteArray
            - OraclePriceIndex: <UtxoTarget, OracleType, Index> - Index of Oracle Price UTxO
              - UtxoTarget: Enum - UTxO in reference inputs or outputs, include:
                - REF
                - OUT
                - IN
              - OracleType: Enum - Type of Oracle Price UTxO, include:
                - ORCFAX_FSP
                - ORCFAX_FS
                - LIQWID_MARKET_STATE
                - LIQWID_MARKET_PARAM
                - LIQWID_ORACLE_V1
                - LIQWID_ORACLE_V2
                - DANOGO_FLOAT_POOL
                - INDIGO
                - DJED
                - DANOGO_STAKING
                - MINSWAP_LP
                - SPLASH_LP_CFMM_G1
                - SPLASH_LP_CFMM_G2
                - SPLASH_LP_CFMM_G3
                - SPLASH_LP_STABLE
              - Index: Int - Index of Oracle Price UTxO in reference inputs or outputs
          - Prices: List\<OraclePrice\> - List of prices of collateralToken/borrowToken
            - OraclePrice: List\<(CalcType, prices)\> - Prices of each collateral token
              - CalcType: Int - 0: Normal, 1: Splash
          - Borrow Rates: List\<BorrowRate\> - List of borrow rates from Yield Protocols associated with Danogo Lending (e.g., Liqwid)
      required:
        - prices
      properties:
        prices:
          type: array
          minItems: 1
          maxItems: 50
          description: List of prices of token pairs (A/B)
          items:
            type: object
            required:
              - borrowToken
              - oraclePrices
            properties:
              borrowToken:
                type: string
                format: '{policyId}.{assetName}'
                nullable: false
                description: Token id of Borrow token
                example: >-
                  29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
              oraclePrices:
                type: array
                minItems: 1
                maxItems: 50
                description: Prices of each collateral token
                items:
                  type: object
                  required:
                    - collateralToken
                    - priceNum
                    - priceDen
                  properties:
                    collateralToken:
                      type: string
                      format: '{policyId}.{assetName}'
                      nullable: false
                      description: Token id of Collateral token
                      example: >-
                        29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
                    priceNum:
                      type: string
                      format: bigint
                      nullable: true
                      description: Numerator of Collateral token price in Supply token
                      example: '1231354'
                    priceDen:
                      type: string
                      format: bigint
                      nullable: true
                      description: Denominator of Collateral token price in Supply token
                      example: '1000000'
        borrowRates:
          type: array
          minItems: 1
          maxItems: 50
          description: >-
            List of borrow rates from Yield Protocols associated with Danogo
            Lending (e.g., Liqwid)
          items:
            type: object
            properties:
              yieldToken:
                type: string
                format: '{policyId}.{assetName}'
                nullable: false
                description: Token id of Yield token
                example: >-
                  29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
              borrowRate:
                type: integer
                nullable: false
                description: borrow rate in basis points
                example: '5000'
    OutputUTxO:
      type: object
      description: Output UTxO detail for building Transaction
      required:
        - coin
      properties:
        address:
          type: string
          format: bech32
          description: >-
            address of UTxO, set to null when it should be constructed using
            borrower information
          nullable: true
          example: >-
            addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
        coin:
          type: string
          format: bigint (lovelace)
          description: number ADA of utxo
          nullable: false
          example: '2000000'
        multiAssets:
          type: array
          minItems: 0
          maxItems: 100
          items:
            type: object
            required:
              - policyId
              - assets
            properties:
              policyId:
                type: string
                description: Policy Id of token
                nullable: false
                example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
              assets:
                type: array
                minItems: 1
                maxItems: 100
                items:
                  type: object
                  required:
                    - name
                    - value
                  properties:
                    name:
                      type: string
                      description: Asset Name of token
                      nullable: false
                      example: 4d494e
                    value:
                      type: string
                      format: bigint
                      description: Token amount
                      nullable: false
                      example: '123123123'
    MultiAssets:
      type: array
      minItems: 0
      maxItems: 100
      items:
        type: object
        required:
          - policyId
          - assets
        properties:
          policyId:
            type: string
            description: Policy Id of token
            nullable: false
            example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
          assets:
            type: array
            minItems: 1
            maxItems: 100
            items:
              type: object
              required:
                - name
                - value
              properties:
                name:
                  type: string
                  description: Asset Name of token
                  nullable: false
                  example: 4d494e
                value:
                  type: string
                  format: bigint
                  description: Token amount
                  nullable: false
                  example: '123123123'
    MintMultiAssets:
      type: array
      minItems: 0
      maxItems: 100
      items:
        type: object
        required:
          - policyId
          - assets
          - redeemerType
        properties:
          policyId:
            type: string
            description: Policy Id of token
            nullable: false
            example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
          assets:
            type: array
            minItems: 1
            maxItems: 100
            items:
              type: object
              required:
                - name
                - value
              properties:
                name:
                  type: string
                  description: Asset Name of token
                  nullable: false
                  example: 4d494e
                value:
                  type: string
                  format: bigint
                  description: Token amount
                  nullable: false
                  example: '123123123'
          redeemerType:
            type: string
            enum:
              - FIXED
              - FLOAT
              - FLOAT
              - STAKING
            description: >-
              Redeemer type, used when building the transaction; each type
              requires a different redeemer structure
            example: FIXED
    GovActionParams:
      type: object
      description: 'Parameters for Gov Action, used when building the transaction'
      properties:
        lastGuardrails:
          type: string
          description: >
            The optional guardrails script defined in the constitution. This
            script is executed by the ledger alongside the hard-coded ledger
            rules and applies only to PROTOCOL_PARAMETER_CHANGE and
            TREASURY_WITHDRAWALS proposals.
          example: fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64
        lastGuardrailsScriptOutRef:
          type: string
          description: >-
            The guardrails script has been put on a UTxO so that it can be used
            as reference script in Treasury Withdrawal and Protocol Parameter
            Change proposals. [See
            more](https://book.world.dev.cardano.org/env-mainnet.html#guardrails-reference-script-utxo)
          example: dc06746a898fd230f164f47a3d749348b65655b8fb388ff275f54d62891653e2#0
        lastEnactedNoConfidenceGovActionId:
          type: string
          description: The ID of the last enacted governance action of type NO_CONFIDENCE.
          example: 2a3745e4c2bada0d51d248aa3dacc9044d327280e7de4547a24464c064516d17#0
        lastEnactedUpdateCommitteeGovActionId:
          type: string
          description: >-
            The ID of the last enacted governance action of type
            UPDATE_COMMITTEE.
          example: 3d2745e5d3ebae0e51d649ab3d9de1145e8b01f5f6c4236f2854637c1d64b412#1
        lastEnactedNewConstitutionGovActionId:
          type: string
          description: >-
            The ID of the last enacted governance action of type
            NEW_CONSTITUTION.
          example: 5a6346f9d7b0c15c9a7fd9db7bcb429eff4bb12e5b1f6534e7bb2caa5174b283#2
        lastEnactedHardForkGovActionId:
          type: string
          description: >-
            The ID of the last enacted governance action of type
            HARD_FORK_INITIATION.
          example: 4b3742e3e0f7c21d52e21e62b6e1cdcefa1f6d8a1fdf933162519ffbe728f1a5#3
        lastEnactedProtocolParamChangeGovActionId:
          type: string
          description: >-
            The ID of the last enacted governance action of type
            PROTOCOL_PARAMETER_CHANGE.
          example: 6c1236b0c7a2b5c4f0b2d134ff8b1f341d8e3eaf37e6f26f15b30173b9939b17#4
        currentProtocolVersion:
          type: string
          description: The current protocol version in Cardano.
          example: 10
        committeeVotingThreshold:
          allOf:
            - title: Ratio
              description: Represents a ratio of a numerator and a denominator.
              type: object
              properties:
                numerator:
                  type: string
                  format: int64
                  description: The numerator of the ratio.
                  default: '0'
                denominator:
                  type: string
                  format: int64
                  description: The denominator of the ratio.
                  default: '1'
            - description: The voting threshold for committee approval
        protocolParameters:
          title: Cardano Protocol Parameters
          type: object
          properties:
            maxBlockBodySize:
              type: string
              format: int64
              description: Maximum size of a block body in bytes.
              example: '90112'
            maxTxSize:
              type: string
              format: int64
              description: Maximum size of a transaction in bytes.
              example: '16384'
            maxBlockHeaderSize:
              type: string
              format: int64
              description: Maximum size of a block header in bytes.
              example: '1100'
            maxValueSize:
              type: string
              format: int64
              description: Maximum value size in bytes.
              example: '5000'
            maxTxExecutionMemUnits:
              type: string
              format: int64
              description: Maximum memory units in a single transaction
              example: '14000000'
            maxTxExecutionStepUnits:
              type: string
              format: int64
              description: Maximum step units in a single transaction
              example: '10000000000'
            maxBlockExecutionMemUnits:
              type: string
              format: int64
              description: Maximum memory units in a single block
              example: '62000000'
            maxBlockExecutionStepUnits:
              type: string
              format: int64
              description: Maximum step units in a single block
              example: '20000000000'
            maxCollateralInputs:
              type: string
              format: int64
              description: Maximum number of collateral inputs in a single transaction.
              example: '3'
            txFeePerByte:
              type: string
              format: int64
              description: The fee per byte for transactions.
              example: '44'
            txFeeFixed:
              type: string
              format: int64
              description: The fixed fee for transactions.
              example: '155381'
            stakeAddressDeposit:
              type: string
              format: int64
              description: The deposit required for stake key registration.
              example: '2000000'
            stakePoolDeposit:
              type: string
              format: int64
              description: The deposit required for pool registration.
              example: '500000000'
            monetaryExpansion:
              allOf:
                - title: Ratio
                  description: Represents a ratio of a numerator and a denominator.
                  type: object
                  properties:
                    numerator:
                      type: string
                      format: int64
                      description: The numerator of the ratio.
                      default: '0'
                    denominator:
                      type: string
                      format: int64
                      description: The denominator of the ratio.
                      default: '1'
                - description: The rate of monetary expansion.
            treasuryCut:
              allOf:
                - title: Ratio
                  description: Represents a ratio of a numerator and a denominator.
                  type: object
                  properties:
                    numerator:
                      type: string
                      format: int64
                      description: The numerator of the ratio.
                      default: '0'
                    denominator:
                      type: string
                      format: int64
                      description: The denominator of the ratio.
                      default: '1'
                - description: The rate at which the treasury will grow over time.
            minPoolCost:
              type: string
              format: int64
              description: The minimum cost to maintain a pool.
              example: '170000000'
            utxoCostPerByte:
              type: string
              format: int64
              description: The minimum Lovelace deposit per byte for serialized UTxOs.
              example: '4310'
            executionMemUnitPrices:
              allOf:
                - title: Ratio
                  description: Represents a ratio of a numerator and a denominator.
                  type: object
                  properties:
                    numerator:
                      type: string
                      format: int64
                      description: The numerator of the ratio.
                      default: '0'
                    denominator:
                      type: string
                      format: int64
                      description: The denominator of the ratio.
                      default: '1'
                - description: Price for memory usage in script execution.
            executionStepUnitPrices:
              allOf:
                - title: Ratio
                  description: Represents a ratio of a numerator and a denominator.
                  type: object
                  properties:
                    numerator:
                      type: string
                      format: int64
                      description: The numerator of the ratio.
                      default: '0'
                    denominator:
                      type: string
                      format: int64
                      description: The denominator of the ratio.
                      default: '1'
                - description: Price for step execution in script execution.
            poolPledgeInfluence:
              allOf:
                - title: Ratio
                  description: Represents a ratio of a numerator and a denominator.
                  type: object
                  properties:
                    numerator:
                      type: string
                      format: int64
                      description: The numerator of the ratio.
                      default: '0'
                    denominator:
                      type: string
                      format: int64
                      description: The denominator of the ratio.
                      default: '1'
                - description: The influence of pool pledge on governance actions.
            poolRetireMaxEpoch:
              type: string
              format: int64
              description: The maximum epoch for pool retirement.
              example: '18'
            stakePoolTargetNum:
              type: string
              format: int64
              description: The desired number of stake pools in the system.
              example: '500'
            costModels:
              description: Cost model data for different versions of Plutus scripts.
              type: object
              properties:
                plutusV1:
                  type: array
                  description: >-
                    The cost model for Plutus v1 scripts, typically containing
                    166 integers representing resource usage costs.
                  items:
                    type: integer
                plutusV2:
                  type: array
                  description: >-
                    The cost model for Plutus v2 scripts, typically containing
                    175 integers representing resource usage costs.
                  items:
                    type: integer
                plutusV3:
                  type: array
                  description: >-
                    The cost model for Plutus v3 scripts, typically containing
                    223 integers representing resource usage costs.
                  items:
                    type: integer
            collateralPercentage:
              type: string
              format: int64
              description: The percentage of collateral required for scripts.
              example: '10'
            pvtMotionNoConfidence:
              type: number
              format: double
              example: 0.67
              description: The pool voting threshold for a motion of no confidence.
            pvtCommitteeNormal:
              type: number
              format: double
              example: 0.67
              description: >-
                The pool voting threshold for constitutional committee
                decisions.
            pvtCommitteeNoConfidence:
              type: number
              format: double
              example: 0.67
              description: >-
                The pool voting threshold for constitutional committee actions
                under no confidence.
            pvtHardForkInitiation:
              type: number
              format: double
              example: 0.67
              description: The pool voting threshold for approving a hard fork initiation.
            pvtPPSecurityGroup:
              type: number
              format: double
              example: 0.67
              description: >-
                The pool voting threshold for changes to the protocol parameters
                security group.
            dvtMotionNoConfidence:
              type: number
              format: double
              example: 0.67
              description: The drep voting threshold for a motion of no confidence.
            dvtCommitteeNormal:
              type: number
              format: double
              example: 0.67
              description: >-
                The drep voting threshold for constitutional committee
                decisions.
            dvtCommitteeNoConfidence:
              type: number
              format: double
              example: 0.67
              description: >-
                The drep voting threshold for constitutional committee actions
                under no confidence.
            dvtUpdateToConstitution:
              type: number
              format: double
              example: 0.67
              description: The drep voting threshold for approving constitutional changes.
            dvtHardForkInitiation:
              type: number
              format: double
              example: 0.67
              description: The drep voting threshold for approving a hard fork.
            dvtPPNetworkGroup:
              type: number
              format: double
              example: 0.67
              description: >-
                The drep voting threshold for changes to the protocol parameters
                network group.
            dvtPPEconomicGroup:
              type: number
              format: double
              example: 0.67
              description: >-
                The drep voting threshold for changes to the protocol parameters
                economic group.
            dvtPPTechnicalGroup:
              type: number
              format: double
              example: 0.67
              description: >-
                The drep voting threshold for changes to the protocol parameters
                technical group.
            dvtPPGovGroup:
              type: number
              format: double
              example: 0.67
              description: >-
                The drep voting threshold for changes to the protocol parameters
                governance group.
            dvtTreasuryWithdrawal:
              type: number
              format: double
              example: 0.67
              description: The drep voting threshold for treasury withdrawals.
            govActionLifetime:
              type: string
              format: int64
              description: >-
                The maximum lifetime of a governance action in epochs, after
                which it will be considered expired.
              example: '6'
            govActionDeposit:
              type: string
              format: int64
              description: The required deposit for submitting a governance action.
              example: '100000000000'
            dRepDeposit:
              type: string
              format: int64
              description: The deposit required for DRep registration.
              example: '500000000'
            dRepActivity:
              type: string
              format: int64
              description: >-
                The activity period in epochs before a DRep is considered
                inactive.
              example: '1000'
            committeeMinSize:
              type: string
              format: int64
              description: >-
                The minimum number of members required for a constitutional
                committee to function.
              example: '7'
            committeeMaxTermLength:
              type: string
              format: int64
              description: >-
                The maximum number of epochs a committee member can serve before
                their term expires.
              example: '146'
            minFeeRefScriptCostPerByte:
              allOf:
                - title: Ratio
                  description: Represents a ratio of a numerator and a denominator.
                  type: object
                  properties:
                    numerator:
                      type: string
                      format: int64
                      description: The numerator of the ratio.
                      default: '0'
                    denominator:
                      type: string
                      format: int64
                      description: The denominator of the ratio.
                      default: '1'
                - description: >-
                    The minimum fee charged per byte for reference scripts used
                    in transactions.
    paginationRequestBody:
      type: object
      properties:
        page:
          type: integer
          default: 1
          example: 1
          description: >-
            Current page, for high performance try to use pagination.offset
            instead!
        pageSize:
          type: integer
          nullable: false
          example: 10
          description: Page size
    baseApiResponse:
      title: generic message response
      type: object
      properties:
        code:
          type: integer
          description: 'response code, 200 is success, other code is not success'
        traceId:
          type: string
          description: >-
            Trace ID of the request (required when request is error).

            Trace ID is used to trace the root cause of the error quickly.

            - Why we need it?, please refer TDD:
            https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

            - Distributed tracing guideline:
            https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

            - Service mesh guideline:
            https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
        message:
          type: string
          description: response message
    protobufAny:
      title: protobufAny
      type: object
      properties:
        typeUrl:
          type: string
          description: >-
            A URL/resource name that uniquely identifies the type of the
            serialized

            protocol buffer message. This string must contain at least

            one "/" character. The last segment of the URL's path must represent

            the fully qualified name of the type (as in

            `path/google.protobuf.Duration`). The name should be in a canonical
            form

            (e.g., leading "." is not accepted).


            In practice, teams usually precompile into the binary all types that
            they

            expect it to use in the context of Any. However, for URLs which use
            the

            scheme `http`, `https`, or no scheme, one can optionally set up a
            type

            server that maps type URLs to message definitions as follows:


            * If no scheme is provided, `https` is assumed.

            * An HTTP GET on the URL must yield a [google.protobuf.Type][]
              value in binary format, or produce an error.
            * Applications are allowed to cache lookup results based on the
              URL, or have them precompiled into a binary to avoid any
              lookup. Therefore, binary compatibility needs to be preserved
              on changes to types. (Use versioned type names to manage
              breaking changes.)

            Note: this functionality is not currently available in the official

            protobuf release, and it is not used for type URLs beginning with

            type.googleapis.com.


            Schemes other than `http`, `https` (or the empty scheme) might be

            used with implementation specific semantics.
        value:
          pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$'
          type: string
          description: >-
            Must be a valid serialized protocol buffer of the above specified
            type.
          format: byte
      description: >-
        `Any` contains an arbitrary serialized protocol buffer message along
        with a

        URL that describes the type of the serialized message.


        Protobuf library provides support to pack/unpack Any values in the form

        of utility functions or additional generated methods of the Any type.


        Example 1: Pack and unpack a message in C++.

            Foo foo = ...;
            Any any;
            any.PackFrom(foo);
            ...
            if (any.UnpackTo(&foo)) {
              ...
            }

        Example 2: Pack and unpack a message in Java.

            Foo foo = ...;
            Any any = Any.pack(foo);
            ...
            if (any.is(Foo.class)) {
              foo = any.unpack(Foo.class);
            }

          Example 3: Pack and unpack a message in Python.

            foo = Foo(...)
            any = Any()
            any.Pack(foo)
            ...
            if any.Is(Foo.DESCRIPTOR):
              any.Unpack(foo)
              ...

          Example 4: Pack and unpack a message in Go

              foo := &pb.Foo{...}
              any, err := ptypes.MarshalAny(foo)
              ...
              foo := &pb.Foo{}
              if err := ptypes.UnmarshalAny(any, foo); err != nil {
                ...
              }

        The pack methods provided by protobuf library will by default use

        'type.googleapis.com/full.type.name' as the type URL and the unpack

        methods only use the fully qualified type name after the last '/'

        in the type URL, for example "foo.bar.com/x/y.z" will yield type

        name "y.z".



        JSON

        ====

        The JSON representation of an `Any` value uses the regular

        representation of the deserialized, embedded message, with an

        additional field `@type` which contains the type URL. Example:

            package google.profile;
            message Person {
              string first_name = 1;
              string last_name = 2;
            }

            {
              "@type": "type.googleapis.com/google.profile.Person",
              "firstName": <string>,
              "lastName": <string>
            }

        If the embedded message type is well-known and has a custom JSON

        representation, that representation will be embedded adding a field

        `value` which holds the custom JSON in addition to the `@type`

        field. Example (for message [google.protobuf.Duration][]):

            {
              "@type": "type.googleapis.com/google.protobuf.Duration",
              "value": "1.212s"
            }
    baseApiErrorProto:
      title: runtimeError
      x-stoplight:
        id: f63af62084983
      allOf:
        - title: generic message response
          type: object
          properties:
            code:
              type: integer
              description: 'response code, 200 is success, other code is not success'
            traceId:
              type: string
              description: >-
                Trace ID of the request (required when request is error).

                Trace ID is used to trace the root cause of the error quickly.

                - Why we need it?, please refer TDD:
                https://confluence.teko.vn/pages/viewpage.action?pageId=368467363

                - Distributed tracing guideline:
                https://confluence.teko.vn/display/PLAT/Code+example++Golang%2C+Python++for+distributed+tracing+with+Jaeger

                - Service mesh guideline:
                https://confluence.teko.vn/display/PLAT/Expose+metrics+for+kubernetes+services+by+service+mesh
            message:
              type: string
              description: response message
        - type: object
          properties:
            error:
              type: string
              deprecated: true
              description: do NOT use this field anymore! Use code & message instead!
            details:
              type: array
              items:
                title: protobufAny
                type: object
                properties:
                  typeUrl:
                    type: string
                    description: >-
                      A URL/resource name that uniquely identifies the type of
                      the serialized

                      protocol buffer message. This string must contain at least

                      one "/" character. The last segment of the URL's path must
                      represent

                      the fully qualified name of the type (as in

                      `path/google.protobuf.Duration`). The name should be in a
                      canonical form

                      (e.g., leading "." is not accepted).


                      In practice, teams usually precompile into the binary all
                      types that they

                      expect it to use in the context of Any. However, for URLs
                      which use the

                      scheme `http`, `https`, or no scheme, one can optionally
                      set up a type

                      server that maps type URLs to message definitions as
                      follows:


                      * If no scheme is provided, `https` is assumed.

                      * An HTTP GET on the URL must yield a
                      [google.protobuf.Type][]
                        value in binary format, or produce an error.
                      * Applications are allowed to cache lookup results based
                      on the
                        URL, or have them precompiled into a binary to avoid any
                        lookup. Therefore, binary compatibility needs to be preserved
                        on changes to types. (Use versioned type names to manage
                        breaking changes.)

                      Note: this functionality is not currently available in the
                      official

                      protobuf release, and it is not used for type URLs
                      beginning with

                      type.googleapis.com.


                      Schemes other than `http`, `https` (or the empty scheme)
                      might be

                      used with implementation specific semantics.
                  value:
                    pattern: >-
                      ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
                    type: string
                    description: >-
                      Must be a valid serialized protocol buffer of the above
                      specified type.
                    format: byte
                description: >-
                  `Any` contains an arbitrary serialized protocol buffer message
                  along with a

                  URL that describes the type of the serialized message.


                  Protobuf library provides support to pack/unpack Any values in
                  the form

                  of utility functions or additional generated methods of the
                  Any type.


                  Example 1: Pack and unpack a message in C++.

                      Foo foo = ...;
                      Any any;
                      any.PackFrom(foo);
                      ...
                      if (any.UnpackTo(&foo)) {
                        ...
                      }

                  Example 2: Pack and unpack a message in Java.

                      Foo foo = ...;
                      Any any = Any.pack(foo);
                      ...
                      if (any.is(Foo.class)) {
                        foo = any.unpack(Foo.class);
                      }

                    Example 3: Pack and unpack a message in Python.

                      foo = Foo(...)
                      any = Any()
                      any.Pack(foo)
                      ...
                      if any.Is(Foo.DESCRIPTOR):
                        any.Unpack(foo)
                        ...

                    Example 4: Pack and unpack a message in Go

                        foo := &pb.Foo{...}
                        any, err := ptypes.MarshalAny(foo)
                        ...
                        foo := &pb.Foo{}
                        if err := ptypes.UnmarshalAny(any, foo); err != nil {
                          ...
                        }

                  The pack methods provided by protobuf library will by default
                  use

                  'type.googleapis.com/full.type.name' as the type URL and the
                  unpack

                  methods only use the fully qualified type name after the last
                  '/'

                  in the type URL, for example "foo.bar.com/x/y.z" will yield
                  type

                  name "y.z".



                  JSON

                  ====

                  The JSON representation of an `Any` value uses the regular

                  representation of the deserialized, embedded message, with an

                  additional field `@type` which contains the type URL. Example:

                      package google.profile;
                      message Person {
                        string first_name = 1;
                        string last_name = 2;
                      }

                      {
                        "@type": "type.googleapis.com/google.profile.Person",
                        "firstName": <string>,
                        "lastName": <string>
                      }

                  If the embedded message type is well-known and has a custom
                  JSON

                  representation, that representation will be embedded adding a
                  field

                  `value` which holds the custom JSON in addition to the `@type`

                  field. Example (for message [google.protobuf.Duration][]):

                      {
                        "@type": "type.googleapis.com/google.protobuf.Duration",
                        "value": "1.212s"
                      }
    paginationResponse:
      type: object
      properties:
        page:
          type: integer
          format: int32
          description: 'Current page, start from 1'
          nullable: false
          example: 1
        pageSize:
          type: integer
          format: int32
          description: Page size
          nullable: false
          example: 10
        total:
          type: integer
          format: int32
          description: Total items
          nullable: false
          example: 1
      required:
        - page
        - pageSize
        - total
    output_utxo:
      title: UTxO model
      type: object
      description: UTxO detail for building Transaction
      required:
        - address
        - coin
      properties:
        address:
          type: string
          format: bech32
          description: address of UTxO
          nullable: false
          example: >-
            addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
        coin:
          type: string
          format: bigint (lovelace)
          description: number ADA of utxo
          nullable: false
          example: '2000000'
        multiAssets:
          type: array
          minItems: 0
          maxItems: 100
          items:
            type: object
            required:
              - policyId
              - assets
            properties:
              policyId:
                type: string
                description: Policy Id of token
                nullable: false
                example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
              assets:
                type: array
                minItems: 1
                maxItems: 100
                items:
                  type: object
                  required:
                    - name
                    - value
                  properties:
                    name:
                      type: string
                      description: Asset Name of token
                      nullable: false
                      example: 4d494e
                    value:
                      type: string
                      format: bigint
                      description: Token amount
                      nullable: false
                      example: '123123123'
    utxo:
      title: UTxO model
      type: object
      description: UTxO detail for building Transaction
      allOf:
        - title: UTxO model
          type: object
          description: UTxO detail for building Transaction
          required:
            - address
            - coin
          properties:
            address:
              type: string
              format: bech32
              description: address of UTxO
              nullable: false
              example: >-
                addr1q8ql0key4tj6gqq707rjwqpm26h5swmsjdgcma6u9qjj5xk722ldtah02wt8x9ccvm5qzjt099ctyd0fxlj0r8wsgyqskj6066
            coin:
              type: string
              format: bigint (lovelace)
              description: number ADA of utxo
              nullable: false
              example: '2000000'
            multiAssets:
              type: array
              minItems: 0
              maxItems: 100
              items:
                type: object
                required:
                  - policyId
                  - assets
                properties:
                  policyId:
                    type: string
                    description: Policy Id of token
                    nullable: false
                    example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
                  assets:
                    type: array
                    minItems: 1
                    maxItems: 100
                    items:
                      type: object
                      required:
                        - name
                        - value
                      properties:
                        name:
                          type: string
                          description: Asset Name of token
                          nullable: false
                          example: 4d494e
                        value:
                          type: string
                          format: bigint
                          description: Token amount
                          nullable: false
                          example: '123123123'
        - type: object
          properties:
            outRef:
              type: string
              format: '{transactionHash}#{index}'
              description: Output Reference of UTxO
              nullable: false
              example: >-
                884b4ba2436aac16bc38d667a19ae2cba2f2bc3e30235e07e47c7c2cda817182#0
    token-metadata:
      title: tokenMetadata
      type: object
      description: CIP-25 token metadata
      required:
        - name
        - image
      properties:
        name:
          type: string
          description: Display name of token
          nullable: false
          example: pDJED
        image:
          type: string
          description: Image URL of token on ipfs
          nullable: false
          example: 'ipfs://bafybeidx7wy2bclp6bhbvbmtuwmhx4jvrvt6lrbntinjyxlte47kwh63'
        description:
          type: string
          description: Description of token
          nullable: true
          example: >-
            qADA is an interest bearing token minted upon deposit into the
            Liqwid ADA market and burned when redeemed.
    Ratio:
      title: Ratio
      description: Represents a ratio of a numerator and a denominator.
      type: object
      properties:
        numerator:
          type: string
          format: int64
          description: The numerator of the ratio.
          default: '0'
        denominator:
          type: string
          format: int64
          description: The denominator of the ratio.
          default: '1'
    CostModels:
      description: Cost model data for different versions of Plutus scripts.
      type: object
      properties:
        plutusV1:
          type: array
          description: >-
            The cost model for Plutus v1 scripts, typically containing 166
            integers representing resource usage costs.
          items:
            type: integer
        plutusV2:
          type: array
          description: >-
            The cost model for Plutus v2 scripts, typically containing 175
            integers representing resource usage costs.
          items:
            type: integer
        plutusV3:
          type: array
          description: >-
            The cost model for Plutus v3 scripts, typically containing 223
            integers representing resource usage costs.
          items:
            type: integer
    ProtocolParameters:
      title: Cardano Protocol Parameters
      type: object
      properties:
        maxBlockBodySize:
          type: string
          format: int64
          description: Maximum size of a block body in bytes.
          example: '90112'
        maxTxSize:
          type: string
          format: int64
          description: Maximum size of a transaction in bytes.
          example: '16384'
        maxBlockHeaderSize:
          type: string
          format: int64
          description: Maximum size of a block header in bytes.
          example: '1100'
        maxValueSize:
          type: string
          format: int64
          description: Maximum value size in bytes.
          example: '5000'
        maxTxExecutionMemUnits:
          type: string
          format: int64
          description: Maximum memory units in a single transaction
          example: '14000000'
        maxTxExecutionStepUnits:
          type: string
          format: int64
          description: Maximum step units in a single transaction
          example: '10000000000'
        maxBlockExecutionMemUnits:
          type: string
          format: int64
          description: Maximum memory units in a single block
          example: '62000000'
        maxBlockExecutionStepUnits:
          type: string
          format: int64
          description: Maximum step units in a single block
          example: '20000000000'
        maxCollateralInputs:
          type: string
          format: int64
          description: Maximum number of collateral inputs in a single transaction.
          example: '3'
        txFeePerByte:
          type: string
          format: int64
          description: The fee per byte for transactions.
          example: '44'
        txFeeFixed:
          type: string
          format: int64
          description: The fixed fee for transactions.
          example: '155381'
        stakeAddressDeposit:
          type: string
          format: int64
          description: The deposit required for stake key registration.
          example: '2000000'
        stakePoolDeposit:
          type: string
          format: int64
          description: The deposit required for pool registration.
          example: '500000000'
        monetaryExpansion:
          allOf:
            - title: Ratio
              description: Represents a ratio of a numerator and a denominator.
              type: object
              properties:
                numerator:
                  type: string
                  format: int64
                  description: The numerator of the ratio.
                  default: '0'
                denominator:
                  type: string
                  format: int64
                  description: The denominator of the ratio.
                  default: '1'
            - description: The rate of monetary expansion.
        treasuryCut:
          allOf:
            - title: Ratio
              description: Represents a ratio of a numerator and a denominator.
              type: object
              properties:
                numerator:
                  type: string
                  format: int64
                  description: The numerator of the ratio.
                  default: '0'
                denominator:
                  type: string
                  format: int64
                  description: The denominator of the ratio.
                  default: '1'
            - description: The rate at which the treasury will grow over time.
        minPoolCost:
          type: string
          format: int64
          description: The minimum cost to maintain a pool.
          example: '170000000'
        utxoCostPerByte:
          type: string
          format: int64
          description: The minimum Lovelace deposit per byte for serialized UTxOs.
          example: '4310'
        executionMemUnitPrices:
          allOf:
            - title: Ratio
              description: Represents a ratio of a numerator and a denominator.
              type: object
              properties:
                numerator:
                  type: string
                  format: int64
                  description: The numerator of the ratio.
                  default: '0'
                denominator:
                  type: string
                  format: int64
                  description: The denominator of the ratio.
                  default: '1'
            - description: Price for memory usage in script execution.
        executionStepUnitPrices:
          allOf:
            - title: Ratio
              description: Represents a ratio of a numerator and a denominator.
              type: object
              properties:
                numerator:
                  type: string
                  format: int64
                  description: The numerator of the ratio.
                  default: '0'
                denominator:
                  type: string
                  format: int64
                  description: The denominator of the ratio.
                  default: '1'
            - description: Price for step execution in script execution.
        poolPledgeInfluence:
          allOf:
            - title: Ratio
              description: Represents a ratio of a numerator and a denominator.
              type: object
              properties:
                numerator:
                  type: string
                  format: int64
                  description: The numerator of the ratio.
                  default: '0'
                denominator:
                  type: string
                  format: int64
                  description: The denominator of the ratio.
                  default: '1'
            - description: The influence of pool pledge on governance actions.
        poolRetireMaxEpoch:
          type: string
          format: int64
          description: The maximum epoch for pool retirement.
          example: '18'
        stakePoolTargetNum:
          type: string
          format: int64
          description: The desired number of stake pools in the system.
          example: '500'
        costModels:
          description: Cost model data for different versions of Plutus scripts.
          type: object
          properties:
            plutusV1:
              type: array
              description: >-
                The cost model for Plutus v1 scripts, typically containing 166
                integers representing resource usage costs.
              items:
                type: integer
            plutusV2:
              type: array
              description: >-
                The cost model for Plutus v2 scripts, typically containing 175
                integers representing resource usage costs.
              items:
                type: integer
            plutusV3:
              type: array
              description: >-
                The cost model for Plutus v3 scripts, typically containing 223
                integers representing resource usage costs.
              items:
                type: integer
        collateralPercentage:
          type: string
          format: int64
          description: The percentage of collateral required for scripts.
          example: '10'
        pvtMotionNoConfidence:
          type: number
          format: double
          example: 0.67
          description: The pool voting threshold for a motion of no confidence.
        pvtCommitteeNormal:
          type: number
          format: double
          example: 0.67
          description: The pool voting threshold for constitutional committee decisions.
        pvtCommitteeNoConfidence:
          type: number
          format: double
          example: 0.67
          description: >-
            The pool voting threshold for constitutional committee actions under
            no confidence.
        pvtHardForkInitiation:
          type: number
          format: double
          example: 0.67
          description: The pool voting threshold for approving a hard fork initiation.
        pvtPPSecurityGroup:
          type: number
          format: double
          example: 0.67
          description: >-
            The pool voting threshold for changes to the protocol parameters
            security group.
        dvtMotionNoConfidence:
          type: number
          format: double
          example: 0.67
          description: The drep voting threshold for a motion of no confidence.
        dvtCommitteeNormal:
          type: number
          format: double
          example: 0.67
          description: The drep voting threshold for constitutional committee decisions.
        dvtCommitteeNoConfidence:
          type: number
          format: double
          example: 0.67
          description: >-
            The drep voting threshold for constitutional committee actions under
            no confidence.
        dvtUpdateToConstitution:
          type: number
          format: double
          example: 0.67
          description: The drep voting threshold for approving constitutional changes.
        dvtHardForkInitiation:
          type: number
          format: double
          example: 0.67
          description: The drep voting threshold for approving a hard fork.
        dvtPPNetworkGroup:
          type: number
          format: double
          example: 0.67
          description: >-
            The drep voting threshold for changes to the protocol parameters
            network group.
        dvtPPEconomicGroup:
          type: number
          format: double
          example: 0.67
          description: >-
            The drep voting threshold for changes to the protocol parameters
            economic group.
        dvtPPTechnicalGroup:
          type: number
          format: double
          example: 0.67
          description: >-
            The drep voting threshold for changes to the protocol parameters
            technical group.
        dvtPPGovGroup:
          type: number
          format: double
          example: 0.67
          description: >-
            The drep voting threshold for changes to the protocol parameters
            governance group.
        dvtTreasuryWithdrawal:
          type: number
          format: double
          example: 0.67
          description: The drep voting threshold for treasury withdrawals.
        govActionLifetime:
          type: string
          format: int64
          description: >-
            The maximum lifetime of a governance action in epochs, after which
            it will be considered expired.
          example: '6'
        govActionDeposit:
          type: string
          format: int64
          description: The required deposit for submitting a governance action.
          example: '100000000000'
        dRepDeposit:
          type: string
          format: int64
          description: The deposit required for DRep registration.
          example: '500000000'
        dRepActivity:
          type: string
          format: int64
          description: The activity period in epochs before a DRep is considered inactive.
          example: '1000'
        committeeMinSize:
          type: string
          format: int64
          description: >-
            The minimum number of members required for a constitutional
            committee to function.
          example: '7'
        committeeMaxTermLength:
          type: string
          format: int64
          description: >-
            The maximum number of epochs a committee member can serve before
            their term expires.
          example: '146'
        minFeeRefScriptCostPerByte:
          allOf:
            - title: Ratio
              description: Represents a ratio of a numerator and a denominator.
              type: object
              properties:
                numerator:
                  type: string
                  format: int64
                  description: The numerator of the ratio.
                  default: '0'
                denominator:
                  type: string
                  format: int64
                  description: The denominator of the ratio.
                  default: '1'
            - description: >-
                The minimum fee charged per byte for reference scripts used in
                transactions.
    utxo-ref-script:
      title: Reference script in UTxO
      type: object
      properties:
        refScriptCborHex:
          type: string
          nullable: true
          description: CBOR hex of reference script
          example: >-
            5906da5906d7010100332229800aba2aba1aba0aab9faab9e4c011e581cc231b60979e8c856256695139ce0251eb55a05e842050b8167e8d5600001
        refScriptHash:
          type: string
          nullable: true
          description: Script hash of reference script
          example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6
