Punk Gateway

If you need to use CryptoPunks in the protocol, it must first be wrapped into WPUNKS. The WPUNKS Gateway contract is a helper contract to easily wrap and unwrap CryptoPunks as necessary when interacting with the protocol, since only ERC721 is used within protocol interactions.

Methods

borrow

function borrow( address reserveAsset, uint256 amount, uint256 punkIndex, address onBehalfOf, uint16 referralCode )

Allows users to borrow a specific amount of the ERC20 reserve underlying asset, provided that the borrower already own some CryptoPunks collaterals. E.g. User borrows 10000 USDC, receiving the 10000 USDC in his wallet and lock CryptoPunks collateral asset in contract.

repay

function repay(uint256 punkIndex, uint256 amount)

Repays a borrowed amount on a specific punk, burning the equivalent loan owned. E.g. User repays 10000 USDC, burning loan and receives collateral asset.

auction

function auction(uint256 punkIndex, uint256 bidPrice, address onBehalfOf)

Auction a un-health punk loan with ERC20 reserve.

redeem

function redeem(uint256 punkIndex, uint256 amount, uint256 bidFine)

Redeems a un-health CryptoPunks loan with ERC20 reserve.

liquidate

function liquidate(uint256 punkIndex, uint256 amount)

Liquidates a un-health CryptoPunks loan with ERC20 reserve.

borrowETH

function borrowETH( uint256 amount, uint256 punkIndex, address onBehalfOf, uint16 referralCode )

Allows users to borrow a specific amount of the native ETH, provided that the borrower already own some CryptoPunks collaterals. E.g. User borrows 100 ETH, receiving the 100 ETH in his wallet and lock CryptoPunks collateral asset in contract.

repayETH

function repayETH(uint256 punkIndex, uint256 amount)

Repays a borrowed amount on a specific CryptoPunks with native ETH.

auctionETH

function auction(uint256 punkIndex, address onBehalfOf)

Auctions a un-health punk loan with native ETH.

redeemETH

function redeemETH(uint256 punkIndex, uint256 amount, uint256 bidFine)

Redeems a un-health punk loan with native ETH.

liquidateETH

function liquidateETH(uint256 punkIndex, uint256 amount)

Liquidates a un-health punk loan with native ETH.

Last updated