Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ members = [
"contracts/nebula-incentives-custody",
"contracts/nebula-lp-staking",
"contracts/nebula-penalty",
"contracts/nebula-proxy",
"libraries/*",
"packages/*"
]
Expand Down
100 changes: 7 additions & 93 deletions contracts/nebula-incentives/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# Nebula Incentives


- [Nebula Incentives](#nebula-incentives)
- [InstantiateMsg](#instantiatemsg)
- [ExecuteMsg](#executemsg)
- [UpdateConfig](#updateconfig)
- [Receive](#receive)
- [Withdraw](#withdraw)
- [New Penalty Period](#new-penalty-period)
- [ArbClusterCreate](#arbclustercreate)
- [ArbClusterRedeem](#arbclusterredeem)
- [IncentivesCreate](#incentivescreate)
- [IncentivesRedeem](#incentivesredeem)
- [Receive Hook (CW20ReceiveMsg)](#receive-hook-cw20receivemsg)
- [DepositRewards](#depositrewards)
- [QueryMsg](#querymsg)
Expand All @@ -25,21 +20,18 @@

```json
{
"factory": String,

"owner": String,
"proxy": String,
"custody": String,
"astroport_factory": String,
"nebula_token": String,
"base_denom": String,
"owner": String
"nebula_token": String
}
```

- `factory`: address of the [`cluster-factory`](../nebula-cluster-factory/) contract
- `owner`: address of the owner of the `incentives` contract
- `proxy`: address of the [`nebula-proxy`](../nebula-proxy/) contract
- `custody`: address of the [`nebula-incentives-custody`](../nebula-incentives-custody/) contract
- `astroport_factory`: address of the [Astroport](https://astroport.fi) [factory](https://github.com/astroport-fi/astroport-core/tree/main/contracts/factory) contract
- `nebula_token`: contract address of Nebula Token (NEB)
- `base_denom`: contract's base denomination (usually `uusd`)
- `owner`: address of the owner of the `incentives` contract

## ExecuteMsg

Expand Down Expand Up @@ -95,84 +87,6 @@ Initiates a new incentives penalty period and make the reward from the previous
}
```

### ArbClusterCreate

Initiates an arbitrage mint transaction. This comprises of:

- using `assets` to mint new `cluster_contract` cluster tokens
- selling the minted tokens on Astroport, controlling the slippage with the `min_ust` option

```json
{
"arb_cluster_create": {
"cluster_contract": String,
"assets": Vec<Asset>,
"min_ust": Option<Uint128>
}
}
```

- `cluter_contract`: address of the clsuter contract to mint tokens from
- `assets`: list of assets and amounts to use to mint the cluster tokens
- `min_ust`: minimum amount of UST expected to receive back when selling the minted cluster tokens on Astroport (for slippage control)

### ArbClusterRedeem

Initiates an arbitrage burn transaction. This comprises of:

- Using UST to buy cluster tokens from the CT-UST Astroport pool, controlling the slippage with `min_cluster`
- Burning the swapped cluster tokens for the cluster's inventory asset tokens

```json
{
"arb_cluster_redeem": {
"cluster_contract": String,
"asset": Asset,
"min_cluster": Option<Uint128>
}
}
```

- `cluster_contract`: address of the clsuter contract to buy from Astroport and burn tokens from
- `asset`: asset to use to buy cluster tokens from Astroport (always `uusd`)
- `min_cluster`: minimum amount of cluster tokens expected to receive back when buying from Astroport pool (for slippage control)

### IncentivesCreate

NEB-incentivized version of the [`cluster`](../nebula-cluster/)'s mint/CREATE

```json
{
"incentives_create": {
"cluster_contract": String,
"asset_amounts": Vec<Asset>,
"min_tokens": Option<Uint128>
}
}
```

- `cluster_contract`: cluster contract to do the mint/create transaction on
- `asset_amount`: list of assets to use to mint the cluster tokens with
- `min_tokens` minimum expected cluster tokens received from the mint (transaction will fail is output is below)

### IncentivesRedeem

NEB-incentivized version of the [`cluster`](../nebula-cluster/)'s burn/REDEEM

```json
{
"incentives_redeem": {
"cluster_contract": String,
"max_tokens": Uint128,
"asset_amounts": Option<Vec<Asset>>
}
}
```

- `cluster_contract`: cluster contract to do the burn/redeem transaction on
- `max_tokens`: maximum amount of cluster tokens expected to be burnede to receive the `asset_amounts` out (transaction will fail if more than `max_tokens` cluster tokens are required)
- `asset_amounts` assets amount to receive back from the burn/redeem

## Receive Hook (CW20ReceiveMsg)

### DepositRewards
Expand Down Expand Up @@ -265,4 +179,4 @@ Returns the information on the pending rewards for a contributor
}
```

- `contributor_address`: address of the contributor to query the pending rewards info for
- `contributor_address`: address of the contributor to query the pending rewards info for
Loading