Proposal to add XSTUSD-3CRV to the Gauge Controller

Support for Sora, let’s fucking go for it!

2 Likes

Update: the XST and price-tools pallets are now open source. This is the same code as deployed in production: sora2-network/pallets at master · sora-xor/sora2-network · GitHub

The price-tools pallet calculates the XOR-DAI price and the XST pallet defines the minting/burning of XOR/XSTUSD based on that price quote.

1 Like

@meowtopia Thank you for your response.
I think Curve should not add any Gauge to projects that keep their source code closed this is my option… Security by obscurity is not security.

1 Like

Definitely, which is why the related XSTUSD source is all open: sora2-network/pallets at master · sora-xor/sora2-network · GitHub

Additionally, the audit report has also been made public, which is up at the top of the thread here. I hope that helps.

2 Likes

Proposal to add XSTUSD-3CRV to the Gauge Controller: Summary Q&A and what SORA can bring to Curve

We thank the Curve and Convex communities for an interesting couple of days with Q&A on different platforms.
Thus far, some gaps in documentation and information were detected, concerns were raised and the code and more details were shared.

We wanted to bundle and deepen some of the information that was given:

1. What value can SORA and XSTUSD add to Curve Finance and Convex Finance?
2. Summary of the Q&A highlighting the main concerns and unclarities around code, oracle, audit, liquidity etc.

1. What Value can SORA and XSTUSD add to Curve Finance & Convex Finance?

Let’s start by giving an idea of what SORA and XOR are about:

SORA is both a decentralized central bank and a blockchain network built with Substrate.
This basically means SORA is a decentralized money printer/burner that can be used only for productive goals, which means the production of goods or services, or for redeeming XSTUSD.

This is possible thanks to its elastic supply managed by a Token Bonding Curve and decentralized governance system. This is currently the Polkadot / substrate governance system, later moving to SORA parliament once the development is finished.

If the XSTUSD-3CRV pool were added to the gauge controller, incentives would be paid in XOR.
XOR holders have a seat at the governance table: you can propose and vote RFP’s that will go to referendum once they pass Council. XOR holders can also propose their candidacy to be a council member and have a first say over proposals. XOR holders can propose incentives, integrations, new developments, and anything you can think of including real world/off-chain projects.

Money creation and allocation are core elements of XOR/SORA.

The Token Bonding Curve manages the token price and inflation/deflation once the TBC is hit - currently at $1000. Unique feature of the TBC: Inflation increases the price of XOR, deflation decreases the price of XOR, with $1 per 1337 XOR minted/burned. This forward price prediction function creates a currency that is attractive to apply in real world and DeFI applications - a higher adoption of XOR means a higher value per token without the boom and bust cycles.

The TBC thus also creates a protocol with boundless liquidity. With more XST coming soon (think XSTEUR, XSTCHF,…), more opportunities for the Curve community can be created, all with boundless liquidity.

The SORA economic system explained by a couple of community members: https://medium.com/@polkaswapcommunitycollective/the-sora-economic-system-explained-天-12086024234c

These are opportunities to think about for once the XSTUSD-3CRV pool gets added to the gauge controller. Of course we are not there yet, below you find comments and concerns by the Curve & Convex community on said proposal.

2. Summary of the Q&A highlighting the main concerns and unclarities around code, oracle, audit, liquidity etc.

In no particular order:

*** The oracle and XSTUSD code is not available, security-by-obscurity is not acceptable:**

We made the code open source on sunday 05/01/22 after realizing this is a fair point for a review. You can find it here: sora2-network/pallets at master · sora-xor/sora2-network · GitHub

We should also point out, for those not familiar with the Polkadot/Kusama (DOTSAMA) ecosystem, that the SORA network is built using Parity Substrate and is using Rust compiled to WASM and not EVM/solidity. So the design of our solution is a little different than what most solidity-based projects would have.

*** The audit by Nettitude did not bring any vulnerabilities to light. This is suspicious and almost never happens.**

Nettitude is a well respected auditor which makes us not question their work.
Furthermore,

  1. SORA uses rust and not solidity, so it is easier to write secure code.
  1. SORAMITSU has internal security and QA teams that reviewed it before release

  2. The XSTUSD audit was done about 3 months after it went into production and was done to provide an audit report to fulfill the Curve DAO Governance requirements.

We like to encourage the assessment team to create their own risk report as this will help us forward.

