mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
946 lines
22 KiB
JSON
946 lines
22 KiB
JSON
{
|
|
"title": "LendingPool: Borrow/repay (variable rate)",
|
|
"description": "Test cases for the borrow function, variable mode.",
|
|
"stories": [
|
|
{
|
|
"description": "User 2 deposits 1 UNIDAI to account for rounding errors",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 0 deposits 1000 UNIDAI, user 1 deposits 1 UNIWETH as collateral and borrows 100 UNIDAI at variable rate",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1000",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1000",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "100",
|
|
"borrowRateMode": "variable",
|
|
"user": "1",
|
|
"timeTravel": "365"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 tries to borrow the rest of the UNIDAI liquidity (revert expected)",
|
|
"actions": [
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "900",
|
|
"borrowRateMode": "variable",
|
|
"user": "1"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "There is not enough collateral to cover a new borrow"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 tries to repay 0 UNIDAI (revert expected)",
|
|
"actions": [
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "0",
|
|
"user": "1",
|
|
"onBehalfOf": "1"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "Amount must be greater than 0"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 repays a small amount of UNIDAI, enough to cover a small part of the interest",
|
|
"actions": [
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1.25",
|
|
"user": "1",
|
|
"onBehalfOf": "1",
|
|
"borrowRateMode": "variable"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 repays the UNIDAI borrow after one year",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"description": "Mint 10 UNIDAI to cover the interest",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "10",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "-1",
|
|
"user": "1",
|
|
"onBehalfOf": "1",
|
|
"borrowRateMode": "variable"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 0 withdraws the deposited UNIDAI plus interest",
|
|
"actions": [
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "-1",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 withdraws the collateral",
|
|
"actions": [
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "-1",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 2 deposits a small amount of UNIWETH to account for rounding errors",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "0.001",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "0.001",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 0 deposits 1 UNIWETH, user 1 deposits 100 UNILINKWETH as collateral and borrows 0.5 WETH at variable rate",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNILINKWETH",
|
|
"amount": "100",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNILINKWETH",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNILINKWETH",
|
|
"amount": "100",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "0.5",
|
|
"borrowRateMode": "variable",
|
|
"user": "1",
|
|
"timeTravel": "365"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 tries to repay 0 WETH",
|
|
"actions": [
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "0",
|
|
"user": "1",
|
|
"onBehalfOf": "1",
|
|
"borrowRateMode": "variable"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "Amount must be greater than 0"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 2 tries to repay everything on behalf of user 1 using uint(-1) (revert expected)",
|
|
"actions": [
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "-1",
|
|
"user": "2",
|
|
"borrowRateMode": "variable",
|
|
"onBehalfOf": "1"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "To repay on behalf of an user an explicit amount to repay is needed"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 3 repays a small amount of UNIWETH on behalf of user 1",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "3"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "3"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "0.2",
|
|
"user": "3",
|
|
"borrowRateMode": "variable",
|
|
"onBehalfOf": "1"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 repays the UNIWETH borrow after one year",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "-1",
|
|
"borrowRateMode": "variable",
|
|
"user": "1",
|
|
"onBehalfOf": "1"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 0 withdraws the deposited UNIWETH plus interest",
|
|
"actions": [
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "-1",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 withdraws the collateral",
|
|
"actions": [
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNILINKWETH",
|
|
"amount": "-1",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
"description": "User 2 deposits 1 UNIUSDC to account for rounding errors",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "1",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "1",
|
|
"user": "2"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 0 deposits 1000 UNIUSDC, user 1 deposits 1 UNIWETH as collateral and borrows 100 UNIUSDC at variable rate",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "1000",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "1000",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "100",
|
|
"borrowRateMode": "variable",
|
|
"user": "1",
|
|
"timeTravel": "365"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 tries to borrow the rest of the UNIUSDC liquidity (revert expected)",
|
|
"actions": [
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "900",
|
|
"borrowRateMode": "variable",
|
|
"user": "1"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "There is not enough collateral to cover a new borrow"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 repays the UNIUSDC borrow after one year",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"description": "Mint 10 UNIUSDC to cover the interest",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "10",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "-1",
|
|
"user": "1",
|
|
"onBehalfOf": "1",
|
|
"borrowRateMode": "variable"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 0 withdraws the deposited UNIUSDC plus interest",
|
|
"actions": [
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "-1",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 withdraws the collateral",
|
|
"actions": [
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "-1",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 deposits 1000 UNIDAI, user 3 tries to borrow 1000 UNIDAI without any collateral (revert expected)",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1000",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1000",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1000",
|
|
"borrowRateMode": "variable",
|
|
"user": "3"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "The collateral balance is 0"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "user 3 deposits 0.1 WETH collateral to borrow 100 UNIDAI; 0.1 WETH is not enough to borrow 100 UNIDAI (revert expected)",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "0.1",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "0.1",
|
|
"user": "3"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "100",
|
|
"borrowRateMode": "variable",
|
|
"user": "3"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "There is not enough collateral to cover a new borrow"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "user 3 withdraws the 0.1 WETH",
|
|
"actions": [
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "-1",
|
|
"user": "3"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 1 deposits 1000 UNIUSDC, user 3 tries to borrow 1000 UNIUSDC without any collateral (revert expected)",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "1000",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "1000",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "1000",
|
|
"borrowRateMode": "variable",
|
|
"user": "3"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "The collateral balance is 0"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "user 3 deposits 0.1 WETH collateral to borrow 100 UNIUSDC; 0.1 WETH is not enough to borrow 100 UNIUSDC (revert expected)",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "1",
|
|
"user": "3"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "1"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "0.1",
|
|
"user": "3"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIUSDC",
|
|
"amount": "100",
|
|
"borrowRateMode": "variable",
|
|
"user": "3"
|
|
},
|
|
"expected": "revert",
|
|
"revertMessage": "There is not enough collateral to cover a new borrow"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "user 3 withdraws the 0.1 WETH",
|
|
"actions": [
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "-1",
|
|
"user": "3"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "User 0 deposits 1000 UNIDAI, user 6 deposits 2 UNIWETH and borrow 100 UNIDAI at variable rate first, then 100 UNIDAI at stable rate, repays everything. User 0 withdraws",
|
|
"actions": [
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1000",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "1000",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "mint",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "2",
|
|
"user": "6"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"user": "6"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "deposit",
|
|
"args": {
|
|
"reserve": "UNIWETH",
|
|
"amount": "2",
|
|
"user": "6"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "100",
|
|
"borrowRateMode": "variable",
|
|
"user": "6",
|
|
"timeTravel": "365"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "borrow",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "100",
|
|
"borrowRateMode": "stable",
|
|
"user": "6",
|
|
"timeTravel": "365"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "mint",
|
|
"description": "Mint 50 UNIDAI to cover the interest",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "50",
|
|
"user": "6"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"user": "6"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "-1",
|
|
"user": "6",
|
|
"onBehalfOf": "6",
|
|
"borrowRateMode": "stable"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "repay",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "-1",
|
|
"user": "6",
|
|
"onBehalfOf": "6",
|
|
"borrowRateMode": "variable"
|
|
},
|
|
"expected": "success"
|
|
},
|
|
{
|
|
"name": "withdraw",
|
|
"args": {
|
|
"reserve": "UNIDAI",
|
|
"amount": "-1",
|
|
"user": "0"
|
|
},
|
|
"expected": "success"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|