VaultTracker

Annotated source code of the VaultTracker.sol smart contract

constructor

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

Parameters:

NameTypeDescription

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:

NameTypeDescription

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:

NameTypeDescription

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:

NameTypeDescription

o

address

Address that owns a vault

matureVault

  function matureVault(
    uint256 c
  ) external returns (bool)

Matures the vault

Parameters:

NameTypeDescription

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:

NameTypeDescription

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:

NameTypeDescription

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:

NameTypeDescription

o

address

Address that owns a vault

Last updated