The Whale Lair is a bonding contract used to bond WHALE LSDs.
Note: the contract treats all LSDs as equal, i.e. 10 ampWHALE will have the same weight as 10 bWHALE.
InstantiateMsg
{
"unbonding_period": "86400000000000",
"growth_rate": "0.01",
"bonding_assets": [
{
"native_token": {
"denom": "ampWHALE"
}
},
{
"native_token": {
"denom": "bWHALE"
}
}
]
}
Key | Type | Description |
---|
| | Unbonding period in nanoseconds |
| | Weight grow rate. Needs to be between 0 and 1 |
| | AssetInfo of the assets that can be bonded |
ExecuteMsg
Bond
Bonds the specified [Asset]. This assumes the [Asset] is already white-listed for bonding.
{
"bond": {
"asset": {
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1000"
}
}
}
Unbond
Unbonds the specified [Asset].
{
"unbond": {
"asset": {
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1000"
}
}
}
Withdraw
Sends withdrawable unbonded tokens to the user.
{
"withdraw": {
"denom": "ampWHALE"
}
}
Key | Type | Description |
---|
| | The denom of the asset to be withdrawn |
UpdateConfig
Updates the Config of the contract.
{
"update_config": {
"owner": "migaloo1...",
"unbonding_period": "172800000000000",
"growth_rate": "0.02",
"fee_distributor_addr": "migaloo1..."
}
}
Key | Type | Description |
---|
| | The owner of the contract |
| | Unbonding period in nanoseconds |
| | Weight grow rate. Needs to be between 0 and 1 |
| | The address of the fee distributor contract |
QueryMsg
Config
Returns the configuration of the contract.
{
"owner": "migaloo1...",
"unbonding_period": "172800000000000",
"growth_rate": "0.02",
"bonding_assets": [
{
"native_token": {
"denom": "ampWHALE"
}
},
{
"native_token": {
"denom": "bWHALE"
}
}
],
"fee_distributor_addr": "migaloo1..."
}
Key | Type | Description |
---|
| | |
| | Unbonding period in nanoseconds |
| | Weight grow rate. Needs to be between 0 and 1 |
| | AssetInfo of the assets that can be bonded |
| | The address of the fee distributor contract |
Bonded
Returns the amount of assets that have been bonded by the specified address.
{
"bonded": {
"address": "migaloo1..."
}
}
Key | Type | Description |
---|
| | The address to run the query on |
{
"total_bonded": "1000",
"bonded_assets": [
{
"amount": "500",
"info": {
"native_token": {
"denom": "ampWHALE"
}
}
},
{
"amount": "500",
"info": {
"native_token": {
"denom": "bWHALE"
}
}
}
],
"first_bonded_epoch_id": 10
}
Key | Type | Description |
---|
| | How much in total the address has bonded. Again, all LSDs are considered fungible for this calculation |
| | The list of LSDs bonded by the address |
| | The first epoch when this address bonded. Used to perform some rewards calculations on the fee distributor |
Unbonding
Returns the amount of tokens of the given denom that are been unbonded by the specified address. Allows pagination.
{
"unbonding": {
"address": "migaloo1...",
"denom": "ampWHALE",
"start_after": "1337",
"limit": "10"
}
}
Key | Type | Description |
---|
| | The address to run the query on |
| | The denom to check the unbonding amounts for |
| | If paginating, the block to start the lookup from |
| | If paginating, The maximum number of items to return |
{
"total_amount": "1000",
"unbonding_requests": [
{
"asset": {
"amount": "500",
"info": {
"native_token": {
"denom": "ampWHALE"
}
}
},
"timestamp": "1698851118",
"weight": "15000"
}
]
}
Key | Type | Description |
---|
| | How much in total the address is unbonding. Again, all LSDs are considered fungible for this calculation |
| | The list of Bonds currently unbonding |
Withdrawable
Returns the amount of unbonding tokens of the given denom for the specified address that can be withdrawn, i.e. that have passed the unbonding period.
{
"withdrawable": {
"address": "migaloo1...",
"denom": "ampWHALE"
}
}
{
"withdrawable_amount": "1000"
}
Key | Type | Description |
---|
| | The total amount that is withdrawable for the queried denom |
Weight
Returns the weight of the address.
{
"weight": {
"address": "migaloo1",
"timestamp": "1698851118",
"global_weight": "1500"
}
}
Key | Type | Description |
---|
| | |
| | The timestamp at which to query the weight |
| | The GlobalIndex to be used to query the weight |
{
"address": "migaloo1...",
"weight": "1500",
"global_weight": "3000",
"share": "0.5",
"timestamp": "1698851118"
}
Key | Type | Description |
---|
| | The address being queried |
| | The weight of the address |
| | The total weight in the contract, i.e. the sum of all weights held by all bonding addresses |
| | The share of the contract |
| | The timestamp for this weight result |
TotalBonded
Returns the total amount of assets that have been bonded to the contract.
{
"total_bonded": {}
}
{
"total_bonded": "3000",
"bonded_assets": [
{
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1500"
},
{
"info": {
"native_token": {
"denom": "bWHALE"
}
},
"amount": "1500"
}
],
"first_bonded_epoch_id": "0"
}
Key | Type | Description |
---|
| | How much in total is bonded in the contract |
| | The list of LSDs bonded in the contract |
| | Not used for this query, yet it's here since we reuse the same response type as before |
GlobalIndex
Returns the global index of the contract.
{
"global_index": {}
}
{
"bonded_amount": "3000",
"bonded_assets": [
{
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1500"
},
{
"info": {
"native_token": {
"denom": "bWHALE"
}
},
"amount": "1500"
}
],
"timestamp": "1698851118",
"weight": "1500000"
}
Key | Type | Description |
---|
| | How much in total is bonded in the contract |
| | The list of LSDs bonded in the contract |
| | The timestamp at which the total bond was registered |
| | The total weight of the bond at the given block height |
MigrateMsg
Last updated