# Lending Trade

Consider a Notional liquidity pool between DAI and 1-year DAI (fDAI maturing in one year), 6-month DAI (fDAI maturing in 0.5 years), 3-month DAI (fDAI maturing in 0.25 years):

<figure><img src="https://1148337737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVd4z5s2l5q7DqJhx3Eqg%2Fuploads%2F3Qq5KDCzzmseLn8ScU9n%2Fimage.png?alt=media&#x26;token=ffafe8d9-84fb-4979-9505-b296e5dc59f5" alt=""><figcaption></figcaption></figure>

`Proportion (P) = fCash / (DAI + fCash)`\
`Exchange rate = ((1 / Scalar) * (ln(P / (1-P)))) + ((Anchor * time)+1) - (liquidityFee * time)`\
`Interest rate = (Exchange rate - 1) / Time`\
Time = tenor span i.e. 1 = 1 year, 0.5 = 6 months and so on

Now let us assume you make a trade to buy 1000 fCash tokens

<figure><img src="https://1148337737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVd4z5s2l5q7DqJhx3Eqg%2Fuploads%2FyR5hYSUBGVK9MxqWFM6O%2Fimage.png?alt=media&#x26;token=755ad1c6-ddfd-4f36-bdc7-9260f7ff2e04" alt=""><figcaption></figcaption></figure>

`Proportion (P_n) = new fCash balance / (old DAI balance + old fCash balance)`\
`Exchange rate = ((1 / Scalar) * (ln(P_n / (1-P_n)))) + ((Anchor * time)+1) - (liquidityFee * time)`\
`DAI spent = fCash to be received / Exchnage rate = 1000 / Exchnage rate`\
`Interest rate = (Exchange rate - 1) / Time`\
Time = tenor span i.e. 1 = 1 year, 0.5 = 6 months and so on

The pool and rates would look like this after the trade:

<figure><img src="https://1148337737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVd4z5s2l5q7DqJhx3Eqg%2Fuploads%2FR1LY7nJ5z4bDPwMHydRx%2Fimage.png?alt=media&#x26;token=7d3644bb-dcfb-4c0b-86c1-b708762591dc" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://diligentdeer.gitbook.io/notional-finance-guide/counterparty-liquidity-pool/liquidity-pool-interactions/lending-trade.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
