What is Anchor Protocol (ANC) | What is Anchor Protocol token | What is ANC token

We’re thrilled to present the newest flagship DeFi product of the Terra ecosystem — a decentralized money market that provisions a stable 20% APY to depositors on the demand side and a supply-side (e.g., borrowers) that only accepts liquid staking derivatives from major proof-of-stake (PoS) chains.

http://app.anchorprotocol.com/

Anchor is not your ordinary money market.

It’s designed to provide the benchmark interest rate for DeFi, the  first decentralized challenger to the Federal Funds Rate (FFR). It pools the only unlevered source of yield in DeFi, staking emissions from major PoS chains like Terra, Polkadot, Cosmos, Solana, and ETH 2.0. Deploying staking derivatives, Anchor stabilizes the cash flows from PoS staking positions and feeds them to depositors at a low-volatility benchmark rate.

We call it the “Stripe for Savings,” and envision Anchor becoming the first mass adopted savings product sourced from the DeFi market. Anchor is intuitive to use, offers attractive, stable interest rates to UST depositors, unlocks liquidity for PoS stakers, and is trivial to integrate into applications and fintech platforms via the Anchor API and SDK.

We’re proud to share that our official launch partner, CoinList, has integrated Anchor and will enable UST deposits for non-US users into Anchor directly from the exchange interface! We’re also thrilled to announce that Lido Finance, the DAO behind ETH 2.0 liquid staking derivatives, has implemented the first liquid staking derivative (bAsset) that can be used as collateral on Anchor right now — bLUNA.

It’s time for the composable and decentralized power of DeFi to meet the mainstream.

Welcome to the Anchor Rate — a fixed-income, DeFi-native interest rate that can serve as the reference rate for an emerging DeFi yield curve and pure household savings vehicle.

Why Anchor?

Before diving into the mechanics of Anchor, it’s important to provide some background and context on why it’s a uniquely appropriate product from 2 primary angles:

  1. The Macro Angle
  2. The Crypto-Native Angle

The Macro Angle

Savings has been deprecated for decades since the age of central bankers blossomed in the wake of WW1. Interventionist monetary policy became the standard as the world departed the gold standard and eschewed saving for the future for rapacious consumerism.

Today, central bankers are financial celebrities. Following Black Thursday, of March 2020, when fears of COVID-19’s economic havoc were peaking, the US Federal Reserve unleashed a torrent of stimulus ranging from open market operations to special-purpose debt vehicles and a ham-handed cut to the Federal Funds Rate — currently sitting at 0.25, the lowest ever. The goal? Plunge protection for the equities and bond markets falling synchronously — something not supposed to happen.

Often hailed as saviors, the underlying trade-off of rampant fiscal stimulus by central bankers (with no historical precedent) is difficult to grasp. But the cost is high.

Artificial suppression of interest rates has always operated as a drug. A quick hit, noticeable buzz, and tapering off of the short-term effects. However, in the long-run, perpetually low-interest rates pose significant latent effects, such as the continued devaluation of money (diluting savers and eventual implementation of capital controls), larger asset bubbles, and augmented consumerism.

But the reverse strategy, hiking interest rates, is just as daunting for the central bankers.

As Arrington XRP Capital puts it in their Anchor Protocol report:

“The monetary authorities are caught in an incredible double bind. With rates close to zero, they are running out of options. Central banks must choose between two compromising worlds, each as violent and painful as the other.

They can flood the system with liquidity and keep interest rates low, waging war on any spike in treasury yields by controlling the yield curve (YCC). This first option — an uncompromising commitment to the fifty-year status quo — risks runaway inflation and possibly even hyperinflation in the long run.

On the other hand, they can raise rates and reject extreme measures like YCC. A hawkish stance takes away the medicine and risks de-leveraging an economy reliant on cheap leverage. This second option pricks the asset bubble, unwinds the Five Micro Bubbles, and leads to a deep, painful recession.”

With two bad options, the Fed is left with a decision that only affects savers negatively. Dilute their savings further or trigger a recession.

Yield is deflated across the board of legacy markets. Retail investors are increasingly cornered into riskier investment strategies in the equity markets, and the FFR is stagnant at an all-time low with no signs that it will be raised anytime soon.

So when investors eternally in the search of low-risk, passive yield find themselves amid an unprecedented, yield-starved macro environment — where should they turn?

Enter DeFi.

The Crypto-Native Angle

When the short and long-term debt cycles of the macroeconomic environment are plagued by artificial suppression of interest rates, low-risk yield is scarce and the market is risk-on. Assets are inflated by a deluge of new money, leverage is high, and everyone is arguing over inflation expectations.

DeFi provides a refuge from the doldrums of the Keynesian “boom and bust” cycle. Rather than being masked in obscurity like government bailouts for proprietors of CDO-cubed during the 2008 financial crisis, DeFi is out in the open. Anonymous users scour open-source smart contracts of emerging money legos applications looking for the next YFI, yield farming gem, or some other degen opportunity.

Good thing yield in DeFi is flourishing. With a massive bull market currently underway, demand for margin is high as degen traders, professional funds, and whale farmers battle for passive cash flow streams via liquidity provision and asymmetric payouts using leverage.

DeFi’s yield is pure, not dislocated by a centralized intervention. DeFi’s yield is wild, erratic, yet wholesome. It represents the transparent and massive on-chain demand for credit in what its ardent followers believe is a new financial system. But such machinations are nothing new. Variable debt cycles based on fluctuating credit demand reminiscent of TradFi occur in DeFi too, like towards the end of the Summer of DeFi in 2020 when yields plummeted alongside sharp price drawdowns.

DeFi needs fixed-income instruments. Its high-yield, variable interest rates are derived by leveraged demand for credit — an issue afflicting TradFi markets at their core as well. Projecting future LP cash flows based on incumbent money market interest rates is fickle since they’re variable. Retail users will never care to navigate DeFi’s entangled protocols searching for the best yield either.

Fixed income instruments offer simplicity, but in DeFi, also much more.

The beauty of DeFi is that it’s not beholden to artificial rate suppression. Permissionless networks and their composability enable new tooling and on-chain innovation not possible with legacy finance. They allow for the creation of a benchmark rate to reference as an industry yield curve develops.

So how do you kill two birds with one stone? How to provide mainstream investors starved for yield with an accessible, stable, attractive, and risk-off savings vehicle while concurrently creating a benchmark rate for DeFi to reference?

The transparency, composability, and censorship-resistance of DeFi are the zero-to-one innovations. Let’s use them to create a decentralized federal funds rate, an Anchor rate for DeFi’s burgeoning credit market. One that is unlevered, has low volatility, and sources cash flows from macro-tethered protocols — PoS blockchains. Accessible to all.

What is Anchor?

Anchor is a decentralized money market and savings protocol built on top of the Terra blockchain. It fulfills the trifecta of Terraform Lab’s vision for implementing the 3 financial primitives of finance (savings, payments, and investing) on the Terra network. Anchor operates similarly to most DeFi money markets (e.g., Compound) with the caveat of furnishing stable yield to depositors (lenders) and only allowing liquid staking derivatives from PoS chains as collateral for borrowers.

Anchor tethers its 20% APY interest rate to the inflation, cashflows, and macro-connection of PoS chains to the crypto market. Not only does it provide a reference rate from which fluctuating credit demand can envelop, but it’s also accessible to anyone with a few simple clicks.

Let’s explore the three-pronged demographics target of Anchor.

Depositor

On Anchor’s demand-side are the UST depositors. Users simply navigate to the  Anchor web app, and deposit UST into the “Earn” tab’s “Deposit” button, immediately accruing 20% APY. Users can also withdraw their UST at any point by clicking the “Withdraw” button and following the prompt.

Anchor deposits are designed with simplicity in mind so that they can be accessible by anyone. Tired of paltry national bank savings rates and don’t want to enter risk-on environments like equity markets? Deposit UST into Anchor with a few clicks.

With CoinList, non-US users can go from fiat → UST → Anchor within minutes. More fiat on-ramps, including some exceptionally convenient ones, are on the way too. To deposit UST into Anchor via CoinList, navigate to the  Anchor landing page, select “Deposit Now” and follow the prompt.

At a high level, the Anchor rate is subsidized by the cash flows (e.g., emissions + transaction fees) of PoS chains like Polkadot. Borrower collateral (staking derivatives) generate rewards, which are stabilized and provided to depositors at 20% APY. Any excess yield is drawn into the yield reserve, which serves as a backstop for maintaining Anchor’s target rate parity should the supply-side demand fall relative to the demand-side.

Initially, the ANC token reward incentives on Anchor will also change based on varying market conditions to support a stable Anchor rate.

For example:

  • If the real yield > the target yield THEN the ANC token incentives for borrowers drop by 15% per week.
  • If the staking yield is < the target yield THEN the ANC token incentives for borrowers increase 50% per week.

