Gets the information about a minter. Returns 4 values: 1. boolean that represents if the minter is listed or not. 2. uint that represents the max mint amount. 3. uint that represents the minted amount 4. boolean that represents if the minter can mint or not.
function minters(address _minter_address)
function getMinter(address _minter_address)
Returns true if the minter is listed in the minter list and if they have a mix amount above of zero.
function isValidMinter(address minter_address)
Fetches the current and the next target price.
Fetches the target price, that is used to peg the SWEEP price safely. If period_time is over, returns the next_target_price, otherwise the current_target_price.
Fetches the period's start time and its duration.
Fetches the delta amount of interest rate to increase/decrease. It has 6 decimals of precision. 1% = 10.000.
Displays the total floating SWEEP (minted amount).
The most important action for Sweep governance is to control the list of Stabilizers that it funds. Each Stabilizer represents an asset, and a maximum allocation to that asset. Stabilizers should match the mission, liquidity requirements, and risk tolerance of SWEEP.
function addMinter(address minter_address, uint256 max_mint_amount)
- minter_address: Address to be added into minter list
- max_mint_amount: Max amount for mint
This is how to change the borrow limit or turn off borrowing
function setMinterMaxAmount(address _minter, uint256 _max_amount)
- minter_address: Minter address
- max_mint_amount: Max mint amount to be changed
On/Off minting for a specific address.
function setMinterEnabled(address _minter_address, bool enabled)
This is how to change transfer approver
function setTransferApprover(address new_approver)
new_approver: New contract address for transfer approving
This is how to change interest rate of SWEEP
function setInterestRate(uint256 _new_interest_rate)
new_interest_rate: New interest rate for SWEEP to be changed
Sets the current target price and the next target price.
funciton setTargetPrice(uint256 _current_target_price, uint256 _next_target_price)
This is how to begin new period of SWEEP
function startNewPeriod(uint256 _new_period_time)
_new_period_time: new period time by seconds (ex: _new_period_time = 259200 means 3 days)
Sets a new period of the target price.
function setPeriodTime(uint256 _period_time)
The value to increment/decrement the interest rate every time there is the interest rate is refreshed.
function setStepValue(uint256 _new_step_value)
This is how to pause transfer of SWEEP token
This is how to unpause transfer of SWEEP token
This is used to update the oracle the AMM price is fetched from
function setUniswapOracle(uint256 _uniswap_oracle_address)
Sets the treasury address
function setTreasury(uint256 _treasury_address)
Sets the balancer address
function setBalancer(uint256 _balancer_address)
Sweep code will be upgradeable during the beta period.
The SWEEP coin, Sweep.sol, is an upgradeable proxy contract. It can accept code upgrades from the contract owner.
The contract owner is controlled by protocol governance in the following way [describe]
Stabilizer code cannot be upgraded. The code for a Stabilizer represents a specific agreement between the protocol and a borrower. To change this agreement, the protocol and the borrower should create and fund a new Stabilizer. The protocol will then set the borrow limits to zero on the old Stabilizer and request redemption.
Other contracts can be upgraded by deploying new versions, and attaching the new versions to the Sweep.sol contract. This will help the protocol change the logic of the Balancer and the transfer permissions.