Notes

icon picker
Swivel Finance

Swivel is a lending protocol and its uniqueness comes from its tokenized cash-flow model.

Tokenizing Cash-Flows

Swivel provides lenders the ability to split an interest generating token into two separate cash-flow tokens until a future date. One token representing the future yield generated (nTokens, or in the way I like to remember it, interestToken), and another representing ownership of an underlying token, redeemable at that future date (zcTokens).
Basically, Swivel isolates the yield (interest) portion and underlying asset portion of the interest-compounding function out, and built a money-lego structure. More detail see below.

zcTokens

Zero-coupon tokens, or zcTokens, are ERC-20's which are redeemable 1:1 at maturity for an underlying token. As users lock-in fixed yields, their deposit is split into zcTokens and nTokens and the the nTokens minted are sold to fuel a fixed-yield.
This leaves the lender with an immediate fixed-yield and their minted zcTokens → see below
The pricing of zcTokens are quite standard: it is discounted at a rate based on the predicted amount of interest that may have otherwise been generated until the maturity/redemption date (the nToken price).
Accepting that this potential yield decreases as time passes, zcTokens appreciate towards par and reach par as maturity is reached. On maturity and forward, zcTokens’s price rise above par according to interest compounding in any normal market until redeemed.
Note that mathematically speaking, the discount of zcTokens is inversely proportional to the price of nToken. This is governed by the discount formula. Again, very standard

nTokens

Notional Tokens, or nTokens, are contained in Swivel’s vault, which represents the claim to the underlying yield. When a user buys nTokens (equivalent to borrowing with collateral), they create a vault that tracks their balances within a given market.
Each vault contains two balances, Notional and Redeemable.

Notional (nTokens)

Notional Tokens (nTokens) represent a 1-1 deposit, currently generating interest in an underlying protocol. Once maturity has been reached, interest-generation ceases and nTokens become worthless. As such, nTokens are deprecating assets that experience time-decay. As time passes, nTokens decrease in value, and as they approach maturity, their value approaches 0.

Redeemable

The Redeemable represents the amount of accrued interest currently available to redeem. As users interact with their vault, interest is accumulated to the redeemable balance, and this balance can be redeemed at any time.

Using Swivel Finance

Core: Swivel Finance’s tokenized cash-flow model provides greater flexibility as it is composable, like a lego.
We will go over some examples of how this design is applied to various DeFi activities.
Fixed-Yield Lending Example
Note that by design, lenders will earn immediate yield from lending
Suppose market rate is r = 5%.
Sakurajima has 1000 UST
Kato wants to borrow 1000 UST. To do so, Kato needs to pay 1000*5% = 50 UST upfront, as this is the depreciated value of this lended 1000 UST. This is the immediate yield.
Sakurajima fills Kato’s order, splitting 1k UST into 1k nUST and 1k zcUST
Sakurajima exchanges 1k nUST for the 50 UST from Kato
Sakurajima now has 1000 zcUST and 50 UST. At maturity, Sakurajima can redeem 1000 zcUST for 1000 UST
At the end, Sakurajima has 1050 UST

Exiting/Selling zcTokens
As rates fluctuate, market participants can exit zcToken positions by purchasing nTokens and redeem underlying asset. Again r = 5%
Sakurajima has 1000 zcUSDC.
Kato has 1000 nUSDC
Sakurajima buys Kato’s 1000 nUSDC and pays 1000*5% = 50 USDC to Kato
Sakurajima redeems 1000 zcUSDC and 1000 nUSDC for 1000 USDC
This leaves Sakurajima with 1000 - 50 = 950 USDC.

Exiting/Selling nTokens
This is essential for people who want to move in/out position as rate flows, or for lenders trying to close their lending position earlier (due to various reasons, such as short of funding elsewhere). r = 5%
Kato has 1000 nUSDC (already holding for some time), Asuka wants to buy 1000nUSDC
Kato sells to Asuka 1000 nUSDC and Asuka pays Kato 50 USDC
teaser for you: why 50 USDC?
Kato gets to keep 50 USDC + any accrued interest

and you can build whatever strategy you want from there on.

Capital Efficiency & Orderbook design

Note that, for Swivel to work, it needs to have a time-appreciating AMM for zcTokens and time-depreciating AMM for nTokens. Swivel achieved this through their orderbook, which on the high level, is a combination of the two AMMs to allow smooth position transition. Details are not available though

Minting nTokens

nTokens include interest-generation and tracking functionality within their transfer function which:
Reduces the deposit overhead present in designs which require increasing deposits over time
Reduces complexity in nToken pricing
Allows interest to be redeemed at any time

Swivel atomically mints tokens as orders are filled which reduces the number of transactions necessary for most use cases.

On Liquidity

Swivel is a orderbook-based protocol with liquidity incentives built baseline into token distribution and protocol design. In traditional AMM, LPs works with the x*y = k constant product function, and the reward is a pool. In orderbook design, people work with a binary order: either the order gets filled, or not.
Swivel reward LPs by providing token rewards only to those liquidity providers (makers) who's orders are filled. Swivel set aside 50% of token supply for LP rewards
image.png

Bib

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.