The Anchor rate will change based on the incorporation of new staking derivatives and is also a parameter of the protocol that can be changed by staking ANC and voting on proposals.

The Anchor rate serves as a viable refuge in market drawdowns induced by variable credit demand. If yields in DeFi are plummeting alongside blue-chip market prices, Anchor remains steady at 20% APY. This correlates to an augmented demand for UST in volatile, downward price conditions, which actually may help stave off sell-offs of LUNA during market volatility since progressively larger demand for UST equates to increased LUNA buying on the open market and swapping for UST — burning the LUNA in the process via the on-chain swap mechanism baked into Terra’s protocol.

In V2, Anchor will incorporate liquidation contracts via a liquidation queue that will ensure there are always buyers of collateral below the required LTV threshold for collateral. At launch, Anchor will utilize a keeper-based system with the liquidation queue. NOTE — this does not exclude smart contract risk.

For more technical details about liquidation contracts, you can read the docs here.

Borrower

Borrowers on the supply-side of Anchor lock-up staking derivatives from PoS chains as collateral in return for UST debt. The initial bAsset collateral will be bLUNA, which actually DOES NOT have to be staked to use as collateral on Anchor. Future PoS staking derivatives will need to be staked.

The collateral ratio for bLUNA will range between 150–200 percent and can be tweaked via ANC governance for different PoS staking derivatives.

To deposit bLUNA into Anchor, navigate to the Anchor web app, select the “Borrow” tab, click on the “Borrow” button, and follow the prompt.

For deeper technical details about borrowing, staking derivatives, and the Anchor target rate derived from PoS collateral, please refer to the bAsset docs here.

Yield from staking derivatives deposited as collateral by borrowers is passed to Anchor UST depositors. Excess yield beyond the Anchor target rate is drawn into the yield reserve, and a portion is used to buyback ANC on TerraSwap and disperse it to ANC token holders, borrowers, and liquidity providers based on the ANC token distribution schedule (outlined further down in this article).

One of the powerful features of borrowing against staking derivatives is that it unlocks the concept of  superfluid collateral within crypto markets. For example, with composable inter-chain DeFi, a Polkadot staker with bonded DOT in the Polkadot network can mint a staking derivative via the “Bond” tab on the Anchor web app, and borrow UST against their staked position. For many stakers, this enables more flexible capital deployment and allocation based on dynamic market conditions.

As a result, Anchor serves as a locus for inter-chain liquidity of some of the largest bonded positions within crypto — staked PoS tokens used in consensus, governance, and value capture. Capital efficiency within DeFi receives a net improvement via Anchor by providing optionality for PoS stakers that may need cash in a liquidity crunch (e.g., UST).

With UST functioning as one of the premier inter-chain stablecoins within DeFi (currently operating on Terra, Ethereum, and Binance Chain), borrowing against staked positions to receive UST is among the most composable options for entities in need of stablecoins to port around different blockchains for various purposes.

Additionally, a recent Delphi Daily report from Delphi Digital about Anchor highlights the effects of the demand for bLUNA in Anchor on LUNA’s supply:

“Initially, the only asset accepted as collateral on Anchor (and accruing ANC rewards) will be bLUNA. However, bLUNA will only be able to be created with LUNA, not with staked LUNA. This could potentially translate into a supply-side liquidity crisis for LUNA, as speculators rush to acquire the token in the market and deposit it as collateral in Anchor.

This liquidity crisis could be particularly pronounced as, of the total circulating supply, 69% is staked — which takes 3 weeks to unstake. This leaves around ~138M LUNA available in the market to be used to mint bLUNA and use as collateral within Anchor. However, we estimate that only a fraction (20–30%) of these ~138M tokens will be available on exchanges to be bought for use on Anchor. Thus, given the limited LUNA supply and expected increasing demand, a supply-side liquidity crisis could ensue in the coming weeks.”

Anchor also provides an avenue for margin trading LUNA natively on the Terra blockchain. By borrowing against bLUNA, users can use UST to buy more LUNA, effectively increasing their exposure to LUNA via debt collateralized by the same underlying asset, LUNA.

B2B Integration

The current elephant in the room for DeFi adoption is usability. The experience of navigating Ethereum’s Dark Forest and a morass of DeFi protocols in search of yield and Uniswap gems is not for the faint of heart — even for DeFi degens, let alone retail users. Anchor is imbued with the notion of simplicity serving as the ultimate point of gravity for mainstream users by masking the underlying complexity of DeFi on the front-end for depositors.

Behind the scenes, Anchor takes the power of composability, molds it, and presents it to the user via an intuitive user interface. But Anchor’s potential extends beyond that and enters the world of B2B integration as a conduit for mass adoption.

The Anchor API and SDK allow developers, digital wallets, fintech platforms, financial institutions, and other applications to trivially integrate Anchor’s savings rate as a feature into their platform. Hence, why we call it the “Stripe for Savings.”

Imagine the ability to embed 20% APY savings into a financial application as a draw for risk-savvy users looking for some kind of passive savings product beyond the app’s native features. It doesn’t even matter if it’s a financial application. It could be a social commerce app with its own digital wallet that integrates Anchor to appeal to a broader user set. Or it could simply be a fintech platform desiring to expand its features beyond payments and dive into another financial primitive — savings.

Consequently, interacting with Anchor may eventually morph into dozens of user-interfaces via a diverse array of applications. Users will have direct access to a decentralized FFR (DFR) without knowing that they’re tapping into a primitive of DeFi’s evolving yield curve.

To integrate with Anchor, please refer to the developer docs here.

The ANC Token

Anchor’s native token is ANC, which functions as a governance token that receives cash flows denominated in ANC — scaling linearly with Anchor’s TVL. This occurs because a portion of excess yield appropriated from staking derivatives on the supply-side is used to buyback ANC on TerraSwap and disperse it to ANC token holders.

The total supply of ANC is 1 billion and follows the cumulative distribution table below.

Cumulative Distribution Schedule of the ANC token

The ANC token distribution complete details can be found here. The final token distribution graphic is below.

Users can stake ANC on Anchor to vote on governance proposals, which include changing protocol parameters like collateralization ratios, listing new staking derivatives as collateral, and more. The ANC token will be used to set Anchor’s initial target rate yield, and again, will adjust as follows:

  • If real yield > target yield, the excess funds are reserved.
  • If real yield < target yield, reserves are used — and ANC incentives increase rapidly to increase borrowing demand.

Notably, the ANC token’s emission algorithm to calibrate borrowing demand is inspired by the AIMD algorithm that forms the centerpiece of TCP. Rewards hike to stimulate demand and vice versa. Regardless of the AIMD algo, the maximum supply will be the same as the distribution schedule as we set the emission_cap the same as the distribution schedule. So, if the Anchor deposit rate stays high enough, the actual circulating supply of ANC will decrease compared to the distribution schedule.

The ANC seed round was raised at a fully diluted valuation (FDV) of $100 million, with a token price set at $0.10. However, the initial token price for the UST pair on TerraSwap (with liquidity provided by TFL), will be set at half the seed round price — at $0.05.

TFL’s entire ANC airdrop from staked LUNA will be used to seed the liquidity of the initial UST/ANC pool. For more details about the ANC token, please refer to the ANC token docs page.

Unlocking Liquidity — Lido Finance & bAssets

We’re thrilled to collaborate with Lido Finance and their cutting-edge work with liquid staking derivatives in DeFi. Lido is the creator of stETH2.0, the liquid staking derivative for Ethereum 2.0, and operates as a DAO. Lido implemented the first staking derivative on Anchor, bLUNA, and is planning on extending the staking derivatives available on Anchor in the future.

bLUNA enables LUNA stakers to earn staking rewards while maintaining full transferability and control of their LUNA. The creation of bLUNA grants LUNA holders multiple benefits, including:

  • Earning staking rewards without locking up LUNA.
  • Let users stake/unstake LUNA at any point.
  • Reduce idiosyncratic risks associated with staking providers/validators.
  • Develop bLUNA as a building block for the Terra and Anchor protocols.
  • Provide users with a simple, flexible, and secure method of staking LUNA.

bLUNA is the first bAsset, which are bonded assets within Anchor representing tokenized ownership over staked PoS assets — including claims on their cash flows. bLUNA can be minted on Anchor to deploy as collateral on the supply-side (receiving UST), and are burned when borrower positions are closed. bLUNA tokens are pegged 1:1 with LUNA, and empower users to deploy staked positions as collateral across DeFi platforms — including Anchor.

“We are incredibly excited to support the Terra ecosystem and to provide bLUNA tokens as a way of empowering individuals and protocols across Terra,” says Vasiliy Shapovalov — Lido Dao Tech Lead. “The synergies between Lido and Terra/Achor make this a natural development for us, with bonded assets being an innovation which fits Lido perfectly.”

Lido’s governance is also expanding to Terra’s ecosystem, where token holders will vote in LUNA-specific protocol parameters (e.g., fees, validators, etc).

