# SIP 112: ETH Wrappr Source

Author bojan, kaleb https://research.synthetix.io/ Proposed 2021-02-15

## Simple Summary

Allow users to wrap ETH and get sETH

## Abstract

We propose to deploy a new contract that accepts deposits in ETH and in return mints sETH in the user’s wallet. After successful ETH deposit, users’ ownership over ETH is transferred to Synthetix protocol. Wrappr is a conditionally bidirectional contract, meaning that if it holds ETH in its reserve, it will accept deposits in sETH and releases ETH. ETH can be unwrapped at any point by anyone after the corresponding amount of sETH is sent back and effectively burned.

## Motivation

We are experiencing a chronic shortage of Synths which is reflected on the market where Synths are being constantly traded above their peg since mid-2020 as can be seen here on CRV. Even with the introduction of Multi-Collateral Loans in SIP-97, problems with the peg persisted. One explanation is that those loans are relatively capital inefficient since they require over-collateralization and thus are not effective tools for arbitrage and bringing synths to peg.

## Specification

### Overview

sETH is freshly minted whenever a user deposit ETH into the contract. The user can deposit any amount desired however, this is subject to not exceeding the maxETH configurable via SCCP. There is no duration, interest rate or collateralization ratio, as any user can at any time buy back the ETH deposited in the contract by burning sETH. Minters benefit as minting sETH and burning sETH are subject to a mintingFeeRate and burningFeeRate, both of which are paid to the fee pool after conversion into sUSD.

### Rationale

The main purpose of this proposal rests on the following points:

• Allowing ETH holders to easily enter and exit Kwenta with the least amount of friction possible. This venue is more efficient than trading ETH for synths on an AMM, due to the slippage. In addition, the current loan program bears collateralization as mentioned previously which cannot be lowered due to the collateralization and interest rate levied being undifferentiated across different borrowing options.
• The contract would release sETH during times of surging demand and absorb extra synth supply when that demand recedes. Therefore it would automatically act as a peg balancing layer that allows arbers to enter and exit with the least friction possible, helping align the different pegs. One arb example, would be to mint sETH against ETH and swap the sETH for ETH on CRV.
• The debt pool would be mostly neutral initially as the increase in sETH supply would be offset by the increase in ETH locked in the wappr contract. However, as users swap the freshly minted sETH to other synths, this would lead to a reduction in the sETH skew as ETH locked acts as a counter-weight against the long sETH position, as the total debt calculation would be reduced by the amount of ETH locked in the contract. Hence, the need to incentivize farmers to assume a short sETH positions would be decreased.
• The minting and burning fees effectively create a new revenue stream for minters who would effectively be getting a cut from the profit generated by actors arbitraging points of inefficiency.
• The pressure to fix the peg by reducing the collateralization ratio (increasing the solvency risk on minters) is somewhat reduced by having this contract at the spartan’s council disposal, as another tool to help steer the peg towards parity (by changing the minting & burning fee as well as the maxETH parameter).

### Technical Specification

One contract is essentially required to be deployed:

• wrappr.sol which is able to mint sETH against ETH deposited and release ETH against sETH burned.

The entry points for users onwrappr.sol implements the following interface.

interface IWrappr.sol {
function mint() external payable;

function burn(uint amount) external;
}


### Test Cases

• Given that a user has u amount of ETH and the contract has c amount of ETH in spare capacity
• Given that u is larger than or equal to c
• When the user attempts deposit u ETH into the contract
• ✅ Then it succeeds and the following take place:
• c ETH is locked up in the contract
• c(1-mintFeeRate) is minted into the user’s wallet in sETH
• c*mintFeeRate worth of sETH is sent to the fee pool in the form of sUSD
• u - c worth of ETH is refunded back to the user
• Given that u is strictly lower than c
• When the user attempts deposit u ETH into the contract
• ✅ Then it succeeds and the following take place:
• u ETH is locked up in the contract
• u(1-mintFeeRate) is minted into the user’s wallet in sETH
• u*mintFeeRate worth of sETH is sent to the fee pool in the form of sUSD
• Given that the contract’s capacity is zero, as maxETH is locked in the contract
• When the user attempts deposit ETH into the contract
• ❌ Then the transaction reverts due to max capacity being reached
• Given that a user has u amount of sETH and the contract holds c amount of ETH
• Given that u is larger than or equal to c(1+burnFeeRate)
• When the user attempts to draw out ETH from the contract by burning u sETH
• ✅ Then it succeeds and the following take place:
• c ETH is sent to the user
• c sETH is burned
• c * burnFeeRate worth of sETH is swapped to sUSD and sent to the fee pool
• u - c(1+burnFeeRate) worth of sETH is refunded back to the user
• Given that u is strictly lower than c(1+burnFeeRate)
• When the user attempts to draw out ETH from the contract by burning u sETH
• ✅ Then it succeeds and the following take place:
• u (1-burnFeeRate) worth of ETH is sent to the user
• u * burnFeeRate worth of sETH is swapped to sUSD and sent to the fee pool
• u (1 - burnFeeRate) sETH is burned
• Given that the contract’s holds no ETH
• When the user attempts draw out ETH from the contract by burning sETH
• ❌ Then the transaction reverts due to the contract being out of ETH

### Configurable Values (Via SCCP)

For the wrappr contract, the following values must be set:

• maxETH the maximum amount of ETH held by contract.
• mintFeeRate the fee for depositing ETH into the contract.
• burnFeeRate the fee for burning sETH and releasing ETH from the contract

### Proposed Initial Values

The following values are proposed as an initial configuration:

• maxETH 5,000
• mintFeeRate 5 bp
• burnFeeRate 5 bp

Copyright and related rights waived via CC0.