IPOR Protocol
Search…
⌃K

# IPOR Publication

Because gas cost is a serious issue on the Ethereum blockchain, the protocol can not afford the luxury of publishing the IPOR rate to the blockchain every block. Instead, we need to be pragmatic about the IPOR publication so that it is sustainable and useful.

### Publication after trade

The interest rate swap AMM is the first product from the IPOR Protocol portfolio. It uses the most recent on-chain published IPOR rate to price the next swap. After the swap opening transaction is triggered, the event that is emitted invokes the publication pipeline, where the current market IPOR rate is immediately published to the blockchain. That means whoever comes first gets the rate that is currently published, and the next trader may already get a new rate.

### Heartbeat, time, and volatility

Should no trades occur on the IPOR Protocol, the oracle will keep the "pulse" by publishing IPOR. This publication will occur depending on volatility and time since the last publication. This way, if the volatility is significant but only for a short while, the oracle will not be overwhelmed by a large number of publications. At the same time, if the rate is not changing much, the publication will still take place, just less often.
"Pulse" is controlled by function:
$\Delta IPOR * \frac{\Delta T}{60} = 5$
If the product of the multiplication of IPOR changes since the last publication and the number of minutes since the publication took place equals 5, then the publication is triggered.
For example: if we expect publication after 5 minutes since the last update, we expect the IPOR to jump by 1% in that time. However, if we look at a longer period, a much smaller move is sufficient to trigger a publication. One basis point change in IPOR requires 8 hours and 20 minutes of time to trigger an update.

### Public Request to Publish IPOR

Should anyone desire to print IPOR to chain, they need to invoke a public function on a dedicated smart contract and provide it with the defined fee in ETH (or other native blockchain tokens) to cover publication cost. This action will trigger an event that will trigger the oracle to print to the blockchain.