Fusing DeFi & TradFi

A decentralized federal funds rate (DFR) can be captured by tapping the unlevered yield of cash-flow generating assets that are tethered to macro conditions within crypto markets — staked assets of PoS blockchains. With Anchor, we inject the supply-side of a money market on Terra with liquid staking derivatives and convert it to an accessible, appealing, and stable reference rate for depositors.

While yields plummet in TradFi, dislocations abound due to centralized intervention, and DeFi struggles to manage short-term debt cycles fueled by speculative credit demand, Anchor remains robust. We welcome everyone to the Anchor community and look forward to how community-governance propels the protocol towards its full potential.

It’s time that DeFi meets TradFi and brings the mainstream along for the ride.

source : https://www.youtube.com/watch?v=a3OUSxsayo0

Would you like to earn TOKEN right now! ☞ CLICK HERE

How and Where to Buy Anchor Protocol (ANC)?

ANC has been listed on a number of crypto exchanges, unlike other main cryptocurrencies, it cannot be directly purchased with fiats money. However, You can still easily buy this coin by first buying Bitcoin, ETH, USDT from any large exchanges and then transfer to the exchange that offers to trade this coin, in this guide article we will walk you through in detail the steps to buy ANC

You will have to first buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT), BNB, BUSD …

We will use Binance Exchange here as it is one of the largest crypto exchanges that accept fiat deposits.

Binance is a popular cryptocurrency exchange which was started in China but then moved their headquarters to the crypto-friendly Island of Malta in the EU. Binance is popular for its crypto to crypto exchange services. Binance exploded onto the scene in the mania of 2017 and has since gone on to become the top crypto exchange in the world.

Once you finished the KYC process. You will be asked to add a payment method. Here you can either choose to provide a credit/debit card or use a bank transfer, and buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT), BNB, BUSD

SIGN UP ON BINANCE

Step by Step Guide : What is Binance | How to Create an account on Binance (Updated 2021)

Next step - Transfer your cryptos to an Altcoin Exchange

Since ANC is an altcoin we need to transfer our coins to an exchange that ANC can be traded. Below is a list of exchanges that offers to trade ANC in various market pairs, head to their websites and register for an account.

Once finished you will then need to make a BTC/ETH/USDT deposit to the exchange from Binance depending on the available market pairs. After the deposit is confirmed you may then purchase ANC from the exchange: MXC.COM, OKEx, Hoo, and AEX

SIGN UP ON MXC EXCHANGE

Apart from the exchange(s) above, there are a few popular crypto exchanges where they have decent daily trading volumes and a huge user base. This will ensure you will be able to sell your coins at any time and the fees will usually be lower. It is suggested that you also register on these exchanges since once ANC gets listed there it will attract a large amount of trading volumes from the users there, that means you will be having some great trading opportunities!

Top exchanges for token-coin trading. Follow instructions and make unlimited money

https://www.binance.com
https://www.bittrex.com
https://www.poloniex.com
https://www.bitfinex.com
https://www.huobi.com
https://www.mxc.ai
https://www.probit.com
https://www.gate.io
https://www.coinbase.com

Find more information ANC

WebsiteExplorerWhitepaperSource CodeSocial ChannelSocial Channel 2Social Channel 3DocumentationCoinmarketcap

🔺DISCLAIMER: Trading Cryptocurrency is VERY risky. Make sure that you understand these risks if you are a beginner. The Information in the post is my OPINION and not financial advice. You are responsible for what you do with your funds

Learn about Cryptocurrency in this article ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner

I hope this post will help you. If you liked this, please sharing it with others. Thank you!

#blockchain #bitcoin #anchor protocol #anc

What is GEEK

Buddha Community

What is Anchor Protocol (ANC) | What is Anchor Protocol token | What is ANC token

What is Anchor Protocol (ANC) | What is Anchor Protocol token | What is ANC token

We’re thrilled to present the newest flagship DeFi product of the Terra ecosystem — a decentralized money market that provisions a stable 20% APY to depositors on the demand side and a supply-side (e.g., borrowers) that only accepts liquid staking derivatives from major proof-of-stake (PoS) chains.

http://app.anchorprotocol.com/

Anchor is not your ordinary money market.

It’s designed to provide the benchmark interest rate for DeFi, the  first decentralized challenger to the Federal Funds Rate (FFR). It pools the only unlevered source of yield in DeFi, staking emissions from major PoS chains like Terra, Polkadot, Cosmos, Solana, and ETH 2.0. Deploying staking derivatives, Anchor stabilizes the cash flows from PoS staking positions and feeds them to depositors at a low-volatility benchmark rate.

We call it the “Stripe for Savings,” and envision Anchor becoming the first mass adopted savings product sourced from the DeFi market. Anchor is intuitive to use, offers attractive, stable interest rates to UST depositors, unlocks liquidity for PoS stakers, and is trivial to integrate into applications and fintech platforms via the Anchor API and SDK.

We’re proud to share that our official launch partner, CoinList, has integrated Anchor and will enable UST deposits for non-US users into Anchor directly from the exchange interface! We’re also thrilled to announce that Lido Finance, the DAO behind ETH 2.0 liquid staking derivatives, has implemented the first liquid staking derivative (bAsset) that can be used as collateral on Anchor right now — bLUNA.

It’s time for the composable and decentralized power of DeFi to meet the mainstream.

Welcome to the Anchor Rate — a fixed-income, DeFi-native interest rate that can serve as the reference rate for an emerging DeFi yield curve and pure household savings vehicle.

Why Anchor?

Before diving into the mechanics of Anchor, it’s important to provide some background and context on why it’s a uniquely appropriate product from 2 primary angles:

  1. The Macro Angle
  2. The Crypto-Native Angle

The Macro Angle

Savings has been deprecated for decades since the age of central bankers blossomed in the wake of WW1. Interventionist monetary policy became the standard as the world departed the gold standard and eschewed saving for the future for rapacious consumerism.

Today, central bankers are financial celebrities. Following Black Thursday, of March 2020, when fears of COVID-19’s economic havoc were peaking, the US Federal Reserve unleashed a torrent of stimulus ranging from open market operations to special-purpose debt vehicles and a ham-handed cut to the Federal Funds Rate — currently sitting at 0.25, the lowest ever. The goal? Plunge protection for the equities and bond markets falling synchronously — something not supposed to happen.

Often hailed as saviors, the underlying trade-off of rampant fiscal stimulus by central bankers (with no historical precedent) is difficult to grasp. But the cost is high.

Artificial suppression of interest rates has always operated as a drug. A quick hit, noticeable buzz, and tapering off of the short-term effects. However, in the long-run, perpetually low-interest rates pose significant latent effects, such as the continued devaluation of money (diluting savers and eventual implementation of capital controls), larger asset bubbles, and augmented consumerism.

But the reverse strategy, hiking interest rates, is just as daunting for the central bankers.

As Arrington XRP Capital puts it in their Anchor Protocol report:

“The monetary authorities are caught in an incredible double bind. With rates close to zero, they are running out of options. Central banks must choose between two compromising worlds, each as violent and painful as the other.

They can flood the system with liquidity and keep interest rates low, waging war on any spike in treasury yields by controlling the yield curve (YCC). This first option — an uncompromising commitment to the fifty-year status quo — risks runaway inflation and possibly even hyperinflation in the long run.

On the other hand, they can raise rates and reject extreme measures like YCC. A hawkish stance takes away the medicine and risks de-leveraging an economy reliant on cheap leverage. This second option pricks the asset bubble, unwinds the Five Micro Bubbles, and leads to a deep, painful recession.”

With two bad options, the Fed is left with a decision that only affects savers negatively. Dilute their savings further or trigger a recession.

Yield is deflated across the board of legacy markets. Retail investors are increasingly cornered into riskier investment strategies in the equity markets, and the FFR is stagnant at an all-time low with no signs that it will be raised anytime soon.

So when investors eternally in the search of low-risk, passive yield find themselves amid an unprecedented, yield-starved macro environment — where should they turn?

Enter DeFi.

The Crypto-Native Angle

When the short and long-term debt cycles of the macroeconomic environment are plagued by artificial suppression of interest rates, low-risk yield is scarce and the market is risk-on. Assets are inflated by a deluge of new money, leverage is high, and everyone is arguing over inflation expectations.

DeFi provides a refuge from the doldrums of the Keynesian “boom and bust” cycle. Rather than being masked in obscurity like government bailouts for proprietors of CDO-cubed during the 2008 financial crisis, DeFi is out in the open. Anonymous users scour open-source smart contracts of emerging money legos applications looking for the next YFI, yield farming gem, or some other degen opportunity.

Good thing yield in DeFi is flourishing. With a massive bull market currently underway, demand for margin is high as degen traders, professional funds, and whale farmers battle for passive cash flow streams via liquidity provision and asymmetric payouts using leverage.

