Contracts
native-stake
Implements the DAODAO cw20-stake interfaces for native CosmosSDK tokens. 20+ unit tests. Positioned to be utilized for DAODAO v1/v2 upgrades on Osmosis. Supports autocompounding rewards, external reward contracts, and other cw20-stake compatible contracts.
osmo-lp-lockdrop
The Osmosis LP Lockdrop is a fork of native-stake
which enables the utilization of LP tokens for seed-style investing. When the seed token launches, the backing team (config.manager
). Utilizes osmosis-rust
to interact with the Osmosis native DEX layer.
Process
- LP Lockdrop Contract is Instantiated with a GAMM denom
- transfer 100000000uosmo per underlying pool asset to the contract
- Used for pool creation fees
- registers reward distributor contract id
- defines GAMM denom which can be staked
- transfer 100000000uosmo per underlying pool asset to the contract
- Execute
Stake {}
, passing GAMM token infunds[]
- by default, this locks tokens up for 365 days
- Execute
EjectAndSeedLiquidity
- Passing total initial seed token liquidity in
funds[]
- Exit Pool, withdrawing all LP tokens to their underlying representations
- Divide seed token amount accordingly between the underlying assets
- Create new pools, matching seed token with each asset
- Passing total initial seed token liquidity in
Known Issues
- Currently susceptible to sandwich attacks. This can be fixed by comparing pool distribution to TWAP.
- Asymmetrically weighted pools are not supported.
Actions
- Instantiate
- manager
- Name
- GAMM denom
- Stake GAMM
- Unstake GAMM
- Seed Liquidity (manager only)
denom: newtoken
funds: [100newtoken]
- ...
- Remove liquidity (Convert GAMM to derivative tokens)
- Query denoms associated with pool GAMM denom
- Create tripool or two pools with half of the funds for each
- if you split in half, there is a sandwich attack that could make one half considerably cheaper than it should be
- Maybe use TWAP to minimize this risk
- creates a new pool
- sends LP tokens to cw20-stake-external-rewards
Further Thoughts
- Manager misbehavior
- Connect to DAODAO contract to enable participants to vote to remove lockup if project fails to deliver.
- Add Sudo message to remove lockup if project fails to deliver.
client.stake(
[
{
denom: "uosmo",
amount: "1",
},
],
)
client.get_config();
// javscript
let promise = new Promise();
//
cosmwasm_client.instantiate(code_id, )