---
tags: Anchor
---
## Anchor Sunset. Review Scope.
### Simple summary
The [anchor-collateral-steth](https://github.com/lidofinance/anchor-collateral-steth) contains Ethereum contracts for integrating stETH as a collateral into the Anchor protocol in the form of bETH token.
### Context
In June 2022, we created [a post](https://research.lido.fi/t/sunsetting-lido-on-terra/2367) on the research forum in which we published a proposals to stop supporting Anchor integration. [A snapshot](https://snapshot.org/#/lido-snapshot.eth/proposal/0xe964fb2b0ad887673a0748b025c68a957a4b05b604d306bdc66125e7b758e524) was published too, that passed the vote.
The procedure is as follows:
- upgrade contracts to prevent bETH from minting;
- stop the bot accruing and distributing rewards;
- allow withdrawal of user funds;
- stop supporting the Anchor widget UI.
The main changes of `AnchorVault` contract should look like this:
- add a deprecation notice
- disable `submit` func
- disable `collect_rewards` func
- removed `can_deposit_or_withdraw` func
- removed `emergency_admin` - only DAO can pause or resume the contract now
- cleared up the contract - remove unused func/events/interfaces/ etc...
**Note**: wrt stETH rebases — rewards distribution discontinued and bETH holders redeem their stETH with 1:1 ratio except only for scaling penalties down on hypothetical severe protocol losses. See `get_rate` [here](https://github.com/lidofinance/anchor-collateral-steth/blob/624ce5c62bcfedc0d6ed91f3374c2b40c5133772/contracts/AnchorVault.vy#L189)
We removed everything unnecessary from the contract: unused func, constants, interfaces, etc.
### Scope of the review
- [AnchorVault.vy](https://github.com/lidofinance/anchor-collateral-steth/blob/f2c9c1131bd145b07a6018dbb1ebf11cbf87ea50/contracts/AnchorVault.vy)
- [AnchorVaultProxy.sol](https://github.com/lidofinance/anchor-collateral-steth/blob/f2c9c1131bd145b07a6018dbb1ebf11cbf87ea50/contracts/AnchorVaultProxy.sol)
- [bEth.vy](https://github.com/lidofinance/anchor-collateral-steth/blob/f2c9c1131bd145b07a6018dbb1ebf11cbf87ea50/contracts/bEth.vy)
Code size: ~280 lines of Vyper, ~70 lines of Solidity(calculated by https://github.com/AlDanial/cloc)
The `AnchorVault` contract is supposed to be used as an implementation for the already deployed [AnchorVaultProxy](https://etherscan.io/address/0xA2F987A546D4CD1c607Ee8141276876C26b72Bdf) contract.
##### Commit for review: `f2c9c1131bd145b07a6018dbb1ebf11cbf87ea50`
##### UPD. 22 Sep 2023: commit `510b7cc784bb8d07339eef0f388c415701b0d993`
##### UPD. 27 Sep 2023: final commit `c186bf3bb89f2945646a76a4e033030c4ea2842a`
### References
- [bETH docs](https://docs.anchorprotocol.com/anchor-2/protocol/bonded-assets-bassets/bonded-eth-beth)
- [bETH user guide](https://docs.anchorprotocol.com/anchor-2/user-guide/webapp/bond-beth)
- [Research forum post](https://research.lido.fi/t/sunsetting-lido-on-terra/2367)
- [Snapshot](https://snapshot.org/#/lido-snapshot.eth/proposal/0xe964fb2b0ad887673a0748b025c68a957a4b05b604d306bdc66125e7b758e524)
- [AnchorVault PR](https://github.com/lidofinance/anchor-collateral-steth/pull/24)
- [Vote script](https://github.com/lidofinance/scripts/pull/184)
- [AnchorVaultProxy](https://etherscan.io/address/0xA2F987A546D4CD1c607Ee8141276876C26b72Bdf)