LogoLogo
Swivel v2.0.0
Swivel v2.0.0
  • Swivel Finance Documentation
  • Litepaper
    • zcTokens
      • Exiting/Selling zcTokens
      • Secondary AMM's
    • nTokens
      • Exiting/Selling nTokens
    • AMM vs. Orderbook
  • Swivel Exchange
    • Testnet Setup
    • Exchange Functions
      • Fixed-Yield Lending
      • Purchasing nTokens
      • Selling zcTokens
      • Selling nTokens
      • Splitting/Combining Tokens
      • Redeeming Tokens/Interest
    • Maturity
    • Liquidity Incentives
    • Minimums, Rate Limits & Fees
    • Retroactive Distribution
    • How to Claim SWIV Tokens
  • Developers
    • Exchange API
      • GET
        • Orderbook
        • Get Order
        • OHCLV (Candles)
        • Get Effective Price (Preview Market Order)
        • Get Order History
        • Get Last Trade Info
        • Get Markets
      • POST
        • Order
    • Swivel.js
      • API
        • Swivel
        • MarketPlace
        • VaultTracker
    • Swivel.py
      • swivel
        • swivel.abstracts
          • swivel.abstracts.deployed
          • swivel.abstracts.market_place
          • swivel.abstracts.swivel
          • swivel.abstracts.vault_tracker
        • swivel.contracts
          • swivel.contracts.market_place
          • swivel.contracts.swivel
          • swivel.contracts.vault_tracker
        • swivel.vendors
          • swivel.vendors.signer
          • swivel.vendors.w3
    • Scrivel (Python Examples)
    • Contracts Overview
      • Contracts
        • Swivel
        • MarketPlace
        • VaultTracker
    • Ubiquitous Language V2
      • Shared Language
      • UI Language
      • Technical Language
      • Compound Language
      • Finance Terms
  • Community & Media
  • Other Resources
    • Institutions
      • Rate Profile Optimization
        • Instruments and Participants
        • Market Opportunities and Pricing
        • Counterparty Risk Management
        • Benefits and drawbacks of standardization
        • User Needs
          • Corporate Treasury and Funding
          • Institutional Investors and Asset Managers
          • Speculators and Proprietary Trading Functions
          • Brokers and Market Makers
          • Liquidity Management, Funding and Resource Management
          • Risk Management and Insurance
          • Smaller Institutions and Individuals
      • Swivel for Enterprise
        • Overview
        • How Swivel works
        • Flexible Order Book
        • Future Developments
      • Delegated Credit
        • Challenges of Delegated Credit
          • Credit Pools
          • Intermediating Trust in Credit Delegation
Powered by GitBook
On this page
  • constructor
  • Parameters:
  • addNotional
  • Parameters:
  • removeNotional
  • Parameters:
  • redeemInterest
  • Parameters:
  • matureVault
  • Parameters:
  • transferNotionalFrom
  • Parameters:
  • transferNotionalFee
  • Parameters:
  • balancesOf
  • Parameters:
  1. Developers
  2. Contracts Overview
  3. Contracts

VaultTracker

Annotated source code of the VaultTracker.sol smart contract

constructor

  function constructor(
    uint256 m,
    address c,
    address s
  ) public

Parameters:

Name
Type
Description

m

uint256

Maturity timestamp of the new market

c

address

cToken address associated with underlying for the new market

s

address

address of the deployed swivel contract

addNotional

  function addNotional(
    address o,
    uint256 a
  ) external returns (bool)

Adds notional to a given address

Parameters:

Name
Type
Description

o

address

Address that owns a vault

a

uint256

Amount of notional added

removeNotional

  function removeNotional(
    address o,
    uint256 a
  ) external returns (bool)

Removes notional from a given address

Parameters:

Name
Type
Description

o

address

Address that owns a vault

a

uint256

Amount of notional to remove

redeemInterest

  function redeemInterest(
    address o
  ) external returns (uint256)

Redeem's interest accrued by a given address

Parameters:

Name
Type
Description

o

address

Address that owns a vault

matureVault

  function matureVault(
    uint256 c
  ) external returns (bool)

Matures the vault

Parameters:

Name
Type
Description

c

uint256

The current cToken exchange rate

transferNotionalFrom

  function transferNotionalFrom(
    address f,
    address t,
    uint256 a
  ) external returns (bool)

Transfers notional from one address to another

Parameters:

Name
Type
Description

f

address

Owner of the amount

t

address

Recipient of the amount

a

uint256

Amount to transfer

transferNotionalFee

  function transferNotionalFee(
    address f,
    uint256 a
  ) external returns (bool)

Transfers, in notional, a fee payment to the Swivel contract without recalculating marginal interest for the owner

Parameters:

Name
Type
Description

f

address

Owner of the amount

a

uint256

Amount to transfer

balancesOf

  function balancesOf(
    address o
  ) external returns (uint256, uint256)

Returns both relevant balances for a given user's vault

Parameters:

Name
Type
Description

o

address

Address that owns a vault

PreviousMarketPlaceNextUbiquitous Language V2

Last updated 2 years ago