Lock
The Lock contract is responsible for locking up UST returned from shorting a mAsset through Mirror Mint operation.
InitMsg
Key | Type | Description |
---|---|---|
| HumanAddr | Owner address of Mirror Lock |
| HumanAddr | Address of Mirror Mint |
| String | Native token denomination for stablecoin (TerraUSD) |
| u64 | Length of time in seconds which the UST from shorting will be locked for |
HandleMsg
UpdateConfig
UpdateConfig
Updates the configuration of Lock contract. Can only be issued by the owner of the Mirror Lock.
Key | Type | Description |
---|---|---|
| HumanAddr | Owner address of Mirror Lock |
| HumanAddr | Address of Mirror Mint |
| String | Native token denomination for stablecoin (TerraUSD) |
| u64 | Length of time in seconds which the UST from shorting witll be locked for |
*= optional
LockPositionFundsHook
LockPositionFundsHook
Locks the UST from shorting mAsset when short CDP is successfully created on Mirror Mint.
Key | Type | Description |
---|---|---|
| Uint128 | ID number of CDP from Mirror Mint |
| HumanAddr | Creator of CDP, who will receive unlocked funds |
UnlockPositionFunds
UnlockPositionFunds
Locked UST fromLockPositionFundsHook
is unlocked by sending this message afterlockup_period
has passed. Can only be issued by the owner of the position (receiver
).
Key | Type | Description |
---|---|---|
| Uint128 | ID number of CDP from Mirror Mint to unlock funds from |
ReleasePositionFunds
ReleasePositionFunds
Locked funds will be released and sent to the CDP creator upon closing of the position. This message unlocks funds even whenlock_period
has not ended yet. Can only be issued by the mint contract when the position is being closed.
Key | Type | Description |
---|---|---|
| Uint128 | ID number of CDP from Mirror Mint to unlock funds from |
QueryMsg
Config
Config
Returns the configuration of Mirror Lock.
Response
Key | Type | Description |
---|---|---|
| HumanAddr | Owner address of Mirror Lock |
| HumanAddr | Address of Mirror Mint |
| String | Native token denomination for stablecoin (TerraUSD) |
| u64 | Length of time in seconds which the UST from shorting will be locked for |
PositionLockInfo
PositionLockInfo
Returns information about locked funds of a specific CDP.
Key | Type | Description |
---|---|---|
| Uint128 | ID number of CDP from Mirror Mint to unlock funds from |
Response
Key | Type | Description |
---|---|---|
| Uint128 | ID number of CDP from Mirror Mint to unlock funds from |
| HumanAddr | Creator of CDP, who will receive unlocked funds |
| Uint128 | Amount of |
| u64 | Time when user is allowed to claim the |
Last updated