MarketPlace
Annotated source code of the MarketPlace.sol smart contract
Last updated
Annotated source code of the MarketPlace.sol smart contract
Last updated
We only allow this to be set once
Parameters:
Name | Type | Description |
---|---|---|
Parameters:
Name | Type | Description |
---|---|---|
Allows the owner to create new markets
Parameters:
Can be called after maturity, allowing all of the zcTokens to earn floating interest on Compound until they release their funds
Parameters:
Allows Swivel caller to deposit their underlying, in the process splitting it - minting both zcTokens and vault notional.
Parameters:
Allows Swivel caller to deposit/burn both zcTokens + vault notional. This process is "combining" the two and redeeming underlying.
Parameters:
Allows (via swivel) zcToken holders to redeem their tokens for underlying tokens after maturity has been reached.
Parameters:
Allows Vault owners (via Swivel) to redeem any currently accrued interest
Parameters:
Calculates the total amount of underlying returned including interest generated since the matureMarket
function has been called
Parameters:
Return the ctoken address for a given market
Parameters:
Called by swivel IVFZI && IZFVI
Call with underlying, maturity, mint-target, add-notional-target and an amount
Parameters:
Called by swivel EVFZE FF EZFVE
Call with underlying, maturity, burn-target, remove-notional-target and an amount
Parameters:
Called by swivel IZFZE, EZFZI
Call with underlying, maturity, transfer-from, transfer-to, amount
Parameters:
Called by swivel IVFVE, EVFVI
Call with underlying, maturity, remove-from, add-to, amount
Parameters:
External method giving access to this functionality within a given vault
Note that this method calculates yield and interest as well
Parameters:
Transfers notional fee to the Swivel contract without recalculating marginal interest for from
Parameters:
Called by admin at any point to pause / unpause market transactions
Parameters:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
s
address
Address of the deployed swivel contract
a
address
Address of a new admin
m
uint256
Maturity timestamp of the new market
c
address
cToken address associated with underlying for the new market
n
string
Name of the new zcToken market
s
string
Symbol of the new zcToken market
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
t
address
Address of the depositing user
a
uint256
Amount of notional being added
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
t
address
Address of the combining/redeeming user
a
uint256
Amount of zcTokens being burned
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
t
address
Address of the redeeming user
a
uint256
Amount of zcTokens being redeemed
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
t
address
Address of the redeeming user
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
a
uint256
Amount of zcTokens being redeemed
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
z
address
Recipient of the minted zcToken
n
address
Recipient of the added notional
a
uint256
Amount of zcToken minted and notional added
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
z
address
Owner of the zcToken to be burned
n
address
Target to remove notional from
a
uint256
Amount of zcToken burned and notional removed
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
f
address
Owner of the zcToken to be burned
t
address
Target to be minted to
a
uint256
Amount of zcToken transfer
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
f
address
Owner of the notional to be transferred
t
address
Target to be transferred to
a
uint256
Amount of notional transfer
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
t
address
Target to be transferred to
a
uint256
Amount of notional to be transferred
u
address
Underlying token address associated with the market
m
uint256
Maturity timestamp of the market
f
address
Owner of the amount
a
uint256
Amount to transfer
b
bool
Boolean which indicates the markets paused status