What's Changed
- Yield+ EVM support by @DenisCarriere in #32
Full Changelog: v1.0.1...v2.0.0
Checksum
$ shasum -a 256 eosio.yield.wasm
5e79ed2d6ea9adcb5593c9f52e2dcac17a49e321e1f1bfbc1b31a0258ab2c111 eosio.yield.wasm
$ shasum -a 256 oracle.yield.wasm
3ceb804d3d2f04a56812970b1ddfa214f9957515de44ca5185d5dc663834acc7 oracle.yield.wasm
EVM support features
- Oracle TVL
update
supports EVM contracts -
setcontracts
ACTION now includesevm_contracts
- Oracle supports adding EVM token addresses to contributes to TVL calculations
- Add EVM callback support with
balanceOf(address)
method selector to fetch EVM token balance using EOS smart contract. - Automatic
balanceof
updates prior to callingupdate
orupdateall
- Claim rewards to EVM address (using EVM bridge)
- Set maximum EVM & Native contracts to a limit of 10 (due to CPU limitations to compute TVL by oracle)
EVM Token Support
- Multichain Tether (USDT)
- Wrapped EOS (WEOS)
- Multichain Circle (USDC)
Solves issues
New ACTIONS
-
addevmtoken
-
delevmtoken
New TABLES
-
evm.tokens
-
evm.balances
🔑 Authority changes
-
setcontracts
no longer requirehas_auth
on every contract
adding EVM contracts do not require authentication, so manual review process is always required for contract changes.
A lot of friction with protocol admins that cannot add contracts because of strict MSIG permissions or nulled permissions.
-
claim
added permission to Admin account (when protocol no longer have access, can perform final claim & unregister protocol) -
update
action can only be triggered internally byoracle.yield
EVM callback
balanceof
needs to be triggered prior toupdate
action being called, whichupdateall
takes care of the inline action ordering.
Minor logic changes
- remove
setevm
ACTION, logic has been merged intosetcontracts
-
setcontracts
only supports EOS or EOS EVM contracts (not both) - validate USDT contract to be
tethertether
- USD/USDC/USDT token do not require oracles ID's (pegged at $1.00 USD)
-
setrate
has optional values (in case no change for other values, makes it easier to review MSIG's)
ACTION addevmtoken
- authority:
get_self()
Add {{sym}} token using {{address}} EOS EVM address.
params
{bytes} address
- token EOS EVM address{uint8_t} decimals
- token decimals{symbol_code} symcode
- token symbol code
example
$ cleos push action oracle.yield addevmtoken '["fa9343c3897324496a05fc75abed6bac29f8a40f", 6, "USDT"]' -p oracle.yield
$ cleos push action oracle.yield addevmtoken '["c00592aA41D32D137dC480d9f6d0Df19b860104F", 18, "EOS"]' -p oracle.yield
ACTION delevmtoken
- authority:
get_self()
Delete {{address}} EOS EVM token as supported asset
params
{bytes} address
- EOS EVM token address
example
$ cleos push action oracle.yield deltoken '["fa9343c3897324496a05fc75abed6bac29f8a40f"]' -p oracle.yield
TABLE evm.tokens
params
{uint64_t} token_id
- (primary key) EOS EVM token account ID{bytes} address
- EOS EVM token address{uint8_t} decimals
- EOS EVM token decimals{symbol} sym
- token symbol
example
[
{
"token_id": 2,
"address": "c00592aA41D32D137dC480d9f6d0Df19b860104F",
"decimals": "18",
"sym": "4,EOS"
}
{
"token_id": 201,
"sym": "4,USDT",
"address": "fa9343c3897324496a05fc75abed6bac29f8a40f",
"decimals": "6"
},
]
TABLE evm.balances
Scope: <uint64_t> token_id
params
{uint64_t} address_id
- (primary key) EOS EVM address account ID{bytes} address
- EOS EVM address{asset} balance
- current token balance
example
{
"address_id": 663,
"address": "671A5e209A5496256ee21386EC3EaB9054d658A2",
"balance": "173151.7110 USDT"
}