id | Title | Status | Author | Description | Discussions to | Created |
---|---|---|---|---|---|---|
TIP-129 | Parlay Vaults | Draft | Ajla (@hinkypunks) | Introduce Parlay Vaults | 2023-02-20 |
Parlay Vaults are an addition to Thales AMM and Overtime vaults, where users can deposit funds that trade with Parlay AMM.
In TIP-70 we introduced the concept of Thales Vaults and different strategies. This TIP explains the rules of specific Parlay Vault that is creating tickets based on dicounted positions only.
Parlay vault contract that will be created establishes following:
- Vault run in rounds, e.g. 1 week or 2 weeks
- Users can deposit for a round prior to the round start
- All trading that the vault does is permissionless (anyone can call the method to make a trade)
- A trade can only go through if it meets the generic and specific criteria of the vault itself and if there are enough unutilized funds in the vault
- Vault trades can only be made on markets that mature prior to the end of the round so that the vault PnL in a round can be calculated correctly at the end of the round
- At any time prior to a new round starting, users that have deposited into existing round can signal that they want to leave the vault. If they don't, their funds are reused in the next round.
- Vault will have a cap of how much can be deposited into them and a utilization rate variable that controls how much of the funds can be utilized for trading
- Vault trades can only be made on markets where each underlying position has
skewImpactLimit
discount (only puts discounted positons on a parlay ticket) - Amount to be paid for each trade should not be greater than
maxTradeRate
% of trading allocation in current round - Vault cannot make same trade with specific markets on Parlay AMM twice
- TODO: Add a new variable that controls how many time can the same market be used on a parlay within one round
Parlay Vault will have keeper bot that check if a trade can be made and execute those, but the trading itself is permissionless and can be called by any address.
Parlay AMM changes:
- added
safeBoxFeePerAddress
variable which holds safe fee for specific address (otherwise safe box fee is calculated based onsafeBoxFee
variable) - added
parlayAmmFeePerAddress
variable which holds fee for specific address (otherwise parlay amm fee is calculated based onparlayAmmFee
variable)
priceLowerLimit - minimum price at which the vault can buy
priceUpperLimit - maximum price at which the vault can buy
skewImpactLimit - minimum skew impact/discount at which the vault can buy
maxAllowedDeposit - maximum amount of sUSD that can be deposited into the vault
utilizationRate - how much of the funds entering a round can be used to trade
maxTradeRate - how much can of the funds be spent in one trade
minDepositAmount - the minimum a user can deposit
maxAllowedUsers - maximum amount of users in the vault at any point in time
minTradeAmount - the minimum amount of funds the vault can trade in a single tx (how much will be paid per ticket)
https://github.com/thales-markets/contracts/tree/feat/parlays-overtime-vault
Copyright and related rights waived via CC0.