*** Could you provide some more details about the liquidity in the DEX? Also, what price is used here: spot price? time weighted average price? How many operators report the price for XOR-XSTUSD redemptions/swaps?**

Short answers are:

Polkaswap liquidity: https://tools.cerestoken.io/pairs

The price-tools (sora2-network/lib.rs at master · sora-xor/sora2-network · GitHub ) code averages over 30 blocks (with 6s blocks), but with a maximum rate of change of 0.197% per update in the average (update happens once per block) in the upwards direction, and 0.007% per update in the downwards direction.

The price used for a USD oracle is the XOR-DAI price on https://polkaswap.io/ . Because Polkaswap is an xyk constant product DEX, it is not expected to have sharp declines or surges, but rather smoother dynamics as xyk punishes price movement with a greater price impact the more you get away from the initial price point. So it is reasonable to smooth this price over time, updating the average slowly, in order to reduce the impact on short term price manipulation on the oracle price.

*** The understanding is XST is backed by XOR similar to how UST works, how would manipulation happen if we do not set the number?**
I were to redeem $1 XST I should be able to redeem for $1 worth of XOR regardless of the token price of XOR.

The “floor” is set by governance by the XOR hodlers, so it can be whatever value. Currently it is $11, which is about a $4.5 mil mkt cap for XOR if XOR went down that much. It cost around $20 mil in direct dev costs to build SORA since 2017 (we are on our v2 network now, since April 2021), so a $4.5 mil mkt cap seems to be below the fundamental value of what we created, especially since we also have a Kusama parachain slot that we won in an auction.

We would like to encourage you to try out the system. You can go to Polkaswap.io and try swapping between XSTUSD and XOR. This is a real product in production since last year, with over 4.7 million transactions processed on SORA. The Polkadot ecosystem is still very small compared to Ethereum, so this is a big amount. The Polkadot relay chain only has 9 million transactions on it, but they have twice as many blocks as our network, so our network is comparable in use to the Polkadot relay chain.

We should point out that even though the DOTSAMA ecosystem is smaller than Ethereum, it can still be useful to incorporate projects like ours in the curve ecosystem, because it is different technology and is not correlated to Ethereum ecosystem risk. So it will make curve more resilient, while also potentially bringing in the interest of the DOTSAMA community, too.

*** The question was on the need of having such “floor”. What value does it bring? Dev cost and market cap should be irrelevant in this case. A stablecoin should not have risk of “de-pegging”**

The floor should never be reached in real market conditions. The floor is there to prevent someone from being able to gain control of the ecosystem by crashing the price to, say 0.000001, then minting billions of XOR (current supply is around 450k XOR). It is always good engineering design to have the boundaries of use clearly defined so that you don’t run into an unexpected range of values.

The floor price is really arbitrary and should be set to whatever the community is comfortable with. Right now the price of XOR is $35, so the floor is set to $11, but if the XOR price were to have a sustained downtrend even further, someone in the community would almost certainly propose and vote for it to be lowered. In fact, if there were a real concern about this feature of the XSTUSD design, convex DAO could buy XOR tokens and also vote for governance on our platform (we use the standard Substrate governance pallet).

*** The technical documentation and most facets of the project are hard to analyze.**

We are working on this, your questions and feedback help a lot.
XSTUSD - SORA This was added after your feedback.

*** the pricing oracles seem not secure … recent hacks suggest TWAP on-chain oracles aren’t the best solution.**

Please share an example of any recent hacks so we can study and compare if they are applicable to our design.

We don’t use a time-weighted average price (TWAP), but rather have a time window-based price average with a maximum rate of change, so we doubt this is relevant for XSTUSD.

*** How can XOR as liquidity survive any heavy system shock at this stage? There seems to be no fall back mechanism?**

If the XOR price crashes due to too much selling and not enough liquidity, then XSTUSD holders will get more XOR for their XSTUSD, as the XOR price will be lower. Generally, the dynamics of XSTUSD and XOR are counter-cyclical. If the XOR price is trending upwards, there should be lower demand for XOR, but if the XOR price trends downwards, there should be higher demand for XSTUSD, as it provides an exit from XOR without price slippage, due to the mint/burn mechanism of the XSTUSD implementation. Because XOR is burned to mint new XSTUSD, it removes XOR from circulation, which can help stabilize system shocks.

Read more on XOR liquidity and liquidity on Polkaswap here:

*** Do you have any block explorers?**

You can find links to our 2 block explorers here: Block Explorers - SORA

3 Likes