Wrapmeister Gateway Public Test

Introduction

What is “Wrapmeister”?

Peercoin < – > Ethereum

Wrapmeister is a software stack that allows for cross-chain communication between Peercoin and various evm-based blockchains (Ethereum, Matic, Binance Smart Chain and so on).
It allows for the creation of a pegged token “wPPC” which is redeemable for Peercoin in 1:1 ratio.
wPPC is an ERC20 (or equivalent) token on evm-based blockchains and can be used as any other token on these platforms.

What is Ethereum?

Ethereum is a popular smart contract platform, a blockchain, but made to run small applications like these “swap” contracts we are aiming at.

Will I need ETH to work with this?

Well, yes. Ethereum operations cost. Fees toward miners are paid in “ETH” token. Luckily “ETH” token is easy to find as it’s tradable on pretty much all exchanges. One does not need excessive amounts of “ETH” to do swaps on Uniswap. Uniswap trades cost about $10 of ETH at the moment of writing.
Other evm-based chains are cheaper by an order of magnitude, so if you are not thrilled with spending so much “ETH” to trade Peercoin on Uniswap, be patient as Wrapmeister will soon bridge to cheaper smart contract platforms.

Why Wrapmeister?

The primary goal of Wrapmeister is to get Peercoin on popular AMM contracts like Uniswap, PancakeSwap, and Balancer. The secondary goal is to experiment and learn more about cross-chain communication.

What are AMM contracts?

How does wrapping work?

In its current iteration, Wrapmeister is rather simple. During the “wrapping” procedure, each user is given a unique peercoin deposit address. As soon as this transaction is confirmed, the user is allowed to mint wPPC (wrapped peercoin token) on the Ethereum side. As this happens, the deposited peercoins are moved to a multi-signature address which safeguards the coins. During testing, this multisig takes 2/3 signatures to release funds.

Who controls the multi-signature address where all the coins are stored?

A select group of forest animals living in Romania. ref

How does unwrapping work?

Unwrapping revolves around “proof of burn”. A user is required to destroy their wPPC token on the Ethereum side and bring that evidence to the multisig operators in order to release their peercoins. This process is automated and happens without user intervention. A user is basically clicking buttons. Once the wPPC token is destroyed, multisig operators get notified and can manually inspect the burn transaction and all other records left on the blockchain. Upon manual inspection by multisig operators, coins are sent to the desired address. In this initial version of Wrapmeister, the unwrapping process may take up to 24h, so please be patient.

During testing, this custodian address will not be multisig, to make the testing easier. As we move to production, custodian address will be 3of5 or 4of6 multisig.

Future plans

Plans for the next iteration of Wrapmeister are almost finished. Through combination of new ideas and lessons learned from this project, I can safely say that I know what to do for the next iteration. It will do cross-chain communication as well, but it will use atomic swaps. So, wPPC would be exchanged for PPC in a completely trustless fashion. Magic.

When will this next iteration go live?

Work on the next iteration will start as soon as this one hits production, and as soon as you donate to the Peercoin Foundation…

Peercoin Donate

Requirements

Testnet Peercoin Client

This only works on v0.11!

Desktop wallet supports testnet.

You can also do this from the mobile wallet:

Just run it in testnet mode.


Now fetch some tPPC from the faucet.

Metamask Web Browser Extension

This extension makes an ethereum-handling wallet out of your browser.

After setting up the extension on your browser, change Metamask network to “Ropsten Test Network”.

Once you set up the Metamask, you need some “fuel” which is used for transaction fees. Visit one of the following testnet faucets to obtain some testnet ethereum:

https://faucet.metamask.io/
https://faucet.ropsten.be/
https://faucet.dimensions.network/
https://ipfs.io/ipfs/QmVAwVKys271P5EQyEfVSxm7BJDKWt42A2gHvNmxLjZMps/

You will not need more than a fraction of testnet ETH. About 0.2 is enough.

Add “wPPC” Token to the Metamask

Click the “Add Token” button and input the following contract address so Metamask will know how to handle it.

Contract address: 0x5B8eF6EE9ec9Df9f240FEbACa2AE88ce3eb950dc

Find Some “USDC” Testnet Token and Add “USDC” Token to Metamask.

USDC is a popular and respected USD “pegged” token. 1 USDC trades for 1 USD.

Faucet

Add token: 0x07865c6e87b9f70255377e024ace6630c1eaa37f to Metamask.

So Metamask will know how to handle it.

Wrapping Peercoin

Should be self-explanatory, click on the “Wrap Peercoin” button and input required information. Wait for a while, so peercoin transaction confirms.

https://peercoin.github.io/wrapmeister-ui/#/

Swaps and Liquidity Pools

mind that your Metamask is still set to Ethereum-Ropsten network

Visit app.uniswap.org

Manually add two tokens we’ll be swapping:

wPPC: 0x5B8eF6EE9ec9Df9f240FEbACa2AE88ce3eb950dc
USDC: 0x07865c6e87b9f70255377e024ace6630c1eaa37f

image

Should be fairly self-explanatory from here.

Swaps will take 0.3% fee.


You can add liquidity by clicking on “Increase Liquidity” button. Mind that you need about equal ratio of wPPC and USDC to do so.

Unwrapping Peercoin

Fairly straightforward, click “Unwrap Peercoin”. Input desired amount and the peercoin address you want to receive your coins at.

Report Below

Please report in the comments below how your testing went, if it went smoothly or if there were any issues. Also report any feedback you may have for us to improve the user experience.

2 Likes

Update:

two pools are available now:

wPPC / USDC

and

wPPC / ETH

I wrapped 3.141592
willy send 100 to the address, so overpayed. What happens with the rest amount?
Also I have now 3.141 wppc, thats not what I specified

I’ve tested with same numbers:

https://ropsten.etherscan.io/tx/0x2d025f5fc9700872e152a13356e81b9de99aa973b03a57f5d813454ed9bcbe5f

It works as expected.

It seems Metmask will do rounding of numbers for some reason, so do not freak out if numbers do not match.

This weekend we have updated to a new contract on the Ethereum side. Contract is now this one right here:

https://ropsten.etherscan.io/token/0xeaa423cF3825617386CE6Cdc924700f058cA1D64?a=0xD208Aefea9bA9c29F2E290Bfae2bB2e4687BB11b

Which means the balances are back to zero.

1 Like