Swivel
Annotated source of the Swivel.sol smart contract
Swivel
Contents
Globals
Note this list contains both internal and external attributes
Modifiers
authorized
Restricts msg.sender
as the only viable caller of a method
Declaration
Functions
constructor
Declaration
Modifiers:
No modifiers
Args:
initiate
Allows a user to initiate a position
Declaration
Modifiers:
No modifiers
Args:
initiateVaultFillingZcTokenInitiate
Allows a user to initiate a Vault by filling an offline zcToken initiate order
This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.custodialInitiate
Declaration
Modifiers:
No modifiers
Args:
initiateZcTokenFillingVaultInitiate
Allows a user to initiate a zcToken by filling an offline vault initiate order
This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.custodialInitiate
Declaration
Modifiers:
No modifiers
Args:
initiateZcTokenFillingZcTokenExit
Allows a user to initiate zcToken? by filling an offline zcToken exit order
This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.p2pZcTokenExchange
Declaration
Modifiers:
No modifiers
Args:
initiateVaultFillingVaultExit
Allows a user to initiate a Vault by filling an offline vault exit order
This method should pass (underlying, maturity, maker, sender, principalFilled) to MarketPlace.p2pVaultExchange
Declaration
Modifiers:
No modifiers
Args:
exit
Allows a user to exit (sell) a currently held position to the marketplace.
Declaration
Modifiers:
No modifiers
Args:
exitZcTokenFillingZcTokenInitiate
Allows a user to exit their zcTokens by filling an offline zcToken initiate order
This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.p2pZcTokenExchange
Declaration
Modifiers:
No modifiers
Args:
exitVaultFillingVaultInitiate
Allows a user to exit their Vault by filling an offline vault initiate order
This method should pass (underlying, maturity, sender, maker, a) to MarketPlace.p2pVaultExchange
Declaration
Modifiers:
No modifiers
Args:
exitVaultFillingZcTokenExit
Allows a user to exit their Vault filling an offline zcToken exit order
This method should pass (underlying, maturity, maker, sender, a) to MarketPlace.exitFillingExit
Declaration
Modifiers:
No modifiers
Args:
exitZcTokenFillingVaultExit
Allows a user to exit their zcTokens by filling an offline vault exit order
This method should pass (underlying, maturity, sender, maker, principalFilled) to MarketPlace.exitFillingExit
Declaration
Modifiers:
No modifiers
Args:
cancel
Allows a user to cancel an order, preventing it from being filled in the future
Declaration
Modifiers:
No modifiers
Args:
setAdmin
Sets the admin
Declaration
Modifiers:
Args:
scheduleWithdrawal
Allows the admin to schedule the withdrawal of tokens
Declaration
Modifiers:
Args:
scheduleApproval
Allows the admin to schedule the approval of tokens
Declaration
Modifiers:
Args:
scheduleFeeChange
allows the admin to schedule a change to the fee denominators
Declaration
Modifiers:
Args:
blockWithdrawal
Emergency function to block unplanned withdrawals
Declaration
Modifiers:
Args:
blockApproval
Emergency function to block unplanned approvals
Declaration
Modifiers:
Args:
blockFeeChange
Emergency function to block unplanned changes to fee structure
Declaration
Modifiers:
withdraw
Allows the admin to withdraw the given token, provided the holding period has been observed
Declaration
Modifiers:
Args:
changeFee
allows the admin to set new fee denominators
note that, since 0 values are allowable the way to leave a feenominator value unchanged is to pass the existing value
Declaration
Modifiers:
Args:
approveUnderlying
Allows the admin to bulk approve given compounding addresses at the underlying token, saving marginal approvals, providing the holding period has been observed
Declaration
Modifiers:
Args:
splitUnderlying
Allows users to deposit underlying and in the process split it into/mint zcTokens and vault notional. Calls mPlace.mintZcTokenAddingNotional
Declaration
Modifiers:
No modifiers
Args:
combineTokens
Allows users deposit/burn 1-1 amounts of both zcTokens and vault notional, in the process "combining" the two, and redeeming underlying. Calls mPlace.burnZcTokenRemovingNotional.
Declaration
Modifiers:
No modifiers
Args:
authRedeem
Allows MarketPlace to complete its contractual obligation as IRedeemer, redeeming zcTokens and withdrawing underlying p Protocol Enum value associated with this market pair
Note that this bubbles up from the zcToken instead of starting on Swivel (as per the ERC5095)
Declaration
Modifiers:
Args:
redeemZcToken
Allows zcToken holders to redeem their tokens for underlying tokens after maturity has been reached (via MarketPlace).
Declaration
Modifiers:
No modifiers
Args:
redeemVaultInterest
Allows Vault owners to redeem any currently accrued interest (via MarketPlace)
Declaration
Modifiers:
No modifiers
Args:
redeemSwivelVaultInterest
Allows Swivel to redeem any currently accrued interest (via MarketPlace)
Declaration
Modifiers:
No modifiers
Args:
validOrderHash
Verifies the validity of an order and it's signature.
Declaration
Modifiers:
No modifiers
Args:
Returns:
deposit
Use the Protocol Enum to direct deposit type transactions to their specific library abstraction
This functionality is an abstraction used by
IVFZI
,IZFVI
andsplitUnderlying
Declaration
Modifiers:
No modifiers
Args:
withdraw
Use the Protocol Enum to direct withdraw type transactions to their specific library abstraction
This functionality is an abstraction used by
EVFZE
,EZFVE
,combineTokens
,redeemZcToken
andredeemVaultInterest
. Note that while there is an external methodwithdraw
also on this contract the unique method signatures (and visibility) exclude any possible clashing
Declaration
Modifiers:
No modifiers
Args:
Events
Cancel
Emitted on order cancellation
Initiate
Emitted on any initiate*
filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true)
Exit
Emitted on any exit*
filled is 'principalFilled' when (vault:false, exit:false) && (vault:true, exit:true) filled is 'premiumFilled' when (vault:true, exit:false) && (vault:false, exit:true)
ScheduleWithdrawal
Emitted on token withdrawal scheduling
ScheduleApproval
Emitted on token approval scheduling
ScheduleFeeChange
Emitted on fee change scheduling
BlockWithdrawal
Emitted on token withdrawal blocking
BlockApproval
Emitted on token approval blocking
BlockFeeChange
Emitted on fee change blocking
ChangeFee
Emitted on a change to the fee structure
SetAdmin
Emitted on a change of the admin
Last updated