Ouro aims to create an inflation-proof store of value system on BSC, featuring Peer-to-Pool asset swaps. In essence, the project derives fiat inflations manifested in the growth of the value of crypto assets and migrates them onto OURO, making it inflation-proof against the USD.
Binance Smart Chain Mainnet Deployment:
- OURO BEP20 Token: https://bscscan.com/token/0x0a4fc79921f960a4264717fefee518e088173a79
- OGS BEP20 Token: https://bscscan.com/token/0x416947e6Fc78F158fd9B775fA846B72d768879c2
- OURO Reserve: https://bscscan.com/address/0x8739aBC0be4f271A5f4faC825BebA798Ee03f0CA#code
- OURO Proxy: https://bscscan.com/address/0xEBc85Adf95498E53529b1c43e16E2D46e06d9E0e#code
Before GMT: Jan 30, 2023, AM 3:26, or unix timestamp: 1675049203, minting OURO can only be done via proxy contract, the interface of Proxy is just the same as OURO Reserve.
You can build your own smart contracts to interact with OURO Reserve with your own strategy.
- OURO Reserve: OURO Reserve is the only authoritative contract to mint OURO stable coin, OURO Reserve has the right to lend the assets it holds to earn risk-free yields. Anyone has the right to deposit assets into OURO Reserve to mint OURO at any time, and burn OURO to get back assets conversely.
- OURO: The stable coin OURO Reserve issues, initially 1:1 pegged to USD, appreciate by 3% max each month.
- OGS: The governance token of OURO Reserve, if profits has made in OURO Reserve, OGS holders shares the revenue from OGS price going up. Also, critical parameter changes of OURO Reserve can only be executed via DAO operated with OGS token.
Get collateral information which OURO Reserve supports
function getCollateral(address token) external view returns (
address vTokenAddress,
uint256 assetUnit,
uint256 lastPrice,
AggregatorV3Interface priceFeed
);
Returns: detailed collateral information which OURO Reserve supports, including:
vTokenAddress
: Venus VToken address for lending.assetUnit
: The amount for one unit of asset, eg: 1 BNB = 1e18.lastPrice
: Records the latest price during lastrebase()
operation.priceFeed
: The Chainlink price oracle for this asset.
Get total collateral balance in OURO Reserve
function getAssetBalance(address token) external view returns(uint256);
Parameters:
token
: BEP20 asset to check, for BNB, use WBNB address instead.
Returns: the amount of assets in OURO Reserve
Get OURO price in USD
function getPrice() public view returns(uint256);
Returns: current OURO price in USD, OURO Reserve always keeps the price 1:1 pegged.
Get the amount of assets required to mint given amount of OURO.
function getAssetsIn(uint256 amountOURO, address token) external view returns(uint256);
Parameters:
amountOURO
: amount of OURO expected to mint.token
: BEP20 token to swap in, for BNB, use WBNB address instead.
Returns: amount of assets required.
Get the amount of OURO required to swap given amount of assets out.
function getOuroIn(uint256 amount, address token) external view returns(uint256);
Parameters:
amount
: amount of assets expected to swap out.token
: BEP20 token to receive, for BNB, use WBNB address instead.
Returns: OURO amount required to burn.
To mint OURO by depositing assets.
function deposit(address token, uint256 amountAsset, uint256 minAmountOuro) external payable returns (uint256 OUROMinted);
OUROs are minted via this function only, users deposit assets to mint equivalent OURO based on asset's realtime price from Chainlink oracle;
In order to mint new OURO, you need to approve()
your asset token to OURO Reserve contract first.
Prices may change between the time of query and the time of transaction confirmation,
minAmountOuro
is to limit the minimum amount of OURO willing to receive in deposit()
transaction.
If you want to mint OURO at realtime price of the asset, simply set 0 to minAmountOuro
.
Parameters:
token
: BEP20 token to swap into reserve, for BNB, use WBNB address instead.amountAsset
: amount of assets to swap in(this parameter is omitted for BNB deposit).minAmountOuro
: minimum amount of OURO willing to receive.
Returns: the amount of OURO minted.
Transaction reverts on error.
To withdraw assets by burning OURO
function withdraw(address token, uint256 amountAsset, uint256 maxAmountOuro) external returns(uint256 OUROTaken);
Withdrawing assets is accompanied by burning equivalent value of OURO token.
In order to swap back your OURO for OURO Reserve to burn, you need to approve()
your OURO token to OURO Reserve contract first,
the OURO Reserve contract will be able to transfer OURO token from your account and returns equivalent(realtime price) assets back to you.
Prices may change between the time of query and the time of transaction confirmation,
maxAmountOuro
is to limit the maximum amount of OURO willing to burn in withdraw()
transaction.
If you want to get back assets at realtime price, simply set MAX_UINT256 to maxAmountOuro
.
Parameters:
token
: BEP20 token to swap out, for BNB, use WBNB address instead.amountAsset
: amount of assets to swap out.maxAmountOuro
: maximum amount of OURO willing to burn.
Returns: the amount of OURO transfered out from your account.
Transaction reverts on error.
Note: If OURO Reserve has insufficient collateral to return, it will transfer the maximum possible assets back.
PS. uint256 MAX_UINT256 = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff