* Use cosmossdk.io/errors for deprecated error methods
* Update error registration with cosmossdk.io/errors
* Use cosmossdk.io/math for deprecated sdk.Int alias
* Fix modified proto file
* Update sdk.Int usage in swap hooks
* Update e2e test deprecated method usage
* Call earn hooks with correct share values
User's shares instead of total vault shares
* Use different amounts for different accounts
* Add claim test with staking claims
* Remove logging statements
* Remove log
* Pass suite.T() to mock earn hooks
* Use begin blocker for staking reward distribution
* Remove unused beginblocker
* Remove log
* feat: community pool deposit/withdraw proposals
* fix: check community pool balance in tests
* add new msg type definitions
* add msg methods and tests
* add module and keeper skeleton
* add deposit and withdraw methods (no delegation)
* untested depsit/withdraw with delegation methods
* add cli cmds
* fix cli argument parsing
* add tests for delegate/undelegate msgs
* emit un/delegate events
* add godoc comments
* tally handler with liquid staking support
* clean up
* update for liquid keeper changes
* Exclude non-bkava denoms from aggregate underlying ukava calculation
* wip Add claim
* Add distr keeper and claiming
* Add claim test
* Update claim test with failures
* wip Add staking rewards
* -S
Fix savings to earn incentive methods
* Use a single accural time for all earn incentives
* Add additional required liquid methods
* Update genesis to only include 1 accrual time for earn
* Revert "Update genesis to only include 1 accrual time for earn"
This reverts commit cc7e35347298681c0c8a4a0b9bf9b9b296c25531.
* Revert "Use a single accural time for all earn incentives"
This reverts commit aeb49c4622d4e3d99dc6421c8830932b1b546be9.
* Update tests with incentive distribution
* Add earn to incentive rewards query
* add earn cli tx
* Update claim example to use ukava large
* add proposal to gov router
* fix example tx formating
* add proposal handlers to gov app module
* fix: define gov router after earn keeper
* fix: correct proposal type
* remove outdated comment
* refactor withdraw so that fee pool is allows adjusted by the actual withdraw amount
* fix: lint proto file
* use non blocked module account instead of dist acc
* add fund mod account to app, enable receiving
* update to new withdraw interface
* add human readable apy test cases
* remove duplicate changes from previous merge
* remove deprecated io/ioutil package
* standardize proposal type as a pointer
(also matches sdk)
* minior comments and formatting
* use withdraw amount in router msgs
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
Co-authored-by: Draco <draco@dracoli.com>
Co-authored-by: drklee3 <derrick@dlee.dev>
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
* Add basic savings strategy
Supports ukava
* Use clearer error message for ErrInvalidVaultStrategy
* Add invariants
* Separate specific vault/all vaults query, update depositor inconsistencies
* Update swagger
* Use single bkava AllowedVault for all bkava variants
* Do not use allowedVault.Denom for value
* Fix vault balance query
* Update query to list bkava vaults
* Add vaults query doc
* Update grpc query test with no supply
* Add earn hooks
* Handle errors
* Update outdated doc comments, make getAllowedVault_Raw private
* Fix outdated comments, lints
* Fix comment maths
* Use AccAddressFromBech32 to validate message addresses
* Add multiple strategies to params, queries, txs
* Check deposit/withdraw strategy if supported by vault
* Add note for deposit strategy
* Add strategy type to messages
* Update swagger docs, ignore ethermint proto linting errors
* Update strategy test, move single strategy support to strategytype
* Simplify NewStrategyTypeFromString
* Change vault supply to shares
* Update deposit shares
* Use shares instead of supplied
* Update tests, fix share calculation
* Pass hard and savings keeper as pointer to earn keeper
* Update remaining failing test
* Add different share price test, fix comment for share price
* Add shares amount to events
* Additional share tests, use share to asset conversion for withdraw amount
* Update VaultTotalValue test
* Use sdk.Dec for vault shares instead of sdk.Int
* Add test for expensive 20:1 shares
* Update ConvertToShares comment for division, remove redundant test
* Add vault share tests
* Simplify strategies to lend and savings
* Add hard and savings keepers
* Add ctx to strategy interface, fill in lend strategy
* Rename lend strategy to hard
* Fix hard deposit query, fix withdraw bank send
* Fix misleading borrow instead of withdraw for hard
* Remove liquidateall strategy method
* Withdraw tests
* Add hard gs to testutil suite
* Update withdraw tests with working hard strategy, clean strategy interface methods
* Check allowed denom for strategy
* Update GetVaultTotalValue doc note
* Update error wrap message for unsupported denom
* Remove unnecessary viewvault keeper
* Withdraw amount from account value, not supplied value
* Test value > supplied withdraw
* Use dec when dividing for withdrawAmountPercent
* Use the correct store prefix for vault shares
* Update swap references to earn
* Simplify vault shares, use a single share for all coins per address