Created at 3pm, Mar 4
ilkeCrypto
0
The Yield Protocol: On-Chain Lending With Interest Rate Discovery
yVqwyAcUfRrNqshQ90GVQB6S8Vjp8zGEmes3EyDGS_w
File Type
PDF
Entry Count
53
Embed. Model
jina_embeddings_v2_base_en
Index Type
hnsw

This paper presents a sketch of a new building block for decentralized finance: fyTokens. fyTokens are like zero-coupon bonds: on-chain obligations that settle on a specific future date based on the price of some target asset and are secured by collateral in another asset. By buying or selling fyTokens, users can synthetically lend or borrow the target asset for a fixed term.Dan Robinson, Allan Niemerg, April 2020

4.1.2 Lending Buying fyTokens is economically similar to lending the target asset. Because fyTokens are not redeemable until expiration, they are likely to trade at a discount until maturity, particularly if there is demand to borrow the target asset. This means the value of fyTokens (denominated in the target asset) will tend to appreciate over time as they approach maturity. This is analogous to the interest earned by lenders in other protocols. In order to make this more familiar for users, an application could present an interface that emphasizes the market value of their fyTokens, rather than the face value, as well as showing them the expected annualized yield if they held those tokens to maturity. For example, if a user spent $100 to buy 103 fyUSD, the interface would display their current value of $100, with that number gradually tending to rise until it hits $103 upon expiration.
id: d2090b7ab971b2636973728b4175996f - page: 7
However, note that it is possible for fyTokens to temporarily decline in value relative to the target asset. This poses something of a user interface challengea user earning interest on their DAI might be surprised to see their portfolio value tick down (even though it would necessarily correspond to the interest 7 rate going up, and the lender could receive the full value simply by holding the fyToken to maturity).
id: 1d6b59a1d1733feed4a297797684d81d - page: 7
4.1.3 Example Suppose that on October 1, 2019, Alice owns 1 ETH, currently worth $100, and she wants to enter a 1.5x leveraged long position on ETH. Alice looks up the USD/ETH fyToken contract that expires at the end of the quarter (on December 31, 2019) with a collateralization requirement of 150%. Alice creates a vault in that fyToken contract, deposits 1 ETH as collateral, and takes out 50 fyUSD as debt. Alice then sells those fyUSD on Uniswap (see section 4.4). fyUSD of that maturity is currently trading at a discountsay, $0.97so she only receives 0.485 ETH. She deposits that ETH into her vault as additional collateral. She now has exposure to 1.485 ETH. If Alice wanted, she could continue to take out fyUSD, trade it for ETH, and redeposit the ETH as collateral, repeating until she reaches her desired amount of leverage or she bumps up against the collateralization requirement.
id: 41f06d068af27a02e5f4d75c4df601af - page: 8
Since Alices vault has $50 of debt outstanding and a collateralization requirement of 150%, it gets liquidated if the value of her collateral falls below $75, which corresponds to the ETH price falling to about $50.50. If someone liquidates her vault at that exact price, they will have to pay in 50 fyUSD, and will receive $75 worth of ETH collateral, giving them a prot of $25, plus a little more based on the discount at which the fyUSD are currently trading. If the price of ETH gets too close to her liquidation price, Alice should try to close her vault or deposit more collateral to avoid paying this penalty. Suppose Alice holds the position until expiration. When it expires, $50 worth of her ETH collateral will go to fyToken holders, and the rest will go back to her. So if the price of ETH rose to $200, fyToken holders would receive 0.25 ETH of her collateral, and she would receive 1.235 ETH, worth $247.
id: cfed6d4f54741f2c22a25632083d7760 - page: 8
How to Retrieve?
# Search

curl -X POST "https://search.dria.co/hnsw/search" \
-H "x-api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"rerank": true, "top_n": 10, "contract_id": "yVqwyAcUfRrNqshQ90GVQB6S8Vjp8zGEmes3EyDGS_w", "query": "What is alexanDRIA library?"}'
        
# Query

curl -X POST "https://search.dria.co/hnsw/query" \
-H "x-api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"vector": [0.123, 0.5236], "top_n": 10, "contract_id": "yVqwyAcUfRrNqshQ90GVQB6S8Vjp8zGEmes3EyDGS_w", "level": 2}'