Search…
⌃K

Sweep coin

Storage

Fetch minter (stabilizer) info

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)

Valid minters

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)

Target prices

Fetches the current and the next target price.
function current_target_price()
function 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.
function target_price()

Interest rate periods

Fetches the period's start time and its duration.
function period_start()
function period_time()
Fetches the delta amount of interest rate to increase/decrease. It has 6 decimals of precision. 1% = 10.000.
function step_value()

Total supply

Displays the total floating SWEEP (minted amount).
function totalSupply()

Admin Role

Approve a stabilizer deal and add to the minter list

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

Change the max mint amount (borrow limit)

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

Enable/disable a specific minter

On/Off minting for a specific address.
function setMinterEnabled(address _minter_address, bool enabled)

Change transfer permissioning

This is how to change transfer approver
function setTransferApprover(address new_approver)
new_approver: New contract address for transfer approving

Change interest rate

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

Change target price

Sets the current target price and the next target price.
funciton setTargetPrice(uint256 _current_target_price, uint256 _next_target_price)

Start a new period

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)

Set a new period time

Sets a new period of the target price.
function setPeriodTime(uint256 _period_time)

Set step value

The value to increment/decrement the interest rate every time there is the interest rate is refreshed.
function setStepValue(uint256 _new_step_value)

Pause SWEEP

This is how to pause transfer of SWEEP token
function pause()

Unpause SWEEP

This is how to unpause transfer of SWEEP token
function unpause()

Change the Uniswap TWAP oracle

This is used to update the oracle the AMM price is fetched from
function setUniswapOracle(uint256 _uniswap_oracle_address)

Change the treasury address

Sets the treasury address
function setTreasury(uint256 _treasury_address)

Change the balancer

Sets the balancer address
function setBalancer(uint256 _balancer_address)

Code upgrades

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.
​
​