DeFi’s yield is pure, not dislocated by a centralized intervention. DeFi’s yield is wild, erratic, yet wholesome. It represents the transparent and massive on-chain demand for credit in what its ardent followers believe is a new financial system. But such machinations are nothing new. Variable debt cycles based on fluctuating credit demand reminiscent of TradFi occur in DeFi too, like towards the end of the Summer of DeFi in 2020 when yields plummeted alongside sharp price drawdowns.

DeFi needs fixed-income instruments. Its high-yield, variable interest rates are derived by leveraged demand for credit — an issue afflicting TradFi markets at their core as well. Projecting future LP cash flows based on incumbent money market interest rates is fickle since they’re variable. Retail users will never care to navigate DeFi’s entangled protocols searching for the best yield either.

Fixed income instruments offer simplicity, but in DeFi, also much more.

The beauty of DeFi is that it’s not beholden to artificial rate suppression. Permissionless networks and their composability enable new tooling and on-chain innovation not possible with legacy finance. They allow for the creation of a benchmark rate to reference as an industry yield curve develops.

So how do you kill two birds with one stone? How to provide mainstream investors starved for yield with an accessible, stable, attractive, and risk-off savings vehicle while concurrently creating a benchmark rate for DeFi to reference?

The transparency, composability, and censorship-resistance of DeFi are the zero-to-one innovations. Let’s use them to create a decentralized federal funds rate, an Anchor rate for DeFi’s burgeoning credit market. One that is unlevered, has low volatility, and sources cash flows from macro-tethered protocols — PoS blockchains. Accessible to all.

What is Anchor?

Anchor is a decentralized money market and savings protocol built on top of the Terra blockchain. It fulfills the trifecta of Terraform Lab’s vision for implementing the 3 financial primitives of finance (savings, payments, and investing) on the Terra network. Anchor operates similarly to most DeFi money markets (e.g., Compound) with the caveat of furnishing stable yield to depositors (lenders) and only allowing liquid staking derivatives from PoS chains as collateral for borrowers.

Anchor tethers its 20% APY interest rate to the inflation, cashflows, and macro-connection of PoS chains to the crypto market. Not only does it provide a reference rate from which fluctuating credit demand can envelop, but it’s also accessible to anyone with a few simple clicks.

Let’s explore the three-pronged demographics target of Anchor.

Depositor

On Anchor’s demand-side are the UST depositors. Users simply navigate to the  Anchor web app, and deposit UST into the “Earn” tab’s “Deposit” button, immediately accruing 20% APY. Users can also withdraw their UST at any point by clicking the “Withdraw” button and following the prompt.

Anchor deposits are designed with simplicity in mind so that they can be accessible by anyone. Tired of paltry national bank savings rates and don’t want to enter risk-on environments like equity markets? Deposit UST into Anchor with a few clicks.

With CoinList, non-US users can go from fiat → UST → Anchor within minutes. More fiat on-ramps, including some exceptionally convenient ones, are on the way too. To deposit UST into Anchor via CoinList, navigate to the  Anchor landing page, select “Deposit Now” and follow the prompt.

At a high level, the Anchor rate is subsidized by the cash flows (e.g., emissions + transaction fees) of PoS chains like Polkadot. Borrower collateral (staking derivatives) generate rewards, which are stabilized and provided to depositors at 20% APY. Any excess yield is drawn into the yield reserve, which serves as a backstop for maintaining Anchor’s target rate parity should the supply-side demand fall relative to the demand-side.

Initially, the ANC token reward incentives on Anchor will also change based on varying market conditions to support a stable Anchor rate.

For example:

  • If the real yield > the target yield THEN the ANC token incentives for borrowers drop by 15% per week.
  • If the staking yield is < the target yield THEN the ANC token incentives for borrowers increase 50% per week.

The Anchor rate will change based on the incorporation of new staking derivatives and is also a parameter of the protocol that can be changed by staking ANC and voting on proposals.

The Anchor rate serves as a viable refuge in market drawdowns induced by variable credit demand. If yields in DeFi are plummeting alongside blue-chip market prices, Anchor remains steady at 20% APY. This correlates to an augmented demand for UST in volatile, downward price conditions, which actually may help stave off sell-offs of LUNA during market volatility since progressively larger demand for UST equates to increased LUNA buying on the open market and swapping for UST — burning the LUNA in the process via the on-chain swap mechanism baked into Terra’s protocol.

In V2, Anchor will incorporate liquidation contracts via a liquidation queue that will ensure there are always buyers of collateral below the required LTV threshold for collateral. At launch, Anchor will utilize a keeper-based system with the liquidation queue. NOTE — this does not exclude smart contract risk.

For more technical details about liquidation contracts, you can read the docs here.

Borrower

Borrowers on the supply-side of Anchor lock-up staking derivatives from PoS chains as collateral in return for UST debt. The initial bAsset collateral will be bLUNA, which actually DOES NOT have to be staked to use as collateral on Anchor. Future PoS staking derivatives will need to be staked.

The collateral ratio for bLUNA will range between 150–200 percent and can be tweaked via ANC governance for different PoS staking derivatives.

To deposit bLUNA into Anchor, navigate to the Anchor web app, select the “Borrow” tab, click on the “Borrow” button, and follow the prompt.

For deeper technical details about borrowing, staking derivatives, and the Anchor target rate derived from PoS collateral, please refer to the bAsset docs here.

Yield from staking derivatives deposited as collateral by borrowers is passed to Anchor UST depositors. Excess yield beyond the Anchor target rate is drawn into the yield reserve, and a portion is used to buyback ANC on TerraSwap and disperse it to ANC token holders, borrowers, and liquidity providers based on the ANC token distribution schedule (outlined further down in this article).

One of the powerful features of borrowing against staking derivatives is that it unlocks the concept of  superfluid collateral within crypto markets. For example, with composable inter-chain DeFi, a Polkadot staker with bonded DOT in the Polkadot network can mint a staking derivative via the “Bond” tab on the Anchor web app, and borrow UST against their staked position. For many stakers, this enables more flexible capital deployment and allocation based on dynamic market conditions.

As a result, Anchor serves as a locus for inter-chain liquidity of some of the largest bonded positions within crypto — staked PoS tokens used in consensus, governance, and value capture. Capital efficiency within DeFi receives a net improvement via Anchor by providing optionality for PoS stakers that may need cash in a liquidity crunch (e.g., UST).

With UST functioning as one of the premier inter-chain stablecoins within DeFi (currently operating on Terra, Ethereum, and Binance Chain), borrowing against staked positions to receive UST is among the most composable options for entities in need of stablecoins to port around different blockchains for various purposes.

Additionally, a recent Delphi Daily report from Delphi Digital about Anchor highlights the effects of the demand for bLUNA in Anchor on LUNA’s supply:

“Initially, the only asset accepted as collateral on Anchor (and accruing ANC rewards) will be bLUNA. However, bLUNA will only be able to be created with LUNA, not with staked LUNA. This could potentially translate into a supply-side liquidity crisis for LUNA, as speculators rush to acquire the token in the market and deposit it as collateral in Anchor.

This liquidity crisis could be particularly pronounced as, of the total circulating supply, 69% is staked — which takes 3 weeks to unstake. This leaves around ~138M LUNA available in the market to be used to mint bLUNA and use as collateral within Anchor. However, we estimate that only a fraction (20–30%) of these ~138M tokens will be available on exchanges to be bought for use on Anchor. Thus, given the limited LUNA supply and expected increasing demand, a supply-side liquidity crisis could ensue in the coming weeks.”

Anchor also provides an avenue for margin trading LUNA natively on the Terra blockchain. By borrowing against bLUNA, users can use UST to buy more LUNA, effectively increasing their exposure to LUNA via debt collateralized by the same underlying asset, LUNA.

B2B Integration

The current elephant in the room for DeFi adoption is usability. The experience of navigating Ethereum’s Dark Forest and a morass of DeFi protocols in search of yield and Uniswap gems is not for the faint of heart — even for DeFi degens, let alone retail users. Anchor is imbued with the notion of simplicity serving as the ultimate point of gravity for mainstream users by masking the underlying complexity of DeFi on the front-end for depositors.

Behind the scenes, Anchor takes the power of composability, molds it, and presents it to the user via an intuitive user interface. But Anchor’s potential extends beyond that and enters the world of B2B integration as a conduit for mass adoption.

The Anchor API and SDK allow developers, digital wallets, fintech platforms, financial institutions, and other applications to trivially integrate Anchor’s savings rate as a feature into their platform. Hence, why we call it the “Stripe for Savings.”

Imagine the ability to embed 20% APY savings into a financial application as a draw for risk-savvy users looking for some kind of passive savings product beyond the app’s native features. It doesn’t even matter if it’s a financial application. It could be a social commerce app with its own digital wallet that integrates Anchor to appeal to a broader user set. Or it could simply be a fintech platform desiring to expand its features beyond payments and dive into another financial primitive — savings.

Consequently, interacting with Anchor may eventually morph into dozens of user-interfaces via a diverse array of applications. Users will have direct access to a decentralized FFR (DFR) without knowing that they’re tapping into a primitive of DeFi’s evolving yield curve.

To integrate with Anchor, please refer to the developer docs here.

The ANC Token

Anchor’s native token is ANC, which functions as a governance token that receives cash flows denominated in ANC — scaling linearly with Anchor’s TVL. This occurs because a portion of excess yield appropriated from staking derivatives on the supply-side is used to buyback ANC on TerraSwap and disperse it to ANC token holders.

The total supply of ANC is 1 billion and follows the cumulative distribution table below.

Cumulative Distribution Schedule of the ANC token

The ANC token distribution complete details can be found here. The final token distribution graphic is below.

Users can stake ANC on Anchor to vote on governance proposals, which include changing protocol parameters like collateralization ratios, listing new staking derivatives as collateral, and more. The ANC token will be used to set Anchor’s initial target rate yield, and again, will adjust as follows:

  • If real yield > target yield, the excess funds are reserved.
  • If real yield < target yield, reserves are used — and ANC incentives increase rapidly to increase borrowing demand.

Notably, the ANC token’s emission algorithm to calibrate borrowing demand is inspired by the AIMD algorithm that forms the centerpiece of TCP. Rewards hike to stimulate demand and vice versa. Regardless of the AIMD algo, the maximum supply will be the same as the distribution schedule as we set the emission_cap the same as the distribution schedule. So, if the Anchor deposit rate stays high enough, the actual circulating supply of ANC will decrease compared to the distribution schedule.

The ANC seed round was raised at a fully diluted valuation (FDV) of $100 million, with a token price set at $0.10. However, the initial token price for the UST pair on TerraSwap (with liquidity provided by TFL), will be set at half the seed round price — at $0.05.

TFL’s entire ANC airdrop from staked LUNA will be used to seed the liquidity of the initial UST/ANC pool. For more details about the ANC token, please refer to the ANC token docs page.

Unlocking Liquidity — Lido Finance & bAssets

We’re thrilled to collaborate with Lido Finance and their cutting-edge work with liquid staking derivatives in DeFi. Lido is the creator of stETH2.0, the liquid staking derivative for Ethereum 2.0, and operates as a DAO. Lido implemented the first staking derivative on Anchor, bLUNA, and is planning on extending the staking derivatives available on Anchor in the future.

bLUNA enables LUNA stakers to earn staking rewards while maintaining full transferability and control of their LUNA. The creation of bLUNA grants LUNA holders multiple benefits, including:

  • Earning staking rewards without locking up LUNA.
  • Let users stake/unstake LUNA at any point.
  • Reduce idiosyncratic risks associated with staking providers/validators.
  • Develop bLUNA as a building block for the Terra and Anchor protocols.
  • Provide users with a simple, flexible, and secure method of staking LUNA.

bLUNA is the first bAsset, which are bonded assets within Anchor representing tokenized ownership over staked PoS assets — including claims on their cash flows. bLUNA can be minted on Anchor to deploy as collateral on the supply-side (receiving UST), and are burned when borrower positions are closed. bLUNA tokens are pegged 1:1 with LUNA, and empower users to deploy staked positions as collateral across DeFi platforms — including Anchor.

“We are incredibly excited to support the Terra ecosystem and to provide bLUNA tokens as a way of empowering individuals and protocols across Terra,” says Vasiliy Shapovalov — Lido Dao Tech Lead. “The synergies between Lido and Terra/Achor make this a natural development for us, with bonded assets being an innovation which fits Lido perfectly.”

Lido’s governance is also expanding to Terra’s ecosystem, where token holders will vote in LUNA-specific protocol parameters (e.g., fees, validators, etc).

Fusing DeFi & TradFi

A decentralized federal funds rate (DFR) can be captured by tapping the unlevered yield of cash-flow generating assets that are tethered to macro conditions within crypto markets — staked assets of PoS blockchains. With Anchor, we inject the supply-side of a money market on Terra with liquid staking derivatives and convert it to an accessible, appealing, and stable reference rate for depositors.

While yields plummet in TradFi, dislocations abound due to centralized intervention, and DeFi struggles to manage short-term debt cycles fueled by speculative credit demand, Anchor remains robust. We welcome everyone to the Anchor community and look forward to how community-governance propels the protocol towards its full potential.

It’s time that DeFi meets TradFi and brings the mainstream along for the ride.

source : https://www.youtube.com/watch?v=a3OUSxsayo0

Would you like to earn TOKEN right now! ☞ CLICK HERE

How and Where to Buy Anchor Protocol (ANC)?

ANC has been listed on a number of crypto exchanges, unlike other main cryptocurrencies, it cannot be directly purchased with fiats money. However, You can still easily buy this coin by first buying Bitcoin, ETH, USDT from any large exchanges and then transfer to the exchange that offers to trade this coin, in this guide article we will walk you through in detail the steps to buy ANC

You will have to first buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT), BNB, BUSD …

We will use Binance Exchange here as it is one of the largest crypto exchanges that accept fiat deposits.

Binance is a popular cryptocurrency exchange which was started in China but then moved their headquarters to the crypto-friendly Island of Malta in the EU. Binance is popular for its crypto to crypto exchange services. Binance exploded onto the scene in the mania of 2017 and has since gone on to become the top crypto exchange in the world.

Once you finished the KYC process. You will be asked to add a payment method. Here you can either choose to provide a credit/debit card or use a bank transfer, and buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT), BNB, BUSD

SIGN UP ON BINANCE

Step by Step Guide : What is Binance | How to Create an account on Binance (Updated 2021)

Next step - Transfer your cryptos to an Altcoin Exchange

Since ANC is an altcoin we need to transfer our coins to an exchange that ANC can be traded. Below is a list of exchanges that offers to trade ANC in various market pairs, head to their websites and register for an account.

Once finished you will then need to make a BTC/ETH/USDT deposit to the exchange from Binance depending on the available market pairs. After the deposit is confirmed you may then purchase ANC from the exchange: MXC.COM, OKEx, Hoo, and AEX

SIGN UP ON MXC EXCHANGE

Apart from the exchange(s) above, there are a few popular crypto exchanges where they have decent daily trading volumes and a huge user base. This will ensure you will be able to sell your coins at any time and the fees will usually be lower. It is suggested that you also register on these exchanges since once ANC gets listed there it will attract a large amount of trading volumes from the users there, that means you will be having some great trading opportunities!

Top exchanges for token-coin trading. Follow instructions and make unlimited money

https://www.binance.com
https://www.bittrex.com
https://www.poloniex.com
https://www.bitfinex.com
https://www.huobi.com
https://www.mxc.ai
https://www.probit.com
https://www.gate.io
https://www.coinbase.com

Find more information ANC

WebsiteExplorerWhitepaperSource CodeSocial ChannelSocial Channel 2Social Channel 3DocumentationCoinmarketcap

🔺DISCLAIMER: Trading Cryptocurrency is VERY risky. Make sure that you understand these risks if you are a beginner. The Information in the post is my OPINION and not financial advice. You are responsible for what you do with your funds

Learn about Cryptocurrency in this article ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner

I hope this post will help you. If you liked this, please sharing it with others. Thank you!

#blockchain #bitcoin #anchor protocol #anc

Words Counted: A Ruby Natural Language Processor.

WordsCounted

We are all in the gutter, but some of us are looking at the stars.

-- Oscar Wilde

WordsCounted is a Ruby NLP (natural language processor). WordsCounted lets you implement powerful tokensation strategies with a very flexible tokeniser class.

Are you using WordsCounted to do something interesting? Please tell me about it.

 

Demo

Visit this website for one example of what you can do with WordsCounted.

Features

  • Out of the box, get the following data from any string or readable file, or URL:
    • Token count and unique token count
    • Token densities, frequencies, and lengths
    • Char count and average chars per token
    • The longest tokens and their lengths
    • The most frequent tokens and their frequencies.
  • A flexible way to exclude tokens from the tokeniser. You can pass a string, regexp, symbol, lambda, or an array of any combination of those types for powerful tokenisation strategies.
  • Pass your own regexp rules to the tokeniser if you prefer. The default regexp filters special characters but keeps hyphens and apostrophes. It also plays nicely with diacritics (UTF and unicode characters): Bayrūt is treated as ["Bayrūt"] and not ["Bayr", "ū", "t"], for example.
  • Opens and reads files. Pass in a file path or a url instead of a string.

Installation

Add this line to your application's Gemfile:

gem 'words_counted'

And then execute:

$ bundle

Or install it yourself as:

$ gem install words_counted

Usage

Pass in a string or a file path, and an optional filter and/or regexp.

counter = WordsCounted.count(
  "We are all in the gutter, but some of us are looking at the stars."
)

