Oracles and ROI computation

Price oracles


To compute bonds price, Convergence bonds embed a tailored, generic on-chain oracle called cvgOracle. The cvgOracle can get bonded assets price from multiple AMMs (Uniswap V2&V3, Sushiswap, Curve...) and is called each time a user buys a bond.

When a bond is deployed, the most liquid pools are targeted by the cvgOracle (the team will manually set up each bond parameter).

Targeted pools

Convergence bonds also include an additional security check based on Chainlink Price Feeds (CPF). Each time a user buys a bond, after the cvgOracle returns a price, this price is compared to the corresponding asset price given by CPF. The transaction will fail if the price difference between both Oracles exceeds a given percentage.

This security check has been implemented to prevent Convergence bonds from being "exploited" by someone manipulating an underlying pool while allowing the bonding mechanism to function properly during volatility periods.

ROI computation

Once both oracles returned a corresponding price, the discount (ROI) that the bond buyer will get is computed with a mechanism that considers the previous buying activity and the expected buying activity.

For each bond, we define the ROI as a function of ( NtB(t), Ntr(t) ) where Ntr(t) is the amount of token distributed over time, and NtB(t) is defined as :

NtB(t)=tTNNtB(t) =\sqrt{ \dfrac{t}{T} }*N

Where T is the duration of the bond, N is the total amount of token released, and t is the duration since the bond has been opened.

The ROI is defined as :

More precisely, the ROI increases and tends towards the upper bound ROI if, during the bonding round, the number of CVG elapsed (Ntr(t)) is lower than the theoretical points (NtB(t)). It decreases progressively towards zero when Ntr(t) is higher than NtB(t).

The figure below gives an insight of the ROI behavior :

Last updated