gnosisguild/zodiac-module-siphon(新しいタブで開きます)
主要言語: Solidity
- star 数
- 11
- watcher 数
- 5
- fork 数
- 3
- issue 数
- 4
- 最終更新
- 2023/08/01
主要言語: Solidity
The Siphon Module belongs to the Zodiac collection of tools, which can be accessed through the Zodiac App available on Gnosis Safe.
If you have any questions about Zodiac, join the Gnosis Guild Discord. Follow @GnosisGuild on Twitter for updates.
This module exposes a public interface which allows anyone to trigger an Avatar to withdraw from a designated liquidity position in order to pay down some of its debt in a designated debt position, thereby improving the health of the position.
The module owner can set a target and trigger collateral ratios for the debt position. If the collateral ratio of the debt position falls below the trigger ratio, anyone can call siphon() to trigger the withdrawal of enough capital from the liquidity position to return the debt position to the target ratio.
This contract should be used in concert with a bot that periodically queries ratio() on the debt position adapter and calls siphon() on the Siphon module any time ratio() falls below the current ratioTarget().
Siphon also exposes some MEV in the parity and slippage tolerance defined by the user in the liquidity adapter. Setting these variables relatively higher provides an incentive for those seeking to capture MEV to call siphon() on the user's behalf whenever ratio() falls below ratioTarget(). This could be used in concert with the bot mentioned above to add a layer of redundancy to the monitoring payment of unhealthy debt positions.
connectTube().ratio() and ratioTrigger() on the debt adapter and call siphon() on the Siphon module whenever the former falls below the latter..env.sampl file into a .env file at the same location and populate it with your keys, etc.yarnyarn buildThe contracts have been developed with Solidity 0.8.6. This version of Solidity made all arithmetic checks by default, therefore eliminating the need for explicit overflow or underflow (or other arithmetic) checks.
All contracts are WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Created under the LGPL-3.0+ license.
contracts/adapters/lp/balancer/*. However balancer specific helper and lib functions are present in contracts/lib and contracts/helpers.