1/ We @AlphaFinanceLab has just launched our new product #AlphaX on @avalancheavax network πŸ’ͺ.

x.alphafinance.io

With the new concept, here's a 🧡 on how #AlphaX actually works πŸ‘‡
2/ Key components:

1️⃣ LONG & SHORT Strike Tokens
2️⃣ Mint & Redeem
3️⃣ Liquidation
4️⃣ Oracle price
5️⃣ Price peg
6️⃣ Arbitraging
3/ 1️⃣ LONG & SHORT Strike Tokens

LONG Strike Token is like **AVAX-55**

The #StrikeToken price should be pegged to ( $AVAX price - $55).

βœ… As simple as that.
4/ LONG & SHORT Strike Tokens (cont.)

SHORT Strike Token is like **120-AVAX**

The #StrikeToken price should be pegged to ($120 - $AVAX price).

βœ… Again, straightforward.
5/ 2️⃣ Minting & Redeeming

- Mint ➑️ Pay $USDC to mint LONG + SHORT Strike Tokens
- Redeem ➑️ Burn LONG + SHORT Strike Tokens to get the underlying $USDC back.

βœ… Strike Tokens are fully collateralized.
6/ 3️⃣ Liquidation

Leverage comes with risk. The higher the leverage (the closer the strike price is to the target price), the higher the liquidation risk.
7/ 4️⃣ Oracle Price

The oracle price of #StrikeToken is based on the target asset price, which is obtained from #AlphaAggregatorOracle, with both @BandProtocol and @chainlink as the underlying data sources!
8/ 5️⃣ Price peg

This is one of the most important mechanics of #AlphaX. How does #StrikeToken maintain its price peg?
9/ Price peg (cont.)

Mint & Redeem guarantees that each pair of LONG + SHORT tokens must maintain the gap; otherwise, there will be an arbitrage opportunity.

Ex:
AVAX-55 = $30
120-AVAX = $25

Arbers can buy these two for $55 and redeem for $120-$55 = $65 (net $20 profit).
10/ Price peg (cont.)

This means that LONG + SHORT = GAP for every pair. βœ…

Now, when a #StrikeToken is at liquidation risk, the strike token credit will be available for buying at a discount (~oracle price).
11/ Price peg (cont.)

With LONG + SHORT = GAP, the whole set of LONGs and SHORTs will then be at peg from the liquidation.

So, AlphaX's Strike Tokens already have a price peg mechanism in place.
12/ 6️⃣ Arbitraging

With price peg, arbitrageurs will most likely come and take profit on the off-peg opportunity (with the possibility of hedging any long/short risk exposure elsewhere).
13/ Arbitraging (cont.)

This AlphaX concept is relatively new, so personally there may be some lead time for users and arbitrageurs to understand and develop necessary tools for arbitraging. πŸ› 
14/ For more info on developing arbitrage or liquidation, please refer to our Developer Section on gitbook:

alphafinancelab.gitbook.io/alphax/for-dev…

Or join our discord if you have any questions:
discord.gg/cstHdXmaV2

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Nipun | Alpha

Nipun | Alpha Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @nipun_pit

8 Dec
1/ πŸ“’ #AlphaX is now LIVE on @avalancheavax mainnet πŸŽ‰πŸŽ‰πŸŽ‰

βœ… Take Long or Short positions on $AVAX or $WETH with leverage
βœ… High capital efficiency
βœ… Tradeable #StrikeTokens
βœ… Earn high APY from liquidity mining πŸ’°πŸ’°πŸ’°

x.alphafinance.io
2/ πŸ’‘ #AlphaX introduces a new concept of #StrikeTokens.

πŸ“ˆ LONG Strike Tokens: $AVAX-X & $ETH-X
πŸ“‰ SHORT Strike Tokens: $Y-AVAX & $Y-ETH

These tokens are ERC-20 compatible, and can be supplied & traded on @traderjoe_xyz.
3/ πŸ”€ Mint & Redeem

➑️ Anyone can use $USDC to **mint** any pair of LONG and SHORT Strike Tokens.
➑️ Anyone can use any pair of LONG and SHORT Strike Tokens to **redeem** the underlying $USDC back.

✨ #AlphaX is **fully collateralized**.
Read 8 tweets
3 Sep
1/ β˜€οΈ Gm

πŸ“’ Introducing #AlphaBuyWall (ABW), a smart contract that allows anyone to bid for NFT, and provides a ⌊price floorβŒ‹ for NFT.

2/ Why sell on ABW?

As NFT holder, selling your favorite avatar is a PAIN with existing tools. You will have to set sell price and wait for buyers.

Worst case = you wait for weeks and keep being frontrunned by other sellers. 😒

On ABW you sell via smart contract at any time.
3/ Why buy on ABW?

Currently to get a hold of trending NFTs, you'll need to keep refreshing the browser until someone decides to sell their bag. If the price is cheap enough then you scoop it up.

NGMI πŸ˜”

ABW is a faster and cheaper way to bid for your favorite NFT collections
Read 8 tweets
23 Apr
1/ πŸ› πŸ“ πŸ₯ž πŸ†š 2️⃣

🚨 Smart Contract Bug found in Pancake V2 🚨

πŸ›: Pancake new router is incompatible with Pancake LP implementation.

Users may get __revert__ txs upon __swaps__ due to the bug.

Vulnerability was reported to @PancakeSwap team asap.

Thread below πŸ‘‡
2/ After @PancakeSwap V2 announcement, we have been working on supporting the new V2 pools.

βœ… As with our security standard, we always perform smart contract review and testing, to ensure our users’ safety.

❗️ We have found and informed the @PancakeSwap team on the issue.
3/ πŸ› So, what is the actual bug?

The question comes down to: what changes from Pancake V1 to V2?

1️⃣ Swap fees: 0.2% ➑️ 0.25%
2️⃣ Fee distribution to LPs, to dev address

Below are the router __getAmountOut__ implementations (V1 & V2). The difference lies in the numbers. ImageImage
Read 11 tweets
28 Mar
1/ πŸ“– Just read @Uniswap v3 whitepaper πŸ¦„ and wanted to share some thoughts.

πŸ‘€ There are some pretty neat tricks in the paper that we @AlphaFinanceLab also use. πŸ‘€

Thread below πŸ‘‡
2/ Overall, πŸ¦„ V3 is a huge upgrade from and much more complex than V2. V3 introduces:

πŸ‘©β€πŸ’» User Flexibility: Users can supply within a specified price range.
πŸ’» Protocol Flexibility: Configurable swap fee & governance fee
πŸ’‘ Features: Built-in TWAP & liquidity oracle
3/ The most interesting feature is that users can supply liquidity to any desired price range, which then enables the __Concentrated Liquidity__ feature, as advertised.

πŸ€” This is a challenge in terms of technical implementation, since gas limits may explode if done naively.
Read 18 tweets
18 Dec 20
🚨 1/ The recent @warpfinance hack is the result of using vulnerable @UniswapProtocol πŸ¦„ LP token prices.

The attacker was able to drain ~$7.8M worth of $DAI for smaller collateral.

#AlphaHomoraV2 uses a different LP pricing method that is safe against such attack vector. πŸ‘‡
2/ The LP token pricing used is prone to the typical flash loan sandwich attack vector:

➑️ Flash loan and skew reserves
➑️ Fake LP price
➑️ Repay flash loan
➑️ Profit

So, how do we price an LP token in an unmanipulatable way?

Answer: **FAIR LP PRICING**
3/ What makes the **FAIR LP PRICE** safe from attacks?

There are two major components to the fair LP price that make the price safe:

β‘  Fair Asset Prices
β‘‘ Fair Asset Reserves
Read 9 tweets
6 Nov 20
1/ Last week, there has been a number of flash loan-related scenarios (and potential scenarios): @harvest_finance, @MakerDAO, @iearnfinance.

So, here’s a short thread on flash loans. πŸ‘‡
2/ Flash loan lets anyone borrow a very large amount of assets (as long as the amount + fee are paid back in the same transaction), which can be used to temporarily skew asset prices or balances.
3/ A typical flash loan attack pattern is a form of sandwich attack:
(1) Skew price/balance
(2) Main protocol uses the skewed price/balance (e.g. to open a position, deposit into AMM all at bad prices)
(3) Un-skew price/balance
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(