# Using a file
counter = WordsCounted.from_file("path/or/url/to/my/file.txt")

.count and .from_file are convenience methods that take an input, tokenise it, and return an instance of WordsCounted::Counter initialized with the tokens. The WordsCounted::Tokeniser and WordsCounted::Counter classes can be used alone, however.

API

WordsCounted

WordsCounted.count(input, options = {})

Tokenises input and initializes a WordsCounted::Counter object with the resulting tokens.

counter = WordsCounted.count("Hello Beirut!")

Accepts two options: exclude and regexp. See Excluding tokens from the analyser and Passing in a custom regexp respectively.

WordsCounted.from_file(path, options = {})

Reads and tokenises a file, and initializes a WordsCounted::Counter object with the resulting tokens.

counter = WordsCounted.from_file("hello_beirut.txt")

Accepts the same options as .count.

Tokeniser

The tokeniser allows you to tokenise text in a variety of ways. You can pass in your own rules for tokenisation, and apply a powerful filter with any combination of rules as long as they can boil down into a lambda.

Out of the box the tokeniser includes only alpha chars. Hyphenated tokens and tokens with apostrophes are considered a single token.

#tokenise([pattern: TOKEN_REGEXP, exclude: nil])

tokeniser = WordsCounted::Tokeniser.new("Hello Beirut!").tokenise

# With `exclude`
tokeniser = WordsCounted::Tokeniser.new("Hello Beirut!").tokenise(exclude: "hello")

# With `pattern`
tokeniser = WordsCounted::Tokeniser.new("I <3 Beirut!").tokenise(pattern: /[a-z]/i)

See Excluding tokens from the analyser and Passing in a custom regexp for more information.

Counter

The WordsCounted::Counter class allows you to collect various statistics from an array of tokens.

#token_count

Returns the token count of a given string.

counter.token_count #=> 15

#token_frequency

Returns a sorted (unstable) two-dimensional array where each element is a token and its frequency. The array is sorted by frequency in descending order.

counter.token_frequency

[
  ["the", 2],
  ["are", 2],
  ["we",  1],
  # ...
  ["all", 1]
]

#most_frequent_tokens

Returns a hash where each key-value pair is a token and its frequency.

counter.most_frequent_tokens

{ "are" => 2, "the" => 2 }

#token_lengths

Returns a sorted (unstable) two-dimentional array where each element contains a token and its length. The array is sorted by length in descending order.

counter.token_lengths

[
  ["looking", 7],
  ["gutter",  6],
  ["stars",   5],
  # ...
  ["in",      2]
]

#longest_tokens

Returns a hash where each key-value pair is a token and its length.

counter.longest_tokens

{ "looking" => 7 }

#token_density([ precision: 2 ])

Returns a sorted (unstable) two-dimentional array where each element contains a token and its density as a float, rounded to a precision of two. The array is sorted by density in descending order. It accepts a precision argument, which must be a float.

counter.token_density

[
  ["are",     0.13],
  ["the",     0.13],
  ["but",     0.07 ],
  # ...
  ["we",      0.07 ]
]

#char_count

Returns the char count of tokens.

counter.char_count #=> 76

#average_chars_per_token([ precision: 2 ])

Returns the average char count per token rounded to two decimal places. Accepts a precision argument which defaults to two. Precision must be a float.

counter.average_chars_per_token #=> 4

#uniq_token_count

Returns the number of unique tokens.

counter.uniq_token_count #=> 13

Excluding tokens from the tokeniser

You can exclude anything you want from the input by passing the exclude option. The exclude option accepts a variety of filters and is extremely flexible.

  1. A space-delimited string. The filter will normalise the string.
  2. A regular expression.
  3. A lambda.
  4. A symbol that names a predicate method. For example :odd?.
  5. An array of any combination of the above.
tokeniser =
  WordsCounted::Tokeniser.new(
    "Magnificent! That was magnificent, Trevor."
  )

# Using a string
tokeniser.tokenise(exclude: "was magnificent")
# => ["that", "trevor"]

# Using a regular expression
tokeniser.tokenise(exclude: /trevor/)
# => ["magnificent", "that", "was", "magnificent"]

# Using a lambda
tokeniser.tokenise(exclude: ->(t) { t.length < 4 })
# => ["magnificent", "that", "magnificent", "trevor"]

# Using symbol
tokeniser = WordsCounted::Tokeniser.new("Hello! محمد")
tokeniser.tokenise(exclude: :ascii_only?)
# => ["محمد"]

# Using an array
tokeniser = WordsCounted::Tokeniser.new(
  "Hello! اسماءنا هي محمد، كارولينا، سامي، وداني"
)
tokeniser.tokenise(
  exclude: [:ascii_only?, /محمد/, ->(t) { t.length > 6}, "و"]
)
# => ["هي", "سامي", "وداني"]

Passing in a custom regexp

The default regexp accounts for letters, hyphenated tokens, and apostrophes. This means twenty-one is treated as one token. So is Mohamad's.

/[\p{Alpha}\-']+/

You can pass your own criteria as a Ruby regular expression to split your string as desired.

For example, if you wanted to include numbers, you can override the regular expression:

counter = WordsCounted.count("Numbers 1, 2, and 3", pattern: /[\p{Alnum}\-']+/)
counter.tokens
#=> ["numbers", "1", "2", "and", "3"]

Opening and reading files

Use the from_file method to open files. from_file accepts the same options as .count. The file path can be a URL.

counter = WordsCounted.from_file("url/or/path/to/file.text")

Gotchas

A hyphen used in leu of an em or en dash will form part of the token. This affects the tokeniser algorithm.

counter = WordsCounted.count("How do you do?-you are well, I see.")
counter.token_frequency

[
  ["do",   2],
  ["how",  1],
  ["you",  1],
  ["-you", 1], # WTF, mate!
  ["are",  1],
  # ...
]

In this example -you and you are separate tokens. Also, the tokeniser does not include numbers by default. Remember that you can pass your own regular expression if the default behaviour does not fit your needs.

A note on case sensitivity

The program will normalise (downcase) all incoming strings for consistency and filters.

Roadmap

Ability to open URLs

def self.from_url
  # open url and send string here after removing html
end

Contributors

See contributors.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author: abitdodgy
Source code: https://github.com/abitdodgy/words_counted
License: MIT license

#ruby  #ruby-on-rails 

Royce  Reinger

Royce Reinger

1658068560

WordsCounted: A Ruby Natural Language Processor

WordsCounted

We are all in the gutter, but some of us are looking at the stars.

-- Oscar Wilde

WordsCounted is a Ruby NLP (natural language processor). WordsCounted lets you implement powerful tokensation strategies with a very flexible tokeniser class.

Features

  • Out of the box, get the following data from any string or readable file, or URL:
    • Token count and unique token count
    • Token densities, frequencies, and lengths
    • Char count and average chars per token
    • The longest tokens and their lengths
    • The most frequent tokens and their frequencies.
  • A flexible way to exclude tokens from the tokeniser. You can pass a string, regexp, symbol, lambda, or an array of any combination of those types for powerful tokenisation strategies.
  • Pass your own regexp rules to the tokeniser if you prefer. The default regexp filters special characters but keeps hyphens and apostrophes. It also plays nicely with diacritics (UTF and unicode characters): Bayrūt is treated as ["Bayrūt"] and not ["Bayr", "ū", "t"], for example.
  • Opens and reads files. Pass in a file path or a url instead of a string.

Installation

Add this line to your application's Gemfile:

gem 'words_counted'

And then execute:

$ bundle

Or install it yourself as:

$ gem install words_counted

Usage

Pass in a string or a file path, and an optional filter and/or regexp.

counter = WordsCounted.count(
  "We are all in the gutter, but some of us are looking at the stars."
)

# Using a file
counter = WordsCounted.from_file("path/or/url/to/my/file.txt")

.count and .from_file are convenience methods that take an input, tokenise it, and return an instance of WordsCounted::Counter initialized with the tokens. The WordsCounted::Tokeniser and WordsCounted::Counter classes can be used alone, however.

API

WordsCounted

WordsCounted.count(input, options = {})

Tokenises input and initializes a WordsCounted::Counter object with the resulting tokens.

counter = WordsCounted.count("Hello Beirut!")

Accepts two options: exclude and regexp. See Excluding tokens from the analyser and Passing in a custom regexp respectively.

WordsCounted.from_file(path, options = {})

Reads and tokenises a file, and initializes a WordsCounted::Counter object with the resulting tokens.

counter = WordsCounted.from_file("hello_beirut.txt")

Accepts the same options as .count.

Tokeniser

The tokeniser allows you to tokenise text in a variety of ways. You can pass in your own rules for tokenisation, and apply a powerful filter with any combination of rules as long as they can boil down into a lambda.

Out of the box the tokeniser includes only alpha chars. Hyphenated tokens and tokens with apostrophes are considered a single token.

#tokenise([pattern: TOKEN_REGEXP, exclude: nil])

tokeniser = WordsCounted::Tokeniser.new("Hello Beirut!").tokenise

# With `exclude`
tokeniser = WordsCounted::Tokeniser.new("Hello Beirut!").tokenise(exclude: "hello")

# With `pattern`
tokeniser = WordsCounted::Tokeniser.new("I <3 Beirut!").tokenise(pattern: /[a-z]/i)

See Excluding tokens from the analyser and Passing in a custom regexp for more information.

Counter

The WordsCounted::Counter class allows you to collect various statistics from an array of tokens.

#token_count

Returns the token count of a given string.

counter.token_count #=> 15

#token_frequency

Returns a sorted (unstable) two-dimensional array where each element is a token and its frequency. The array is sorted by frequency in descending order.

counter.token_frequency

[
  ["the", 2],
  ["are", 2],
  ["we",  1],
  # ...
  ["all", 1]
]

#most_frequent_tokens

Returns a hash where each key-value pair is a token and its frequency.

counter.most_frequent_tokens

{ "are" => 2, "the" => 2 }

#token_lengths

Returns a sorted (unstable) two-dimentional array where each element contains a token and its length. The array is sorted by length in descending order.

counter.token_lengths

[
  ["looking", 7],
  ["gutter",  6],
  ["stars",   5],
  # ...
  ["in",      2]
]

#longest_tokens

Returns a hash where each key-value pair is a token and its length.

counter.longest_tokens

{ "looking" => 7 }

#token_density([ precision: 2 ])

Returns a sorted (unstable) two-dimentional array where each element contains a token and its density as a float, rounded to a precision of two. The array is sorted by density in descending order. It accepts a precision argument, which must be a float.

counter.token_density

[
  ["are",     0.13],
  ["the",     0.13],
  ["but",     0.07 ],
  # ...
  ["we",      0.07 ]
]

#char_count

Returns the char count of tokens.

counter.char_count #=> 76

#average_chars_per_token([ precision: 2 ])

Returns the average char count per token rounded to two decimal places. Accepts a precision argument which defaults to two. Precision must be a float.

counter.average_chars_per_token #=> 4

#uniq_token_count

Returns the number of unique tokens.

counter.uniq_token_count #=> 13

Excluding tokens from the tokeniser

You can exclude anything you want from the input by passing the exclude option. The exclude option accepts a variety of filters and is extremely flexible.

  1. A space-delimited string. The filter will normalise the string.
  2. A regular expression.
  3. A lambda.
  4. A symbol that names a predicate method. For example :odd?.
  5. An array of any combination of the above.
tokeniser =
  WordsCounted::Tokeniser.new(
    "Magnificent! That was magnificent, Trevor."
  )

# Using a string
tokeniser.tokenise(exclude: "was magnificent")
# => ["that", "trevor"]

# Using a regular expression
tokeniser.tokenise(exclude: /trevor/)
# => ["magnificent", "that", "was", "magnificent"]

# Using a lambda
tokeniser.tokenise(exclude: ->(t) { t.length < 4 })
# => ["magnificent", "that", "magnificent", "trevor"]

# Using symbol
tokeniser = WordsCounted::Tokeniser.new("Hello! محمد")
tokeniser.tokenise(exclude: :ascii_only?)
# => ["محمد"]

# Using an array
tokeniser = WordsCounted::Tokeniser.new(
  "Hello! اسماءنا هي محمد، كارولينا، سامي، وداني"
)
tokeniser.tokenise(
  exclude: [:ascii_only?, /محمد/, ->(t) { t.length > 6}, "و"]
)
# => ["هي", "سامي", "وداني"]

Passing in a custom regexp

The default regexp accounts for letters, hyphenated tokens, and apostrophes. This means twenty-one is treated as one token. So is Mohamad's.

/[\p{Alpha}\-']+/

You can pass your own criteria as a Ruby regular expression to split your string as desired.

For example, if you wanted to include numbers, you can override the regular expression:

counter = WordsCounted.count("Numbers 1, 2, and 3", pattern: /[\p{Alnum}\-']+/)
counter.tokens
#=> ["numbers", "1", "2", "and", "3"]

Opening and reading files

Use the from_file method to open files. from_file accepts the same options as .count. The file path can be a URL.

counter = WordsCounted.from_file("url/or/path/to/file.text")

Gotchas

A hyphen used in leu of an em or en dash will form part of the token. This affects the tokeniser algorithm.

counter = WordsCounted.count("How do you do?-you are well, I see.")
counter.token_frequency

[
  ["do",   2],
  ["how",  1],
  ["you",  1],
  ["-you", 1], # WTF, mate!
  ["are",  1],
  # ...
]

In this example -you and you are separate tokens. Also, the tokeniser does not include numbers by default. Remember that you can pass your own regular expression if the default behaviour does not fit your needs.

A note on case sensitivity

The program will normalise (downcase) all incoming strings for consistency and filters.

Roadmap

Ability to open URLs

def self.from_url
  # open url and send string here after removing html
end

Are you using WordsCounted to do something interesting? Please tell me about it.

Gem Version 

RubyDoc documentation.

Demo

Visit this website for one example of what you can do with WordsCounted.


Contributors

See contributors.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author: Abitdodgy
Source Code: https://github.com/abitdodgy/words_counted 
License: MIT license

#ruby #nlp 

aaron silva

aaron silva

1622197808

SafeMoon Clone | Create A DeFi Token Like SafeMoon | DeFi token like SafeMoon

SafeMoon is a decentralized finance (DeFi) token. This token consists of RFI tokenomics and auto-liquidity generating protocol. A DeFi token like SafeMoon has reached the mainstream standards under the Binance Smart Chain. Its success and popularity have been immense, thus, making the majority of the business firms adopt this style of cryptocurrency as an alternative.

A DeFi token like SafeMoon is almost similar to the other crypto-token, but the only difference being that it charges a 10% transaction fee from the users who sell their tokens, in which 5% of the fee is distributed to the remaining SafeMoon owners. This feature rewards the owners for holding onto their tokens.

Read More @ https://bit.ly/3oFbJoJ

#create a defi token like safemoon #defi token like safemoon #safemoon token #safemoon token clone #defi token

Best of Crypto

Best of Crypto

1653621660

Anchor.js: The JavaScript SDK for Anchor Protocol

Anchor.js

Anchor.js is a client SDK for building applications that can interact with Anchor Protocol from within JavaScript runtimes, such as web browsers, server backends, and on mobile through React Native.

You can find a reference of the Anchor.js API here.

Getting Anchor.js

Anchor.js is available as a package on NPM and is intended to be used alongside Terra.js.

Add both:

  • @terra-money/terra.js
  • @anchor-protocol/anchor.js

To your JavaScript project's package.json as dependencies using your preferred package manager:

$ npm install -S @terra-money/terra.js @anchor-protocol/anchor.js

Usage

Using Facades

Anchor.js provides class wrapper facade for the usual operations available on webapp.

import { LCDClient, MnemonicKey, Fee, Wallet } from '@terra-money/terra.js'
import { Anchor, columbus5, AddressProviderFromJson, MARKET_DENOMS, OperationGasParameters } from '@anchor-protocol/anchor.js'

const addressProvider = new AddressProviderFromJson(columbus5)
const lcd = new LCDClient({ URL: 'https://lcd.terra.dev', chainID: 'columbus-5' })
const key = new MnemonicKey({
  mnemonic: 'your key'
})
const wallet = new Wallet(lcd, key)
const anchor = new Anchor(lcd, addressProvider)

// you can generate message only, using your wallet
const msgs = anchor.earn.depositStable(MARKET_DENOMS.UUSD, "100.5000").generateWithWallet(wallet)

// you can ALSO generate message only, using your address in string
const msgs = anchor.earn.depositStable(MARKET_DENOMS.UUSD, "100.5000").generateWithAddress("terra1...")

// or, you can broadcast the tx using your wallet
// below is the recommended default setting for gas parameters.
// of course you can tailor it to your needs
const gasParameters: OperationGasParameters = {
  gasAdjustment: 1.4,
  gasPrices: "0.15uusd",

  // or if you want to fixate gas, you can use `fee`
  fee: new Fee(gasToSpend, "100000uusd")
}
const txResult = await anchor.earn.depositStable(MARKET_DENOMS.UUSD, "100.5000").execute(wallet, gasParameters)

When working with bAsset's, they can be loaded in one of two ways.

import { LCDClient, MnemonicKey, Fee, Wallet } from '@terra-money/terra.js'
import { Anchor, columbus5, bAssetColumbus5, AddressProviderFromJson, MARKET_DENOMS } from '@anchor-protocol/anchor.js'

const addressProvider = new AddressProviderFromJson(columbus5)
const lcd = new LCDClient({ URL: 'https://lcd.terra.dev', chainID: 'columbus-5' })
const key = new MnemonicKey({
  mnemonic: 'your key'
})
const wallet = new Wallet(lcd, key)
const anchor = new Anchor(lcd, addressProvider)

// load the bAsset from the available whitelisted collateral
const collaterals = await anchor.moneyMarket.getCollateralWhitelist({
  market: MARKET_DENOMS.UUSD,
});

const [collateral] = collaterals.filter(
  (collateral) => collateral.symbol === 'BETH',
);

const bAsset = await anchor.bAsset(collateral);

// alternatively, the bAsset can be loaded with the symbol and market demons
const bAsset = await anchor.bAsset({ symbol: 'BETH', market: MARKET_DENOMS.UUSD });

// once you have the bAsset, you can then perform operations
const operation = bAsset.claim({ recipient: 'terra1...' });

Using Message Fabricators

Anchor.js provides facilities for 2 main use cases:

  • query: runs smart contract queries through LCD
  • execute: creates proper MsgExecuteContract objects to be used in transactions

Both of these functions are accessible through the Message Fabricators.

To Use the message fabricators:

Note: Please note that market is a different variable from the coin denom. The denomination for the coins in the example is set to be uusd.

import {fabricateRedeemStable, fabricateDepositStableCoin} from '@anchor-protocol/anchor.js';
import {AddressProviderFromJson} from "@anchor-protocol/anchor.js"; 

// default -- uses bombay core contract addresses
const addressMap = somehowGetAddresses();
const addressProvider = new AddressProviderFromJson(addressMap);
    const redeemMsg = fabricateRedeemStable({
      address: 'terra123...',
      market: 'usd',
      amount: '10000',
    })(addressProvider);

    const depositMsg = fabricateDepositStableCoin({
      address: 'terra123...',
      market: 'usd',
      amount: '10',
    })(addressProvider);

Executing

A message fabricator contains functions for generating proper MsgExecuteContract messages to be included in a transaction and broadcasted.

import { LCDClient, Wallet, MnemonicKey, Fee} from '@terra-money/terra.js';

const anchor = new LCDClient({ URL: 'https://bombay-lcd.terra.dev', chainID:'bombay-12' });
const owner = new MnemonicKey({ mnemonic: "...."});
const wallet = new Wallet(anchor, owner);

async function depositStable() {
    const tx = await wallet.createAndSignTx({
        msgs: depositMsg,
        fee: new Fee(2_000_000, { uluna: 2_000_000 })
    });
    return await anchor.tx.broadcast(tx);
}

async function main() {
  await depositStable()
    .then((result) => {
      console.log(result);
    })
    .catch(console.error);
}

main();

List of contract addresses deployed to networks

  • columbus-5:
{
  bLunaHub: 'terra1mtwph2juhj0rvjz7dy92gvl6xvukaxu8rfv8ts',
  bLunaToken: 'terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp',
  bLunaReward: 'terra17yap3mhph35pcwvhza38c2lkj7gzywzy05h7l0',
  bLunaAirdrop: 'terra199t7hg7w5vymehhg834r6799pju2q3a0ya7ae9',
  bEthReward: 'terra1939tzfn4hn960ychpcsjshu8jds3zdwlp8jed9',
  bEthToken: 'terra1dzhzukyezv0etz22ud940z7adyv7xgcjkahuun',
  mmInterestModel: 'terra1kq8zzq5hufas9t0kjsjc62t2kucfnx8txf547n',
  mmOracle: 'terra1cgg6yef7qcdm070qftghfulaxmllgmvk77nc7t',
  mmMarket: 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s',
  mmOverseer: 'terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8',
  mmCustody: 'terra1ptjp2vfjrwh0j0faj9r6katm640kgjxnwwq9kn',
  mmCustodyBEth: 'terra10cxuzggyvvv44magvrh3thpdnk9cmlgk93gmx2',
  mmLiquidation: 'terra1w9ky73v4g7v98zzdqpqgf3kjmusnx4d4mvnac6',
  mmDistributionModel: 'terra14mufqpr5mevdfn92p4jchpkxp7xr46uyknqjwq',
  aTerra: 'terra1hzh9vpxhsk8253se0vv5jj6etdvxu3nv8z07zu',
  terraswapblunaLunaPair: 'terra1jxazgm67et0ce260kvrpfv50acuushpjsz2y0p',
  terraswapblunaLunaLPToken: 'terra1nuy34nwnsh53ygpc4xprlj263cztw7vc99leh2',
  terraswapAncUstPair: 'terra1gm5p3ner9x9xpwugn9sp6gvhd0lwrtkyrecdn3',
  terraswapAncUstLPToken: 'terra1gecs98vcuktyfkrve9czrpgtg0m3aq586x6gzm',
  gov: 'terra1f32xyep306hhcxxxf7mlyh0ucggc00rm2s9da5',
  distributor: 'terra1mxf7d5updqxfgvchd7lv6575ehhm8qfdttuqzz',
  collector: 'terra14ku9pgw5ld90dexlyju02u4rn6frheexr5f96h',
  community: 'terra12wk8dey0kffwp27l5ucfumczlsc9aned8rqueg',
  staking: 'terra1897an2xux840p9lrh6py3ryankc6mspw49xse3',
  ANC: 'terra14z56l0fp2lsf86zy3hty2z47ezkhnthtr9yq76',
  airdrop: 'terra146ahqn6d3qgdvmj8cj96hh03dzmeedhsf0kxqm',
  team_vesting: 'terra1pm54pmw3ej0vfwn3gtn6cdmaqxt0x37e9jt0za',
  investor_vesting: 'terra10evq9zxk2m86n3n3xnpw28jpqwp628c6dzuq42'
}
  • bombay-12:
{
 bLunaHub: 'terra1fflas6wv4snv8lsda9knvq2w0cyt493r8puh2e',
 bLunaToken: 'terra1u0t35drzyy0mujj8rkdyzhe264uls4ug3wdp3x',
 bLunaReward: 'terra1ac24j6pdxh53czqyrkr6ygphdeftg7u3958tl2',
 bLunaAirdrop: 'terra1334h20c9ewxguw9p9vdxzmr8994qj4qu77ux6q',
 bEthReward: 'terra1ja3snkedk4t0zp7z3ljd064hcln8dsv5x004na',
 bEthToken: 'terra19mkj9nec6e3y5754tlnuz4vem7lzh4n0lc2s3l',
 mmInterestModel: 'terra1m25aqupscdw2kw4tnq5ql6hexgr34mr76azh5x',
 mmOracle: 'terra1p4gg3p2ue6qy2qfuxtrmgv2ec3f4jmgqtazum8',
 mmMarket: 'terra15dwd5mj8v59wpj0wvt233mf5efdff808c5tkal',
 mmOverseer: 'terra1qljxd0y3j3gk97025qvl3lgq8ygup4gsksvaxv',
 mmCustody: 'terra1ltnkx0mv7lf2rca9f8w740ashu93ujughy4s7p',
 mmCustodyBEth: 'terra1j6fey5tl70k9fvrv7mea7ahfr8u2yv7l23w5e6',
 mmLiquidation: 'terra16vc4v9hhntswzkuunqhncs9yy30mqql3gxlqfe',
 mmDistributionModel: 'terra1u64cezah94sq3ye8y0ung28x3pxc37tv8fth7h',
 aTerra: 'terra1ajt556dpzvjwl0kl5tzku3fc3p3knkg9mkv8jl',
 terraswapblunaLunaPair: 'terra13e4jmcjnwrauvl2fnjdwex0exuzd8zrh5xk29v',
 terraswapblunaLunaLPToken: 'terra1tj4pavqjqjfm0wh73sh7yy9m4uq3m2cpmgva6n',
 terraswapAncUstPair: 'terra1wfvczps2865j0awnurk9m04u7wdmd6qv3fdnvz',
 terraswapAncUstLPToken: 'terra1vg0qyq92ky9z9dp0j9fv5rmr2s80sg605dah6f',
 gov: 'terra16ckeuu7c6ggu52a8se005mg5c0kd2kmuun63cu',
 distributor: 'terra1z7nxemcnm8kp7fs33cs7ge4wfuld307v80gypj',
 collector: 'terra1hlctcrrhcl2azxzcsns467le876cfuzam6jty4',
 community: 'terra17g577z0pqt6tejhceh06y3lyeudfs3v90mzduy',
 staking: 'terra19nxz35c8f7t3ghdxrxherym20tux8eccar0c3k',
 ANC: 'terra1747mad58h0w4y589y3sk84r5efqdev9q4r02pc',
 airdrop: 'terra1u5ywhlve3wugzqslqvm8ks2j0nsvrqjx0mgxpk',
 investor_vesting: 'not available in testnet',
 team_vesting: 'not available in testnet',
}

Download Details:
Author: Anchor-Protocol
Source Code: https://github.com/Anchor-Protocol/anchor.js
License: Apache-2.0 license

#protocol  #blockchain  #defi  #anchor #javascript #typescript