Upload Stride Redemption Rate Oracle Contract

Summary

The Stride Redemption Rate Oracle Contract uses an interchain account (ICA) to provide the redemption rates of Stride’s stTokens to the Osmosis blockchain in a decentralized manner.

If uploaded to Osmosis, the Oracle Contract’s feeds could be used to 1) trustlessly handle the scaling factor for stToken stableswap pools, and 2) could be integrated with Mars’ oracle implementation to provide a more dependable oracle price for stTokens.

Details

The way Stride’s liquid staking works is - stTokens represent underlying staked tokens, which are controlled by the Stride blockchain. At any time, a user may use his stToken to redeem a certain amount of its underlying token. The amount of underlying tokens a single stToken can redeem is called the redemption rate. For example, on the Stride blockchain 1 stATOM can currently be used to redeem 1.205 ATOM. So 1.205 is the current redemption rate for stATOM. To continue with the example, the market price of stATOM vs ATOM may fluctuate - but the true value of stATOM vs ATOM is defined by the redemption rate.

The Oracle Contract uses an ICA to provide redemption rates for Stride’s stTokens to the Osmosis blockchain in a decentralized manner. As mentioned above, stToken redemption rates on Osmosis can be used to trustlessly manage the scaling factors for stToken stableswap pools and to strengthen stToken price oracles on Osmosis.

Contract information

Code repository: Github - https://github.com/Stride-Labs/ica-oracle

Commit hash: 32ddf060949e7486078137c40994bc10f7c8a553

Compiler version: cosmwasm/rust-optimizer:0.12.13

Checksum: d0b3b651a72d1b16b035b1b5188c68c0f77efd5f766624d331208ea89812bcb6

Target onchain date: August 30th

1 Like

Just to check for sure; on the stTokens stableswap pools the rates are adjusted manually at the moment, right?
Uploading this contract will automate it, making the manual adjustments irrelevant if I read it correctly? Are there any risks which are already covered (such as a user might manipulate the ratio)?

The Stride Redemption Rate Oracle Contract is pretty simple. All it does it provide a number on the Osmosis blockchain and constantly update it. That number is the redemption rate from the Stride blockchain. (There are actually several redemption rates - one for each stToken.)

Currently, the redemption rate does not exist on the Osmosis blockchain. But this contract, once uploaded, will continually feed the redemption rate to Osmosis in a trustless and automatic fashion.

Other contracts on Osmosis will be able to consume the redemption rate for various purposes, one of which is to automatically update scaling factors.

2 Likes

Thanks for the ELI5-part :slight_smile: