# Bond/Unbond to Oracles

## I. Checking the price of dots&#x20;

To purchase data from Zap Oracle, users need to call bond method to convert zap token to dots ( 1 dot= 1query / 1 block in subscription). Oracles can set the price for their dots with a price curve, which can make the price of each dot change depending on how many dots is currently issued by the Oracle's endpoint. Checking the price of number of dots you are to purchase will help you determine exact price at that moment. You then can decide to go ahead and purchase or wait for a more preferable time when the price of the same number of dots can be cheaper, normally due to the dots being issued have changed, or you can decide to use a different Oracle with better price for the same  data.

To calculate whats the price of the next dot will be , we can simply follow the formula of the bonding curve we want to bond, and replace `x` with `issued dot + 1`

**Following table provides some examples of bonding curve , issued dot and the result of the next dot's price**

| Endpoint | Bonding Curve      | Dots issued | Next 1 dot price                             |
| -------- | ------------------ | ----------- | -------------------------------------------- |
| Btcprice | `2 + x^2`          | 3           | `2 + 4^2 = 18 weiZap`                        |
| Ethprice | `3^10^18 + 10^18x` | 5           | `3^10^18 + 10^18*6 = 9*10^18 weiZap = 9 Zap` |

{% hint style="info" %}

* Zap-term cli tool provides options for calculating dots price&#x20;
* Web admin can provide visualize for dots price&#x20;
  {% endhint %}

## II. Bond and Unbond

### Bond&#x20;

#### Method that will hold User's Zap token in Bondage contract and assign number of dots  from requested endpoint to user's address.&#x20;

By bonding sufficient amount of Zap Token, User can have number of dots issued and ready for use. For example from above table, if User bond 9 Zap to Ethprice endpoint, he/she will have 1 dot (the 6th dot) issued and ready for use

### Unbond

#### Method that will release issued dot and redeemed Zap Token to user's address

By unbonding issued dots, User can have Zap Token back, sometime with more or less than what they put in, depends on the current state of bonding curve

### Delegate Bond

When User needs data response from Oracle directly to a dapp, or when User wants to bond for someone else, User can do so using method `DelegateBond`.


---

# 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://zapproject.gitbook.io/zapproject/users/bond-unbond-to-oracles.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.
