Primary Market
The address of the fund contract.
>>> primaryMarket.fund()
'0x69c53679EC1C06f3275b64C428e8Cd069a2d3966'
Get the amount of QUEEN created by
underlying
amount of the underlying asset.>>> primaryMarket.getCreation(1000000000000000000)
'998239992407933623'
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.getCreationForQ(1000000000000000000)
'1001763110680249269'
>>> primaryMarket.getCreation(1001763110680249269)
'1000000000000000000'
Get the amount of the underlying asset redeemed by
inQ
amount of QUEEN.>>> primaryMarket.getRedemption(1000000000000000000)
underlying: '1001763110680249268'
feeQ: '0'
Get the amount of QUEEN to redeem at least
minUnderlying
amount of the underlying asset.>>> primaryMarket.getRedemptionForUnderlying(1000000000000000000)
'998239992407933624'
>>> primaryMarket.getRedemption(998239992407933624)
underlying: '1000000000000000000'
feeQ: '0'
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.
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.
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.Claim the underlying asset of an array of queued redemption requests by
account
and transfer the underlying asset to account
.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.Get the amount of BISHOP and ROOK split from
inQ
amount of QUEEN.>>> primaryMarket.getSplit(1000000000000000000)
'594418130555555555274'
Get the amount of QUEEN to split at least
minOutB
amount of BISHOP and ROOK.>>> primaryMarket.getSplitForB(1000000000000000000)
'1682317460716381'
>>> primaryMarket.getSplit(1682317460716381)
'000000000000000465'
Get the amount of QUEEN merged from
inB
amount of BISHOP and ROOK.>>> primaryMarket.getMerge(1000000000000000000)
outQ: '1680635143255664'
feeQ: '1682317460716'
Get the amount of BISHOP and ROOK to merge into at least
minOutQ
amount of QUEEN.>>> primaryMarket.getMergeForQ(1000000000000000000)
'595013143699254810084'
>>> primaryMarket.getMerge(595013143699254810084)
outQ: '1000000000000000000'
feeQ: '1001001001001001'
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.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 modified 15d ago