Primary Market
Getting PrimaryMarket Info
PrimaryMarket.fund() → address
PrimaryMarket.fund() → address
The address of the fund contract.
Creating/Redeeming Tranches
PrimaryMarket.getCreation(uint256 underlying) → uint256
PrimaryMarket.getCreation(uint256 underlying) → uint256
Get the amount of QUEEN created by underlying
amount of the underlying asset.
PrimaryMarket.getCreationForQ(uint256 minOutQ) → uint256
PrimaryMarket.getCreationForQ(uint256 minOutQ) → uint256
Get the amount of the underlying asset to create at least minOutQ
amount of QUEEN.
Note that this only works with non-empty fund for simplicity.
PrimaryMarket.getRedemption(uint256 inQ) → uint256, uint256
PrimaryMarket.getRedemption(uint256 inQ) → uint256, uint256
Get the amount of the underlying asset redeemed by inQ
amount of QUEEN.
PrimaryMarket.getRedemptionForUnderlying(uint256 minUnderlying) → uint256
PrimaryMarket.getRedemptionForUnderlying(uint256 minUnderlying) → uint256
Get the amount of QUEEN to redeem at least minUnderlying
amount of the underlying asset.
PrimaryMarket.redeem(address recipient, uint256 inQ, uint256 minUnderlying, uint256 version) → uint256
PrimaryMarket.redeem(address recipient, uint256 inQ, uint256 minUnderlying, uint256 version) → uint256
Redeem inQ
amount of QUEEN and transfer the resulting underlying asset to recipient
. It enforces the resulting underlying asset to be at least minUnderlying
and the version
to be the current rebalance version.
Note that the function would revert if there were queued redemptions that cannot be claimed at the moment.
PrimaryMarket.redeemAndUnwrap(address recipient, uint256 inQ, uint256 minUnderlying, uint256 version) → uint256
PrimaryMarket.redeemAndUnwrap(address recipient, uint256 inQ, uint256 minUnderlying, uint256 version) → uint256
Redeem inQ
amount of QUEEN, unwrap the underlying asset to its native currency, and transfer the resulting underlying asset to recipient
. It enforces the resulting underlying asset to be at least minUnderlying
and the version
to be the current rebalance version. The underlying asset must be a wrapped token of the native currency.
Note that the function would revert if there were queued redemptions that cannot be claimed at the moment.
PrimaryMarket.queueRedemption(address recipient, uint256 inQ, uint256 minUnderlying, uint256 version) → uint256, uint256
PrimaryMarket.queueRedemption(address recipient, uint256 inQ, uint256 minUnderlying, uint256 version) → uint256, uint256
Submit a redemption request for inQ
amount of QUEEN. The resulting underlying asset will be claimable when the fund has enough balance to pay this redemption and all the previous ones in the queue. It enforces the resulting underlying asset to be at least minUnderlying
and the version
to be the current rebalance version.
PrimaryMarket.claimRedemptions(address account, uint256[] calldata indices) → uint256
PrimaryMarket.claimRedemptions(address account, uint256[] calldata indices) → uint256
Claim the underlying asset of an array of queued redemption requests by account
and transfer the underlying asset to account
.
PrimaryMarket.claimRedemptionsAndUnwrap(address account, uint256[] calldata indices) → uint256
PrimaryMarket.claimRedemptionsAndUnwrap(address account, uint256[] calldata indices) → uint256
Claim the underlying asset of an array of queued redemption requests by account
, unwrap the underlying asset to its native currency, and transfer the underlying asset to account
. The underlying asset must be a wrapped token of the native currency.
Splitting/Merging Tranches
PrimaryMarket.getSplit(uint256 inQ) → uint256
PrimaryMarket.getSplit(uint256 inQ) → uint256
Get the amount of BISHOP and ROOK split from inQ
amount of QUEEN.
PrimaryMarket.getSplitForB(uint256 minOutB) → uint256
PrimaryMarket.getSplitForB(uint256 minOutB) → uint256
Get the amount of QUEEN to split at least minOutB
amount of BISHOP and ROOK.
PrimaryMarket.getMerge(uint256 inB) → uint256, uint256
PrimaryMarket.getMerge(uint256 inB) → uint256, uint256
Get the amount of QUEEN merged from inB
amount of BISHOP and ROOK.
PrimaryMarket.getMergeForQ(uint256 minOutQ) → uint256
PrimaryMarket.getMergeForQ(uint256 minOutQ) → uint256
Get the amount of BISHOP and ROOK to merge into at least minOutQ
amount of QUEEN.
PrimaryMarket.split(address recipient, uint256 inQ, uint256 version) → uint256
PrimaryMarket.split(address recipient, uint256 inQ, uint256 version) → uint256
Split inQ
amount of QUEEN into BISHOP and ROOK and send the resulting shares to recipient
. It enforces the version
to be the current rebalance version.
PrimaryMarket.merge(address recipient, uint256 inB, uint256 version) → uint256
PrimaryMarket.merge(address recipient, uint256 inB, uint256 version) → uint256
Merge inB
amount of BISHOP and ROOK into QUEEN and send the resulting shares to recipient
. It enforces the version
to be the current rebalance version.
Last updated