PWN Vault
Asset storage
Last updated
Asset storage
Last updated
PWN Vault is the holder contract for the locked-in collateral and paid back credit. The contract can only be operated through the (logic) contract.
All approval of tokens utilized within the PWN context has to be done towards the PWN Vault address - as ultimately it's the contract accessing the tokens.
Deployment addresses
Mainnet:
Polygon:
Görli:
Mumbai:
Rinkeby (deprecated):
Source code
ABI
PWNVault.sol contract is written in Solidity version 0.8.4
pull
Function accessing an asset and pulling it into the vault.
The function assumes a prior token approval was made with the PWNVault address to be approved.
This function takes two arguments:
address
_origin
- Address from which asset is pulled into the Vault.
push
Function pushing an asset from the vault, sending to a defined recipient. This function is used for claiming a paid back loan or defaulted collateral.
This function takes two arguments:
address
_beneficiary
- An address of the recipient of the asset -> is set in the PWN logic contract
pushFrom
Function pushing an asset from a lender, sending it to a borrower.
This function assumes prior approval for the asset to be spent by the borrower's address.
This function takes three arguments:
address
_origin
- An address of the lender who is providing the loan asset
address
_beneficiary
- An address of the recipient of the asset -> is set in the PWN logic contract
PWN Vault contract defines three events and no custom errors.
VaultPull
VaultPull event is emitted when the pull
function is called.
This event has two parameters:
address indexed
origin
- Address from which asset is pulled into the Vault.
VaultPush
VaultPush event is emitted when the push
function is called.
This event has two parameters:
address indexed
beneficiary
- Address to which is the asset pushed (transferred) to.
VaultPushFrom
VaultPushFrom event is emitted when the pushFrom
function is called.
This event has three parameters:
address indexed
origin
- An address of the lender who is providing the loan asset
address indexed
beneficiary
- An address of the recipient of the asset -> is set in the PWN logic contract
The functions described below are important to understand the events the contract emits. These functions can not be called directly and the contract can only be operated through the contract.
MultiToken.Asset memory
_asset
- An asset construct (see )
MultiToken.Asset memory
_asset
- An asset construct (see )
MultiToken.Asset memory
_asset
- An asset construct (see )
MultiToken.Asset
asset
- An asset construct (see )
MultiToken.Asset
asset
- An asset construct (see )
MultiToken.Asset
asset
- An asset construct (see )